aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2004-12-03 22:22:24 +0000
committerStefan Monnier2004-12-03 22:22:24 +0000
commit35dccc628789210230c6d655e38c5eaac2291333 (patch)
treec3f170a7884d141fa0ff8ff9e4c3c626ff9c2377
parentd8f96db8dacbda24147aeab0af1c74f5ddbec8bb (diff)
downloademacs-35dccc628789210230c6d655e38c5eaac2291333.tar.gz
emacs-35dccc628789210230c6d655e38c5eaac2291333.zip
(tex-validate-region): Obey syntax-table text properties.
-rw-r--r--lisp/textmodes/tex-mode.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 91b3d2afdfd..f6f4c63fdc3 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -1190,14 +1190,14 @@ area if a mismatch is found."
1190 (forward-sexp 1)) 1190 (forward-sexp 1))
1191 ;; Now check that like matches like. 1191 ;; Now check that like matches like.
1192 (goto-char start) 1192 (goto-char start)
1193 (while (progn (skip-syntax-forward "^(") 1193 (while (re-search-forward "\\s(" nil t)
1194 (not (eobp))) 1194 (save-excursion
1195 (let ((match (matching-paren (following-char)))) 1195 (let ((pos (match-beginning 0)))
1196 (save-excursion 1196 (goto-char pos)
1197 (forward-sexp 1) 1197 (forward-sexp 1)
1198 (or (= (preceding-char) match) 1198 (or (eq (preceding-char) (cdr (syntax-after pos)))
1199 (error "Mismatched parentheses")))) 1199 (eq (char-after pos) (cdr (syntax-after (1- (point)))))
1200 (forward-char 1))) 1200 (error "Mismatched parentheses"))))))
1201 (error 1201 (error
1202 (skip-syntax-forward " .>") 1202 (skip-syntax-forward " .>")
1203 (setq failure-point (point))))) 1203 (setq failure-point (point)))))