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


From: Ralf Angeli
Subject: [AUCTeX-diffs] Changes to auctex/font-latex.el,v
Date: Tue, 18 Jul 2006 21:18:09 +0000

CVSROOT:        /cvsroot/auctex
Module name:    auctex
Changes by:     Ralf Angeli <angeli>    06/07/18 21:18:09

Index: font-latex.el
===================================================================
RCS file: /cvsroot/auctex/auctex/font-latex.el,v
retrieving revision 5.157
retrieving revision 5.158
diff -u -b -r5.157 -r5.158
--- font-latex.el       5 Jun 2006 20:18:31 -0000       5.157
+++ font-latex.el       18 Jul 2006 21:18:09 -0000      5.158
@@ -1500,12 +1500,21 @@
   (when (and font-latex-fontify-script
             (re-search-forward "[_^] *\\([^\n\\{}]\\|\
 \\\\\\(address@hidden|[^ \t\n]\\)\\|\\({\\)\\)" limit t))
+    (if (font-latex-faces-present-p
+        (if (string= (substring (match-string 0) 0 1) "_")
+            '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)))
        (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]