2010-08-31 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * gnus-cite.el (gnus-article-natural-long-line-p): New function to
+ guess whether a long line is natural text or not.
+
* gnus-html.el (gnus-html-schedule-image-fetching): Use
gnus-process-plist and friends for compatibility.
gnus-cite-loose-attribution-alist nil
gnus-cite-article nil)))))
+(defun gnus-article-natural-long-line-p ()
+ "Return true if the current line is long, and it's natural text."
+ (save-excursion
+ (beginning-of-line)
+ (and
+ ;; The line is long.
+ (> (- (line-end-position) (line-beginning-position))
+ (frame-width))
+ ;; It doesn't start with spaces.
+ (not (looking-at " "))
+ ;; Not cited text.
+ (let ((line-number (1+ (count-lines (point-min) (point))))
+ citep)
+ (dolist (elem gnus-cite-prefix-alist)
+ (when (member line-number (cdr elem))
+ (setq citep t)))
+ (not citep)))))
+
(defun gnus-article-hide-citation (&optional arg force)
"Toggle hiding of all cited text except attribution lines.
See the documentation for `gnus-article-highlight-citation'.