[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] Changes to auctex/font-latex.el,v
From: |
Ralf Angeli |
Subject: |
[AUCTeX-diffs] Changes to auctex/font-latex.el,v |
Date: |
Sun, 02 Nov 2008 14:02:10 +0000 |
CVSROOT: /cvsroot/auctex
Module name: auctex
Changes by: Ralf Angeli <angeli> 08/11/02 14:02:10
Index: font-latex.el
===================================================================
RCS file: /cvsroot/auctex/auctex/font-latex.el,v
retrieving revision 5.187
retrieving revision 5.188
diff -u -b -r5.187 -r5.188
--- font-latex.el 28 Jun 2008 14:22:46 -0000 5.187
+++ font-latex.el 2 Nov 2008 14:02:10 -0000 5.188
@@ -1571,16 +1571,18 @@
(while (re-search-forward "\\(\\\\(\\)\\|\\(\\\\\\[\\)" limit t)
(unless (save-excursion
(goto-char (match-beginning 0))
- (eq (preceding-char) ?\\)) ; \\[ is not a math environment
+ ;; \\[ does not start a math environment
+ (/= (mod (skip-chars-backward "\\\\") 2) 0))
(let ((beg (match-beginning 0))
(open-tag (if (match-beginning 1) "\\(" "\\["))
(close-tag (if (match-beginning 1) "\\)" "\\]")))
;; Search for both opening and closing tags in order to be
;; able to avoid erroneously matching stuff like "\(foo \(bar\)".
- (if (and (re-search-forward (concat (regexp-quote open-tag) "\\|"
- (regexp-quote close-tag))
+ (if (and (re-search-forward (concat "[^\\]\\(?:\\\\\\\\\\)*\\("
+ (regexp-quote open-tag) "\\|"
+ (regexp-quote close-tag) "\\)")
limit 'move)
- (string= (match-string 0) close-tag))
+ (string= (match-string 1) close-tag))
;; Found closing tag.
(progn
(font-latex-put-multiline-property-maybe beg (point))
@@ -1599,8 +1601,13 @@
(goto-char end)
(catch 'extend
(while (re-search-backward "\\(\\\\)\\)\\|\\(\\\\]\\)" beg t)
- (when (and (search-backward (if (match-beginning 1) "\\(" "\\[")
+ (when (and (zerop (mod (skip-chars-backward "\\\\") 2))
+ (re-search-backward
+ (concat "[^\\]\\(?:\\\\\\\\\\)*\\("
+ (regexp-quote (if (match-beginning 1) "\\(" "\\["))
+ "\\)")
(- beg font-latex-multiline-boundary) t)
+ (goto-char (match-beginning 1))
(< (point) beg))
(throw 'extend (point))))
nil)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX-diffs] Changes to auctex/font-latex.el,v,
Ralf Angeli <=