summaryrefslogtreecommitdiff
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2009-01-12 04:24:39 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2009-01-12 04:24:39 +0000
commitd7158f270c5f2504551279718cd81a2204b2ffdb (patch)
tree2af7c886513cd5026e251960c9670fe5a5ad93bd /lisp/textmodes
parent64ac12669e7b908d4865bb9b083c088ca03552ea (diff)
downloademacs-d7158f270c5f2504551279718cd81a2204b2ffdb.tar.gz
(forward-sentence): Change limit of
re-search-backward to allow values of `sentence-end' anchored at BOL.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/paragraphs.el5
1 files changed, 4 insertions, 1 deletions
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."
(sentence-end (sentence-end)))
(while (< arg 0)
(let ((pos (point))
- (par-beg (save-excursion (start-of-paragraph-text) (point))))
+ ;; We used to use (start-of-paragraph-text), but this can
+ ;; prevent sentence-end from matching if it is anchored at
+ ;; BOL and the paragraph starts indented.
+ (par-beg (save-excursion (backward-paragraph) (point))))
(if (and (re-search-backward sentence-end par-beg t)
(or (< (match-end 0) pos)
(re-search-backward sentence-end par-beg t)))