]> git.eshelyaron.com Git - emacs.git/commitdiff
(tex-validate-region): Obey syntax-table text properties.
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 3 Dec 2004 22:22:24 +0000 (22:22 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 3 Dec 2004 22:22:24 +0000 (22:22 +0000)
lisp/textmodes/tex-mode.el

index 91b3d2afdfd6f20e60bb8885483b283efa6c1120..f6f4c63fdc37432525f6b40a95d67418a2dac045 100644 (file)
@@ -1190,14 +1190,14 @@ area if a mismatch is found."
              (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)))))