aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-08-12 15:52:17 +0000
committerRichard M. Stallman1997-08-12 15:52:17 +0000
commit66d6ec94bbd52b9d59eefb4692cb7ef4b27f501c (patch)
tree70f22862650af43593a017ec941f766045117a8d
parent5f83e1daacffe53ee584333b751fe039a9c4c8bd (diff)
downloademacs-66d6ec94bbd52b9d59eefb4692cb7ef4b27f501c.tar.gz
emacs-66d6ec94bbd52b9d59eefb4692cb7ef4b27f501c.zip
(fill-region-as-paragraph):
When justifying, cope if line ends in spaces and no newline.
-rw-r--r--lisp/textmodes/fill.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index 5609eef944d..a7431356fda 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -513,8 +513,10 @@ space does not end a sentence, so don't break a line there."
513 (setq prefixcol (current-column)))))) 513 (setq prefixcol (current-column))))))
514 ;; Justify the line just ended, if desired. 514 ;; Justify the line just ended, if desired.
515 (if justify 515 (if justify
516 (if (eobp) 516 (if (save-excursion (skip-chars-forward " \t") (eobp))
517 (justify-current-line justify t t) 517 (progn
518 (delete-horizontal-space)
519 (justify-current-line justify t t))
518 (forward-line -1) 520 (forward-line -1)
519 (justify-current-line justify nil t) 521 (justify-current-line justify nil t)
520 (forward-line 1)))))) 522 (forward-line 1))))))