summaryrefslogtreecommitdiff
path: root/lisp/textmodes/fill.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-05-24 21:31:10 +0000
committerMiles Bader <miles@gnu.org>2007-05-24 21:31:10 +0000
commit262be72a9aaa800d38cd25b12acb8c9b7b21d5d6 (patch)
tree0940ebc7acd6379243e7194446acbd4f062be4f3 /lisp/textmodes/fill.el
parent5e1d0c0a38c22adc02d1b77bdc1d620fab26e52d (diff)
parenta02a3c235e3ec24acaf2014e6c60c0b4138ff86f (diff)
downloademacs-262be72a9aaa800d38cd25b12acb8c9b7b21d5d6.tar.gz
emacs-262be72a9aaa800d38cd25b12acb8c9b7b21d5d6.tar.bz2
emacs-262be72a9aaa800d38cd25b12acb8c9b7b21d5d6.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 751-770) - Update from CVS - Merge from emacs--rel--22 - Update from CVS: lisp/textmodes/sgml-mode.el: Revert last change. - Merge from gnus--rel--5.10 * emacs--rel--22 (patch 18-25) * gnus--rel--5.10 (patch 222-223) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-208
Diffstat (limited to 'lisp/textmodes/fill.el')
-rw-r--r--lisp/textmodes/fill.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index 59588d20bfd..e986e55873a 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -159,6 +159,11 @@ Leave one space between words, two at end of sentences or after colons
and `sentence-end-without-period').
Remove indentation from each line."
(interactive "*r")
+ ;; Ideally, we'd want to scan the text from the end, so that changes to
+ ;; text don't affect the boundary, but the regexp we match against does
+ ;; not match as eagerly when matching backward, so we instead use
+ ;; a marker.
+ (unless (markerp end) (setq end (copy-marker end t)))
(let ((end-spc-re (concat "\\(" (sentence-end) "\\) *\\| +")))
(save-excursion
(goto-char beg)