]> git.eshelyaron.com Git - emacs.git/commitdiff
(forward-sentence): Change limit of
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 12 Jan 2009 04:24:39 +0000 (04:24 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 12 Jan 2009 04:24:39 +0000 (04:24 +0000)
re-search-backward to allow values of `sentence-end' anchored at BOL.

lisp/ChangeLog
lisp/textmodes/paragraphs.el

index 30ba38045440930422213ad31e12cb0303dad9a7..1687d8cfa74a78553f29ba29e5e62133c5b7b608 100644 (file)
@@ -1,3 +1,8 @@
+2009-01-12  Alan Mackenzie  <acm@muc.de>
+
+       * textmodes/paragraphs.el (forward-sentence): Change limit of
+       re-search-backward to allow values of `sentence-end' anchored at BOL.
+
 2009-01-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * tar-mode.el (tar-header-block-tokenize): Properly ignore the version
index 937140bd4dc1ca9d8c97d6d07e6cbb4b30bf8060..1d4a2746f624246e056e0fbf083899cc639c864a 100644 (file)
@@ -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)))