diff options
| author | Stefan Monnier | 2007-05-24 16:13:18 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-05-24 16:13:18 +0000 |
| commit | dff1336c122f3605a9437ecdfd0c50c5381872f9 (patch) | |
| tree | d477fe459ca7a13e4f201b75fb22b9808ad52531 | |
| parent | 274cb4e46d556c8b19e89d622065517bfb94db91 (diff) | |
| download | emacs-dff1336c122f3605a9437ecdfd0c50c5381872f9.tar.gz emacs-dff1336c122f3605a9437ecdfd0c50c5381872f9.zip | |
(canonically-space-region): Make the second arg
a marker if it's not already the case.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/textmodes/fill.el | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f7e254153c3..98adf1a4da4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-05-24 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * textmodes/fill.el (canonically-space-region): Make the second arg | ||
| 4 | a marker if it's not already the case. | ||
| 5 | |||
| 1 | 2007-05-23 Eli Zaretskii <eliz@gnu.org> | 6 | 2007-05-23 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * tar-mode.el (tar-header-block-summarize, tar-summarize-buffer) | 8 | * tar-mode.el (tar-header-block-summarize, tar-summarize-buffer) |
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 | |||
| 159 | and `sentence-end-without-period'). | 159 | and `sentence-end-without-period'). |
| 160 | Remove indentation from each line." | 160 | Remove 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) |