Minimize the long-lines fillling case by only filling the long lines.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 1 Nov 2010 17:42:38 +0000 (18:42 +0100)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 1 Nov 2010 17:42:38 +0000 (18:42 +0100)
lisp/ChangeLog
lisp/gnus-cite.el

index 86eab42..74dc73e 100644 (file)
@@ -1,5 +1,8 @@
 2010-11-01  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-cite.el (gnus-article-fill-cited-article): Minimize the
+       long-lines case by only filling the long lines.
+
        * nnimap.el (nnimap-parse-line): Don't bug out oddly formed replies
        (bug #7311).
 
index a010a83..2d44e36 100644 (file)
@@ -545,7 +545,16 @@ longer than the frame width."
            (unless do-fill
              (setq do-fill (gnus-article-foldable-buffer (cdar marks))))
            (when do-fill
-             (fill-region (point-min) (point-max))))
+             (if (not long-lines)
+                 (fill-region (point-min) (point-max))
+               (goto-char (point-min))
+               (while (not (eobp))
+                 (end-of-line)
+                 (when (> (current-column) (frame-width))
+                   (save-restriction
+                     (narrow-to-region (line-beginning-position) (point))
+                     (fill-region (point-min) (point-max))))
+                 (forward-line 1)))))
          (set-marker (caar marks) nil)
          (setq marks (cdr marks)))
        (when marks