auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] Changes to auctex/font-latex.el [multiline-font-lock]


From: Ralf Angeli
Subject: [AUCTeX-diffs] Changes to auctex/font-latex.el [multiline-font-lock]
Date: Tue, 09 May 2006 21:57:26 +0000

Index: auctex/font-latex.el
diff -u auctex/font-latex.el:5.147.2.2 auctex/font-latex.el:5.147.2.3
--- auctex/font-latex.el:5.147.2.2      Sun Apr  2 11:13:39 2006
+++ auctex/font-latex.el        Tue May  9 21:57:26 2006
@@ -1267,6 +1267,7 @@
                    (closing-tag (string-to-char (substring spec 1 2)))
                    match-beg)
                (setq spec (substring spec 2))
+               (while (and (not (eobp)) (font-latex-forward-comment)))
                (if (eq opening-tag ?\{)
                    ;; Mandatory arguments {...}
                    (if (eq (following-char) opening-tag)
@@ -1503,7 +1504,8 @@
   (catch 'match
     (while (re-search-forward font-latex-quote-regexp-beg limit t)
       (unless (font-latex-faces-present-p '(font-lock-comment-face
-                                           font-latex-verbatim-face)
+                                           font-latex-verbatim-face
+                                           font-latex-math-face)
                                          (match-beginning 0))
        (let* ((beg (match-beginning 0))
               (after-beg (match-end 0))
@@ -1568,15 +1570,16 @@
 
 (defun font-latex-match-script (limit)
   "Match subscript and superscript patterns up to LIMIT."
-  (when font-latex-fontify-script
-    (re-search-forward
-     (eval-when-compile
-       ;; Regexp taken from `tex-font-lock-keywords-3' from
-       ;; tex-mode.el in GNU Emacs on 2004-07-07.
-       (concat "[_^] *\\([^\n\\{}]\\|" "\\\\"
-              "\\(address@hidden|[^ \t\n]\\)" "\\|"
-              "{\\(?:[^{}\\]\\|\\\\.\\|{[^}]*}\\)*" "}\\)"))
-     limit t)))
+  (when (and font-latex-fontify-script
+            (re-search-forward "[_^] *\\([^\n\\{}]\\|\
+\\\\\\(address@hidden|[^ \t\n]\\)\\|\\({\\)\\)" limit t))
+    (when (match-end 3)
+      (let ((beg (match-beginning 3))
+           (end (TeX-find-closing-brace)))
+       (store-match-data (if end
+                             (list (match-beginning 0) end beg end)
+                           (list beg beg beg beg)))))
+    t))
 
 ;; Copy and adaption of `tex-font-lock-suscript' from tex-mode.el in
 ;; GNU Emacs on 2004-07-07.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]