[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex ccec850 24/57: Remove multi-level/invisible feat
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex ccec850 24/57: Remove multi-level/invisible feature of font-latex-fontify-script |
Date: |
Wed, 11 Jan 2017 18:01:39 +0000 (UTC) |
branch: externals/auctex
commit ccec8501960a448dd8faccaae54dfd9839a37c30
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>
Remove multi-level/invisible feature of font-latex-fontify-script
* font-latex.el (font-latex-make-user-keywords,font-latex-script-display)
(font-latex-script): Remove multi-level/invisible feature of
font-latex-fontify-script.
(font-latex-doctex-preprocessor-face): Remove function.
* doc/auctex.texi (Fontification of math): Remove documentation for
font-latex-fontify-script's multi-level and invisible values.
---
doc/auctex.texi | 15 +++------------
font-latex.el | 57 ++++++++++---------------------------------------------
2 files changed, 13 insertions(+), 59 deletions(-)
diff --git a/doc/auctex.texi b/doc/auctex.texi
index e371899..3c3c293 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -2196,18 +2196,9 @@ variables @code{font-latex-fontify-script} and
If non-nil, fontify subscript and superscript strings. Concretely, this
means that the scripts are raised or lowered.
-Another possiblity is setting this variable to the symbol
address@hidden In this case, in a formula @code{x^y^z}, y is
-raised above x, and z is raised above y. With many script levels, the
-text might become too small to be readable.
-
-Lastly, you can set this variable to @code{invisible} whose behavior is
-like @code{multi-level}, and in addition the super-/subscript characters
address@hidden and @code{_} are not displayed.
-
-Note that this feature is not available on XEmacs, for which
-it is disabled per default. In GNU Emacs raising and lowering is not
-enabled for versions 21.3 and before due to it working not properly.
+Note that this feature is not available on XEmacs, for which it is
+disabled per default. In GNU Emacs raising and lowering is not enabled
+for versions 21.3 and before due to it working not properly.
@end defopt
@defopt font-latex-script-display
diff --git a/font-latex.el b/font-latex.el
index 896c6af..1e96c00 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -810,7 +810,7 @@ Generated by `font-latex-make-user-keywords'.")))
(add-to-list 'font-latex-keywords-1 item)
(add-to-list 'font-latex-keywords-2 item))
(dolist (item
- `((font-latex-match-math-env
+ '((font-latex-match-math-env
(0 'font-latex-warning-face t t)
(1 'font-latex-math-face append t))
(font-latex-match-math-envII
@@ -818,9 +818,7 @@ Generated by `font-latex-make-user-keywords'.")))
(font-latex-match-simple-command
(0 'font-latex-sedate-face append))
(font-latex-match-script
- (1 (font-latex-script (match-beginning 0)) append))
- (font-latex-match-script-chars
- (0 '(face font-latex-math-face invisible t)))))
+ (1 (font-latex-script (match-beginning 0)) append))))
(add-to-list 'font-latex-keywords-2 item t)))
(font-latex-make-user-keywords)
@@ -852,28 +850,10 @@ locking machinery will be triggered."
(defcustom font-latex-fontify-script (not (featurep 'xemacs))
"If non-nil, fontify subscript and superscript strings.
-This feature does not work in XEmacs.
-
-By default, super/subscripts are raised/lowered if this variable
-is non-nil. This fontification only affects one level of
-scripts, e.g., in x^{y^z}, the y and the z have the same size and
-are equally raised over x.
-
-If this variable is set to the symbol `multi-level', then y is
-raised above x, and z is raised above y. With many script
-levels, the text might become too small to be readable.
-
-If this variable is set to the symbol `invisible', then the
-effect is essentially like `multi-level' but additionally the
-script operators ^ and _ are not displayed."
- :type '(choice (boolean :tag "Enabled")
- (const :tag "Multiple levels" multi-level)
- (const :tag "Hide ^ and _" invisible))
+This feature does not work in XEmacs."
+ :type 'boolean
:group 'font-latex)
-(put 'font-latex-fontify-script 'safe-local-variable
- (lambda (val)
- (or (TeX-booleanp val)
- (memq val '(multi-level invisible)))))
+(put 'font-latex-fontify-script 'safe-local-variable #'booleanp)
(defcustom font-latex-script-display '((raise -0.3) . (raise 0.3))
"Display specification for subscript and superscript content.
@@ -1915,12 +1895,11 @@ END marks boundaries for searching for quotation ends."
(when (and font-latex-fontify-script
(re-search-forward "[_^] *\\([^\n\\{}]\\|\
\\\\\\(address@hidden|[^ \t\n]\\)\\|\\({\\)\\)" limit t))
- (if (and (not (memq font-latex-fontify-script '(multi-level invisible)))
- (font-latex-faces-present-p '(font-latex-subscript-face
- font-latex-superscript-face)))
- ;; Apply subscript and superscript highlighting only once (in case
- ;; font-latex-fontify-script is not 'multi-level) in order to prevent
- ;; the font size becoming too small. We set an empty match to do that.
+ (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)
@@ -1935,22 +1914,6 @@ 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)
- [elpa] externals/auctex 8186490 06/57: Fix documentation of TeX-arg-file, (continued)
- [elpa] externals/auctex 8186490 06/57: Fix documentation of TeX-arg-file, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 01da194 23/57: ; * style/titletoc.el ("titletoc"): Use `TeX-arg-length'., Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 1addc62 30/57: Use RefTeX for multiple citations in biblatex, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 890163e 26/57: Bring back multi-level script font-locking, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 5ddbd04 12/57: Add new style/titleps.el, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 225bade 14/57: Add new style/titletoc.el, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 343ca9c 36/57: Fix script unfontification bug, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 501b0de 47/57: Use RefTeX for multiple references in cleveref, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex bfc7e90 16/57: Fix fontification for natbib compat macros, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 1de2359 13/57: Add new style/titlesec.el, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex ccec850 24/57: Remove multi-level/invisible feature of font-latex-fontify-script,
Tassilo Horn <=
- [elpa] externals/auctex 4c42f7a 25/57: Revert "Remove multi-level/invisible feature of font-latex-fontify-script", Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 4747c24 29/57: Simple docfix, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 69fc320 27/57: Add a newline only if \label is inserted, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 377a97a 32/57: Completion for math macros, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 0e54895 34/57: Improve completion docs, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 00df9a5 37/57: Check new custom option before activating RefTeX cite format, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 0766526 41/57: Don't use cl function copy-list, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex c70b7f9 21/57: Add new style/exam.sty, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex d185bcb 49/57: * Makefile.in (release-commit): Fix name of preview ChangeLog., Tassilo Horn, 2017/01/11
- [elpa] externals/auctex e9c4b68 35/57: ; * doc/auctex.texi (Completion): Use @defun and not @deffn., Tassilo Horn, 2017/01/11