]> git.eshelyaron.com Git - emacs.git/commitdiff
(fill-region-as-paragraph): Fix "last line goes to fill-column+1" problem.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 21 Apr 2003 16:22:08 +0000 (16:22 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 21 Apr 2003 16:22:08 +0000 (16:22 +0000)
lisp/textmodes/fill.el

index 4faa89ae724cbfdaf4a4aa8b06cde3748acb8792..a8a98524838935d468b4dcf96efbc266785ef91a 100644 (file)
@@ -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.