diff lisp/textmodes/fill.el @ 50659:f20dbbe44da9

(fill-region-as-paragraph): Fix "last line goes to fill-column+1" problem.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 21 Apr 2003 16:22:08 +0000
parents dff98b69fed2
children 89533dc3e837
line wrap: on
line diff
--- a/lisp/textmodes/fill.el	Mon Apr 21 15:48:28 2003 +0000
+++ b/lisp/textmodes/fill.el	Mon Apr 21 16:22:08 2003 +0000
@@ -660,9 +660,10 @@
 	(let (linebeg)
 	  (while (< (point) to)
 	    (setq linebeg (point))
-	    (move-to-column (1+ (current-fill-column)))
+	    (move-to-column (current-fill-column))
 	    (if (when (< (point) to)
 		  ;; Find the position where we'll break the line.
+		  (forward-char 1) ;Use an immediately following space, if any.
 		  (fill-move-to-break-point linebeg)
 		  ;; Check again to see if we got to the end of
 		  ;; the paragraph.