Index: auctex/font-latex.el
diff -u auctex/font-latex.el:5.147 auctex/font-latex.el:5.148
--- auctex/font-latex.el:5.147 Sat Feb 4 14:40:10 2006
+++ auctex/font-latex.el Mon Apr 17 14:09:21 2006
@@ -1449,15 +1449,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\\{}]\\|" "\\\\"
- "\\([EMAIL PROTECTED]|[^ \t\n]\\)" "\\|"
- "{\\(?:[^{}\\]\\|\\\\.\\|{[^}]*}\\)*" "}\\)"))
- limit t)))
+ (when (and font-latex-fontify-script
+ (re-search-forward "[_^] *\\([^\n\\{}]\\|\
+\\\\\\([EMAIL PROTECTED]|[^ \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.
_______________________________________________
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs