diff options
Diffstat (limited to 'lisp/gnus/flow-fill.el')
-rw-r--r-- | lisp/gnus/flow-fill.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/gnus/flow-fill.el b/lisp/gnus/flow-fill.el index c3f7f7bb20e..480505549c9 100644 --- a/lisp/gnus/flow-fill.el +++ b/lisp/gnus/flow-fill.el @@ -113,10 +113,15 @@ RFC 2646 suggests 66 characters for readability." (save-excursion (set-buffer (or (current-buffer) buffer)) (goto-char (point-min)) + ;; Remove space stuffing. + (while (re-search-forward "^ " nil t) + (delete-char -1) + (forward-line 1)) + (goto-char (point-min)) (while (re-search-forward " $" nil t) (when (save-excursion (beginning-of-line) - (looking-at "^\\(>*\\)\\( ?\\)")) + (looking-at "^\\(>+\\)\\( ?\\)")) (let ((quote (match-string 1)) sig) (if (string= quote "") @@ -146,7 +151,8 @@ RFC 2646 suggests 66 characters for readability." (condition-case nil (let ((fill-prefix (when quote (concat quote " "))) (fill-column (eval fill-flowed-display-column)) - filladapt-mode) + filladapt-mode + adaptive-fill-mode) (fill-region (fill-flowed-point-at-bol) (min (1+ (fill-flowed-point-at-eol)) (point-max)) |