changeset 84640:60e6ac06bbfe

(tex-terminate-paragraph): Leave point at the site of any mismatch.
author Glenn Morris <rgm@gnu.org>
date Wed, 19 Sep 2007 07:24:45 +0000
parents b0ee198c809b
children c6643d09c653
files lisp/textmodes/tex-mode.el
diffstat 1 files changed, 11 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/tex-mode.el	Wed Sep 19 07:24:17 2007 +0000
+++ b/lisp/textmodes/tex-mode.el	Wed Sep 19 07:24:45 2007 +0000
@@ -1272,19 +1272,18 @@
 Check for mismatched braces or $s in paragraph being terminated.
 A prefix arg inhibits the checking."
   (interactive "*P")
+  (insert "\n\n")
   (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
-	   (backward-paragraph)
-	   (point))
-	 (point)))
-      (message "Paragraph being closed appears to contain a mismatch"))
-  (insert "\n\n"))
+      ;; 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
+	 (backward-paragraph)
+	 (point))
+       (point))
+      (message "Paragraph being closed appears to contain a mismatch")))
 
 (define-skeleton tex-insert-braces
   "Make a pair of braces and be poised to type inside of them."