[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 57338ec 24/78: Improve my last commit
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 57338ec 24/78: Improve my last commit |
Date: |
Mon, 19 Oct 2015 09:10:47 +0000 |
branch: externals/auctex
commit 57338ec5c37b84d3407f6068274662c6258780f2
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>
Improve my last commit
---
ChangeLog | 2 +-
font-latex.el | 35 ++++++++++++++++++-----------------
2 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 703db99..53a7c0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,7 +7,7 @@
(font-latex-match-script): Use it.
(font-latex-make-user-keywords): Add font-lock entry for script
signs.
- (font-latex-script-invisible): New function.
+ (font-latex-match-script-chars): New function.
* tex.el (TeX-tex-mode): Don't ignore case when matching the
TeX-format-list regexes.
diff --git a/font-latex.el b/font-latex.el
index 0df8a96..eefa849 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -819,7 +819,8 @@ Generated by `font-latex-make-user-keywords'.")))
(0 'font-latex-sedate-face append))
(font-latex-match-script
(1 (font-latex-script (match-beginning 0)) append))
- ("[_^]" (0 (font-latex-script-invisible (match-beginning 0)) t))))
+ (font-latex-match-script-chars
+ (0 '(face font-latex-math-face invisible t)))))
(add-to-list 'font-latex-keywords-2 item t)))
(font-latex-make-user-keywords)
@@ -1891,6 +1892,22 @@ END marks boundaries for searching for quotation ends."
(list beg beg beg beg))))))
t))
+(defun font-latex-match-script-chars (limit)
+ (and (eq font-latex-fontify-script 'invisible)
+ (re-search-forward "[_^]" limit t)
+ (let ((pos (match-beginning 0)))
+ (and (font-latex-faces-present-p 'font-latex-math-face pos)
+ (not (font-latex-faces-present-p '(font-lock-constant-face
+ font-lock-builtin-face
+ font-lock-comment-face
+ font-latex-verbatim-face) pos))
+ ;; Check for backslash quoting
+ (not (let ((odd nil)
+ (pos pos))
+ (while (eq (char-before pos) ?\\)
+ (setq pos (1- pos) odd (not odd)))
+ odd))))))
+
;; Copy and adaption of `tex-font-lock-suscript' from tex-mode.el in
;; GNU Emacs on 2004-07-07.
(defun font-latex-script (pos)
@@ -1923,22 +1940,6 @@ END marks boundaries for searching for quotation ends."
,(cdr font-latex-script-display))
'font-latex-superscript-face)))))
-(defun font-latex-script-invisible (pos)
- "Make the super/subscript sign invisible."
- (when (and (eq font-latex-fontify-script 'invisible)
- (font-latex-faces-present-p 'font-latex-math-face pos)
- (not (font-latex-faces-present-p '(font-lock-constant-face
- font-lock-builtin-face
- font-lock-comment-face
- font-latex-verbatim-face) pos))
- ;; Check for backslash quoting
- (not (let ((odd nil)
- (pos pos))
- (while (eq (char-before pos) ?\\)
- (setq pos (1- pos) odd (not odd)))
- odd)))
- `(face nil invisible t)))
-
;;; docTeX
(defvar font-latex-doctex-preprocessor-face
- [elpa] externals/auctex c896f96 05/78: Fix the subgroup number in a regex., (continued)
- [elpa] externals/auctex c896f96 05/78: Fix the subgroup number in a regex., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 5b0b215 03/78: Setup preview menu/keymap only once., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 2648a58 06/78: New function to read labels., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex be9f14a 02/78: Add the missing starred version of \AddEnumerateCounter., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 30be9cc 09/78: Add support for prettify-symbols-mode, Tassilo Horn, 2015/10/19
- [elpa] externals/auctex eff71a7 10/78: Change | syntax to punctuation; fixes bug#21366, Tassilo Horn, 2015/10/19
- [elpa] externals/auctex a4d23f6 07/78: Add menu and new functions for error overview., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex a85d7c6 15/78: Add support for undocumented macros `\captionbox[*]'., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex a3e3ab8 14/78: Add new style transparent.el., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 8d5acb0 13/78: Do not indent the content of `filecontents[*]' env., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 57338ec 24/78: Improve my last commit,
Tassilo Horn <=
- [elpa] externals/auctex 400609e 18/78: New TeX--if-macro-fboundp compatibility macro, Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 08ab3c1 23/78: Allow hiding ^ and _ script signs, Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 0b3a6e8 12/78: Do not indent the content of `Form' environment., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 40963e5 08/78: Check engine before running LaTeX command., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 33cee84 19/78: Allow TeX-command-sequence to process the region, Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 513490f 22/78: Implement multi-level script fontification, Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 76eb240 25/78: Docfix, Tassilo Horn, 2015/10/19
- [elpa] externals/auctex a07f436 16/78: Implement TeX-update., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex dbc87df 17/78: Generate PDF via dvips+ps2pdf., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex dd9adef 21/78: Case-sensitive mode detection + AMS-TeX fixes, Tassilo Horn, 2015/10/19