]> git.eshelyaron.com Git - emacs.git/commitdiff
(forward-sentence): Put the sentence-end
authorGerd Moellmann <gerd@gnu.org>
Tue, 10 Apr 2001 14:55:03 +0000 (14:55 +0000)
committerGerd Moellmann <gerd@gnu.org>
Tue, 10 Apr 2001 14:55:03 +0000 (14:55 +0000)
regexp in parentheses when building the regexp for searching
backwards.

lisp/ChangeLog
lisp/textmodes/paragraphs.el

index c41630731d4f4178ace1519f42a88f1955cf9d79..e13c5cc9497f4af8e4062510dd9bfa2eccbec18c 100644 (file)
@@ -1,5 +1,9 @@
 2001-04-10  Gerd Moellmann  <gerd@gnu.org>
 
+       * textmodes/paragraphs.el (forward-sentence): Put the sentence-end
+       regexp in parentheses when building the regexp for searching
+       backwards.
+
        * simple.el (completion-list-mode-finish): New function.
        (toplevel): Add completion-list-mode-finish to
        temp-buffer-show-hook.
index 2913c83134d083b90a0767199493e63e59440629..305f24b60498fbd34ba4423f72d72c3706b3b5ae 100644 (file)
@@ -1,6 +1,6 @@
 ;;; paragraphs.el --- paragraph and sentence parsing.
 
-;; Copyright (C) 1985, 86, 87, 91, 94, 95, 96, 1997, 1999
+;; Copyright (C) 1985, 86, 87, 91, 94, 95, 96, 1997, 1999, 2000, 2001
 ;;    Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
@@ -369,7 +369,8 @@ sentences.  Also, every paragraph boundary terminates sentences as well."
   (let ((opoint (point)))
     (while (< arg 0)
       (let ((par-beg (save-excursion (start-of-paragraph-text) (point))))
-       (if (re-search-backward (concat sentence-end "[^ \t\n]") par-beg t)
+       (if (re-search-backward (concat "\\(" sentence-end "\\)[^ \t\n]")
+                              par-beg t)
           (goto-char (1- (match-end 0)))
         (goto-char par-beg)))
       (setq arg (1+ arg)))