[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 57338ec5c37b84d3407f6
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 57338ec5c37b84d3407f6068274662c6258780f2 |
Date: |
Thu, 03 Sep 2015 17:37:04 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".
The branch, master has been updated
via 57338ec5c37b84d3407f6068274662c6258780f2 (commit)
from 08ab3c10d51f0956e8faca2c85f5e0d38bee4303 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 57338ec5c37b84d3407f6068274662c6258780f2
Author: Tassilo Horn <address@hidden>
Date: Thu Sep 3 19:36:45 2015 +0200
Improve my last commit
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
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 2 +-
font-latex.el | 35 ++++++++++++++++++-----------------
2 files changed, 19 insertions(+), 18 deletions(-)
hooks/post-receive
--
GNU AUCTeX
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 57338ec5c37b84d3407f6068274662c6258780f2,
Tassilo Horn <=