aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2007-05-25 15:00:22 +0000
committerStefan Monnier2007-05-25 15:00:22 +0000
commit4b880ac1245e10e1ae80502dd58b174ffceea878 (patch)
treec0da2bc8cc54b06db9236521633a994650c14f7b
parent949673743cbf8b2eabebb9c94472756fd8f42140 (diff)
downloademacs-4b880ac1245e10e1ae80502dd58b174ffceea878.tar.gz
emacs-4b880ac1245e10e1ae80502dd58b174ffceea878.zip
(canonically-space-region): Make the second arg
a marker if it's not already the case.
-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 85b16931ec8..4e45c164ae8 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
159and `sentence-end-without-period'). 159and `sentence-end-without-period').
160Remove indentation from each line." 160Remove indentation from each line."
161 (interactive "*r") 161 (interactive "*r")
162 ;; Ideally, we'd want to scan the text from the end, so that changes to
163 ;; text don't affect the boundary, but the regexp we match against does
164 ;; not match as eagerly when matching backward, so we instead use
165 ;; a marker.
166 (unless (markerp end) (setq end (copy-marker end t)))
162 (let ((end-spc-re (concat "\\(" (sentence-end) "\\) *\\| +"))) 167 (let ((end-spc-re (concat "\\(" (sentence-end) "\\) *\\| +")))
163 (save-excursion 168 (save-excursion
164 (goto-char beg) 169 (goto-char beg)