From 9bcdf9a8fdae9bf6128fd45454ff1f0c785d5da2 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 21 Apr 2003 16:22:08 +0000 Subject: [PATCH] (fill-region-as-paragraph): Fix "last line goes to fill-column+1" problem. --- lisp/textmodes/fill.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 4faa89ae724..a8a98524838 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -660,9 +660,10 @@ space does not end a sentence, so don't break a line there." (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. -- 2.39.2