]> git.eshelyaron.com Git - emacs.git/commitdiff
(fill-region-as-paragraph): Don't forget to skip
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 2 Nov 2001 03:10:46 +0000 (03:10 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 2 Nov 2001 03:10:46 +0000 (03:10 +0000)
over current whitespace before looking for a preceding space.

lisp/ChangeLog
lisp/textmodes/fill.el

index 404c3c1f546c6b1b29c26f256f8e39eca8a5c0ff..d590fca893dc846be1f3229eaaa67ed62f415a69 100644 (file)
@@ -1,3 +1,8 @@
+2001-11-01  Stefan Monnier  <monnier@rum.cs.yale.edu>
+
+       * fill.el (fill-region-as-paragraph): Don't forget to skip
+       over current whitespace before looking for a preceding space.
+
 2001-11-01  Richard M. Stallman  <rms@gnu.org>
 
        * files.el (find-file-noselect): Offer to change buffer-read-only
index 48a4de776cfc0e8f7652a1c60c6f45f4a3eae622..afe493b5591ddc1283a0283e7a980c3c1ff7f338 100644 (file)
@@ -565,7 +565,9 @@ space does not end a sentence, so don't break a line there."
                ;; further fills will assume it ends a sentence.
                ;; If we now know it does not end a sentence,
                ;; avoid putting it at the end of the line.
-               (while (and (> (point) linebeg) (fill-nobreak-p))
+               (while (and (> (point) linebeg)
+                           (fill-nobreak-p)
+                           (skip-chars-backward " \t"))
                  (if (re-search-backward " \\|\\c|.\\|.\\c|" linebeg 0)
                      (forward-char 1)))
                ;; If the left margin and fill prefix by themselves