]> git.eshelyaron.com Git - emacs.git/commitdiff
(tex-terminate-paragraph): Use backward-paragraph.
authorGlenn Morris <rgm@gnu.org>
Wed, 19 Sep 2007 07:24:17 +0000 (07:24 +0000)
committerGlenn Morris <rgm@gnu.org>
Wed, 19 Sep 2007 07:24:17 +0000 (07:24 +0000)
lisp/ChangeLog
lisp/textmodes/tex-mode.el

index 5766439ebb9f71ed0388063bc6e83b79f0d89999..71a81882461ede4d872c475a0ef6fa4a366b86d4 100644 (file)
@@ -1,7 +1,7 @@
 2007-09-19  Glenn Morris  <rgm@gnu.org>
 
        * textmodes/tex-mode.el (tex-terminate-paragraph): Use
-       backward-paragraph.
+       backward-paragraph.  Leave point at the site of any mismatch.
 
 2007-09-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 
index cfd5afebe4ee0d0e2e4eb19bcc27610aac1c930c..3a7a9880d388a771992a4e9f8a3146ea546f8b6c 100644 (file)
@@ -1188,6 +1188,7 @@ on the line for the invalidity you want to see."
          (let ((end (point))
                prev-end)
            ;; Scan the previous paragraph for invalidities.
+           ;; FIXME this should be using something like backward-paragraph.
            (if (search-backward "\n\n" nil t)
                (progn
                  (setq prev-end (point))
@@ -1273,9 +1274,13 @@ A prefix arg inhibits the checking."
   (interactive "*P")
   (or inhibit-validation
       (save-excursion
+       ;; For the purposes of this, a "paragraph" is a block of text
+       ;; wherein all the brackets etc are expected to be balanced.  It
+       ;; may start after a blank line (ie a "proper" paragraph), or
+       ;; a begin{} or end{} block, etc.
        (tex-validate-region
         (save-excursion
-          (search-backward "\n\n" nil 'move)
+          (backward-paragraph)
           (point))
         (point)))
       (message "Paragraph being closed appears to contain a mismatch"))