changeset 11178:7d4805feb413

(fill-region-as-paragraph): Remove fill-prefix first, then remove indentation.
author Richard M. Stallman <rms@gnu.org>
date Sun, 02 Apr 1995 00:11:19 +0000
parents 6a26526998f6
children 9ff0cfb97106
files lisp/textmodes/fill.el
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/fill.el	Sat Apr 01 05:01:32 1995 +0000
+++ b/lisp/textmodes/fill.el	Sun Apr 02 00:11:19 1995 +0000
@@ -211,9 +211,6 @@
 	  (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 @@
 		   (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.