~ubuntu-branches/ubuntu/lucid/auctex/lucid

« back to all changes in this revision

Viewing changes to font-latex.el

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-03-21 14:54:04 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080321145404-p1yrn1rfiyculi0n
Tags: 11.84-0ubuntu1
Upload to hardy. Freeze exception granted in LP: #103631

Show diffs side-by-side

added added

removed removed

Lines of Context:
1481
1481
          (regexp-opt (mapcar 'car font-latex-quote-list) t)))
1482
1482
  ;; Search for matches.
1483
1483
  (catch 'match
1484
 
    (while (re-search-forward font-latex-quote-regexp-beg limit t)
 
1484
    (while (TeX-re-search-forward-unescaped font-latex-quote-regexp-beg limit t)
1485
1485
      (unless (font-latex-faces-present-p '(font-lock-comment-face
1486
1486
                                            font-latex-verbatim-face
1487
1487
                                            font-latex-math-face)
1500
1500
  (when (and font-latex-fontify-script
1501
1501
             (re-search-forward "[_^] *\\([^\n\\{}]\\|\
1502
1502
\\\\\\([a-zA-Z@]+\\|[^ \t\n]\\)\\|\\({\\)\\)" limit t))
1503
 
    (when (match-end 3)
1504
 
      (let ((beg (match-beginning 3))
1505
 
            (end (TeX-find-closing-brace)))
1506
 
        (store-match-data (if end
1507
 
                              (list (match-beginning 0) end beg end)
1508
 
                            (list beg beg beg beg)))))
 
1503
    (if (font-latex-faces-present-p '(font-latex-subscript-face
 
1504
                                      font-latex-superscript-face))
 
1505
        ;; Apply subscript and superscript highlighting only once in
 
1506
        ;; order to prevent the font size becoming too small.  We set
 
1507
        ;; an empty match to do that.
 
1508
        (let ((point (point)))
 
1509
          (store-match-data (list point point point point)))
 
1510
      (when (match-end 3)
 
1511
        (let ((beg (match-beginning 3))
 
1512
              (end (TeX-find-closing-brace
 
1513
                    ;; Don't match groups spanning more than one line
 
1514
                    ;; in order to avoid visually wrong indentation in
 
1515
                    ;; subsequent lines.
 
1516
                    nil (line-end-position))))
 
1517
          (store-match-data (if end
 
1518
                                (list (match-beginning 0) end beg end)
 
1519
                              (list beg beg beg beg))))))
1509
1520
    t))
1510
1521
 
1511
1522
;; Copy and adaption of `tex-font-lock-suscript' from tex-mode.el in