From: Lars Magne Ingebrigtsen Date: Sun, 31 Oct 2010 21:38:04 +0000 (+0100) Subject: * gnus-cite.el (gnus-article-foldable-buffer): Refactor out. X-Git-Url: https://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=30cbdba78e6274a909e56dada62f60423fd639ef * gnus-cite.el (gnus-article-foldable-buffer): Refactor out. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5f45093da..02af2a04c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2010-10-31 Lars Magne Ingebrigtsen + * gnus-cite.el (gnus-article-foldable-buffer): Refactor out. + * gnus-sum.el (gnus-summary-show-article): Add `C-u C-u g' for showing the raw article, and change `C-u g' to show the article without doing treatments. diff --git a/lisp/gnus-cite.el b/lisp/gnus-cite.el index afc78c33e..c8de7a6fa 100644 --- a/lisp/gnus-cite.el +++ b/lisp/gnus-cite.el @@ -542,13 +542,8 @@ longer than the frame width." (concat (cdar marks) " "))) (do-fill (not long-lines)) use-hard-newlines) - (goto-char (point-min)) (unless do-fill - (while (not (eobp)) - (end-of-line) - (when (> (current-column) (frame-width)) - (setq do-fill t)) - (forward-line 1))) + (setq do-fill (gnus-article-foldable-buffer))) (when do-fill (fill-region (point-min) (point-max)))) (set-marker (caar marks) nil) @@ -562,6 +557,15 @@ longer than the frame width." gnus-cite-loose-attribution-alist nil 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) + (defun gnus-article-natural-long-line-p () "Return true if the current line is long, and it's natural text." (save-excursion