changeset 19317:09398d892cf7

(fill-region-as-paragraph): When justifying, cope if line ends in spaces and no newline.
author Richard M. Stallman <rms@gnu.org>
date Tue, 12 Aug 1997 15:52:17 +0000
parents d28bff25d9a6
children 42c1854d17fb
files lisp/textmodes/fill.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/fill.el	Tue Aug 12 11:59:41 1997 +0000
+++ b/lisp/textmodes/fill.el	Tue Aug 12 15:52:17 1997 +0000
@@ -513,8 +513,10 @@
 			 (setq prefixcol (current-column))))))
 	      ;; Justify the line just ended, if desired.
 	      (if justify
-		  (if (eobp)
-		      (justify-current-line justify t t)
+                (if (save-excursion (skip-chars-forward " \t") (eobp))
+                    (progn
+                      (delete-horizontal-space)
+                      (justify-current-line justify t t))
 		    (forward-line -1)
 		    (justify-current-line justify nil t)
 		    (forward-line 1))))))