# HG changeset patch # User Stefan Monnier # Date 1050942128 0 # Node ID f20dbbe44da9025bacf130032deec2e036ff3a31 # Parent 94bb873a9f0dd174db18300d4fb2bdfdb4f7138c (fill-region-as-paragraph): Fix "last line goes to fill-column+1" problem. diff -r 94bb873a9f0d -r f20dbbe44da9 lisp/textmodes/fill.el --- 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.