aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2009-01-12 04:24:39 +0000
committerStefan Monnier2009-01-12 04:24:39 +0000
commitd7158f270c5f2504551279718cd81a2204b2ffdb (patch)
tree2af7c886513cd5026e251960c9670fe5a5ad93bd
parent64ac12669e7b908d4865bb9b083c088ca03552ea (diff)
downloademacs-d7158f270c5f2504551279718cd81a2204b2ffdb.tar.gz
emacs-d7158f270c5f2504551279718cd81a2204b2ffdb.zip
(forward-sentence): Change limit of
re-search-backward to allow values of `sentence-end' anchored at BOL.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/textmodes/paragraphs.el5
2 files changed, 9 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 30ba3804544..1687d8cfa74 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12009-01-12 Alan Mackenzie <acm@muc.de>
2
3 * textmodes/paragraphs.el (forward-sentence): Change limit of
4 re-search-backward to allow values of `sentence-end' anchored at BOL.
5
12009-01-12 Stefan Monnier <monnier@iro.umontreal.ca> 62009-01-12 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * tar-mode.el (tar-header-block-tokenize): Properly ignore the version 8 * tar-mode.el (tar-header-block-tokenize): Properly ignore the version
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index 937140bd4dc..1d4a2746f62 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -449,7 +449,10 @@ sentences. Also, every paragraph boundary terminates sentences as well."
449 (sentence-end (sentence-end))) 449 (sentence-end (sentence-end)))
450 (while (< arg 0) 450 (while (< arg 0)
451 (let ((pos (point)) 451 (let ((pos (point))
452 (par-beg (save-excursion (start-of-paragraph-text) (point)))) 452 ;; We used to use (start-of-paragraph-text), but this can
453 ;; prevent sentence-end from matching if it is anchored at
454 ;; BOL and the paragraph starts indented.
455 (par-beg (save-excursion (backward-paragraph) (point))))
453 (if (and (re-search-backward sentence-end par-beg t) 456 (if (and (re-search-backward sentence-end par-beg t)
454 (or (< (match-end 0) pos) 457 (or (< (match-end 0) pos)
455 (re-search-backward sentence-end par-beg t))) 458 (re-search-backward sentence-end par-beg t)))