# HG changeset patch # User Stefan Monnier # Date 1180105222 0 # Node ID c97a9221b6b8c4bf15b6c58b8bf2691ae5527c13 # Parent fc440b23bfa34de987e28a347cdc203a8ce24cc6 (canonically-space-region): Make the second arg a marker if it's not already the case. diff -r fc440b23bfa3 -r c97a9221b6b8 lisp/textmodes/fill.el --- a/lisp/textmodes/fill.el Fri May 25 07:18:28 2007 +0000 +++ b/lisp/textmodes/fill.el Fri May 25 15:00:22 2007 +0000 @@ -159,6 +159,11 @@ 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)