diff options
author | Richard M. Stallman <[email protected]> | 1995-04-02 00:11:19 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 1995-04-02 00:11:19 +0000 |
commit | 24aac19dbb7230a7a395ace89f2f700ea743bce1 (patch) | |
tree | d6d0f7cca38fc68b57fe70b0fb4b4aaadfc23087 /lisp/textmodes | |
parent | efde113229106bb98b96855f71169eadab3426a4 (diff) |
(fill-region-as-paragraph): Remove fill-prefix first, then remove indentation.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r-- | lisp/textmodes/fill.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 00267fdae7..f1bcadd756 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -211,9 +211,6 @@ space does not end a sentence, so don't break a line there." (if (or (memq justify '(right center)) (< (current-indentation) (current-left-margin))) (indent-to-left-margin)) - ;; and remove indentation from other lines. - (beginning-of-line 2) - (indent-region (point) (point-max) 0) ;; Delete the fill prefix from every line except the first. ;; The first line may not even have a fill prefix. (goto-char from) @@ -235,7 +232,12 @@ space does not end a sentence, so don't break a line there." (goto-char from) (and (looking-at fpre) (goto-char (match-end 0))) (setq from (point))))) - ;; "from" is now before the text to fill, + ;; Remove indentation from lines other than the first. + (beginning-of-line 2) + (indent-region (point) (point-max) 0) + (goto-char from) + + ;; FROM, and point, are now before the text to fill, ;; but after any fill prefix on the first line. ;; Make sure sentences ending at end of line get an extra space. |