From: Stefan Monnier Date: Fri, 2 Nov 2001 03:10:46 +0000 (+0000) Subject: (fill-region-as-paragraph): Don't forget to skip X-Git-Tag: ttn-vms-21-2-B4~18898 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2d78d3e878e0b64f13fe51a2b1cb1105b0ed6aae;p=emacs.git (fill-region-as-paragraph): Don't forget to skip over current whitespace before looking for a preceding space. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 404c3c1f546..d590fca893d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2001-11-01 Stefan Monnier + + * 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 * files.el (find-file-noselect): Offer to change buffer-read-only diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 48a4de776cf..afe493b5591 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -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