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, v [multiline-font-lock]


From: Ralf Angeli
Subject: [AUCTeX-diffs] Changes to auctex/font-latex.el, v [multiline-font-lock]
Date: Sat, 05 Aug 2006 20:45:03 +0000

CVSROOT:        /cvsroot/auctex
Module name:    auctex
Branch:         multiline-font-lock
Changes by:     Ralf Angeli <angeli>    06/08/05 20:45:03

Index: font-latex.el
===================================================================
RCS file: /cvsroot/auctex/auctex/font-latex.el,v
retrieving revision 5.147.2.5
retrieving revision 5.147.2.6
diff -u -b -r5.147.2.5 -r5.147.2.6
--- font-latex.el       18 Jun 2006 14:55:14 -0000      5.147.2.5
+++ font-latex.el       5 Aug 2006 20:45:02 -0000       5.147.2.6
@@ -1556,7 +1556,7 @@
   (font-latex-update-quote-list)
   ;; Search for matches.
   (catch 'match
-    (while (re-search-forward font-latex-quote-regexp-beg limit t)
+    (while (TeX-re-search-forward-unescaped font-latex-quote-regexp-beg limit 
t)
       (unless (font-latex-faces-present-p '(font-lock-comment-face
                                            font-latex-verbatim-face
                                            font-latex-math-face)
@@ -1627,12 +1627,23 @@
   (when (and font-latex-fontify-script
             (re-search-forward "[_^] *\\([^\n\\{}]\\|\
 \\\\\\(address@hidden|[^ \t\n]\\)\\|\\({\\)\\)" limit t))
+    (if (font-latex-faces-present-p '(font-latex-subscript-face
+                                     font-latex-superscript-face))
+       ;; Apply subscript and superscript highlighting only once in
+       ;; order to prevent the font size becoming too small.  We set
+       ;; an empty match to do that.
+       (let ((point (point)))
+         (store-match-data (list point point point point)))
     (when (match-end 3)
       (let ((beg (match-beginning 3))
-           (end (TeX-find-closing-brace)))
+             (end (TeX-find-closing-brace
+                   ;; Don't match groups spanning more than one line
+                   ;; in order to avoid visually wrong indentation in
+                   ;; subsequent lines.
+                   nil (line-end-position))))
        (store-match-data (if end
                              (list (match-beginning 0) end beg end)
-                           (list beg beg beg beg)))))
+                             (list beg beg beg beg))))))
     t))
 
 ;; Copy and adaption of `tex-font-lock-suscript' from tex-mode.el in




reply via email to

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