X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=blobdiff_plain;f=lisp%2Fgnus-cite.el;h=2afda44458aeebb3f8356fd3d18a5675dc351d79;hp=c8de7a6faaa1decf776981869d4bbbc11dfb0d1f;hb=bd6e48a1e07b47c58cfbb4d1b471f17085eb42f0;hpb=30cbdba78e6274a909e56dada62f60423fd639ef diff --git a/lisp/gnus-cite.el b/lisp/gnus-cite.el index c8de7a6fa..2afda4445 100644 --- a/lisp/gnus-cite.el +++ b/lisp/gnus-cite.el @@ -558,13 +558,25 @@ longer than the frame width." gnus-cite-article nil))))) (defun gnus-article-foldable-buffer () - (goto-char (point-min)) - (while (not (eobp)) - (end-of-line) - (when (> (current-column) (frame-width)) - (setq do-fill t)) - (forward-line 1)) - do-fill) + (let ((do-fill nil) + columns) + (goto-char (point-min)) + (while (not (eobp)) + (skip-chars-forward " \t") + (unless (eolp) + (let ((elem (assq (current-column) columns))) + (unless elem + (setq elem (cons (current-column) 0)) + (push elem columns)) + (setcdr elem (1+ (cdr elem))))) + (end-of-line) + (when (> (current-column) (frame-width)) + (setq do-fill t)) + (forward-line 1)) + (and do-fill + ;; We know know that there are long lines here, but does this look + ;; like code? Check for ragged edges on the left. + (< (length columns) 3)))) (defun gnus-article-natural-long-line-p () "Return true if the current line is long, and it's natural text."