changeset 58753:b854b191862d

(tex-validate-region): Obey syntax-table text properties.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 03 Dec 2004 22:22:24 +0000
parents 4ad0594e1ac4
children b41534d7c63c
files lisp/textmodes/tex-mode.el
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/tex-mode.el	Fri Dec 03 17:00:11 2004 +0000
+++ b/lisp/textmodes/tex-mode.el	Fri Dec 03 22:22:24 2004 +0000
@@ -1190,14 +1190,14 @@
 	      (forward-sexp 1))
 	    ;; Now check that like matches like.
 	    (goto-char start)
-	    (while (progn (skip-syntax-forward "^(")
-			  (not (eobp)))
-	      (let ((match (matching-paren (following-char))))
-		(save-excursion
+	    (while (re-search-forward "\\s(" nil t)
+	      (save-excursion
+		(let ((pos (match-beginning 0)))
+		  (goto-char pos)
 		  (forward-sexp 1)
-		  (or (= (preceding-char) match)
-		      (error "Mismatched parentheses"))))
-	      (forward-char 1)))
+		  (or (eq (preceding-char) (cdr (syntax-after pos)))
+		      (eq (char-after pos) (cdr (syntax-after (1- (point)))))
+		      (error "Mismatched parentheses"))))))
 	(error
 	 (skip-syntax-forward " .>")
 	 (setq failure-point (point)))))