[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 841d4cb 45/95: Unify treatment of face argument
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 841d4cb 45/95: Unify treatment of face argument over the relevant functions. |
Date: |
Sun, 16 Apr 2017 01:26:52 -0400 (EDT) |
branch: externals/auctex
commit 841d4cb34755a45f544f87af4ce25ef50f964e4b
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>
Unify treatment of face argument over the relevant functions.
* font-latex.el (font-latex-keyword-matcher): Conform the face
argument correctly to the format `font-lock-keywords' requires.
(font-latex-make-user-keywords) : Call `font-latex-make-match-defun'
directly without `eval'.
(font-latex-deactivated-keyword-classes) : Accept a face symbol, as
well as a form returning a face symbol, for the third element for each
item of `font-latex-built-in-keyword-classes'.
(font-latex-built-in-keyword-classes) : Remove quoting from the face
names. Contrary to the sentence of the doc string
"The third element is the symbol of a face to be used or a Lisp
form returning a face symbol.", symbol of a face was invalid due to
the above bugs.
---
font-latex.el | 47 ++++++++++++++++++++++++++---------------------
1 file changed, 26 insertions(+), 21 deletions(-)
diff --git a/font-latex.el b/font-latex.el
index a43b0bf..672dd46 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -286,7 +286,7 @@ variable `font-latex-fontify-sectioning'." ',num)
("nopagebreak" "pagebreak" "newpage" "clearpage" "cleardoublepage"
"enlargethispage" "nolinebreak" "linebreak" "newline" "-" "\\" "\\*"
"appendix" "displaybreak" "allowdisplaybreaks" "include")
- 'font-latex-warning-face 1 noarg)
+ font-latex-warning-face 1 noarg)
("variable"
(("setlength" "|{\\{") ("settowidth" "|{\\{") ("settoheight" "{{")
("settodepth" "{{") ("setcounter" "{|{\\")
@@ -294,10 +294,10 @@ variable `font-latex-fontify-sectioning'." ',num)
("stepcounter" "{") ("refstepcounter" "{")
("arabic" "{") ("roman" "{") ("Roman" "{") ("alph" "{") ("Alph" "{")
("fnsymbol" "{"))
- 'font-lock-variable-name-face 2 command)
+ font-lock-variable-name-face 2 command)
("biblatexnoarg"
("newrefsegment" "mancite" "pno" "ppno" "nopp" "psq" "psqq")
- 'font-lock-variable-name-face 2 noarg)
+ font-lock-variable-name-face 2 noarg)
("biblatex"
(("newrefsection" "[") ("ExecuteBibliographyOptions" "[{")
("printbibliography" "[") ("printshorthands" "[") ("printbibheading" "[")
@@ -322,13 +322,13 @@ variable `font-latex-fontify-sectioning'." ',num)
("cites" "(([[{") ("Cites" "(([[{") ("parencites" "(([[{") ("Parencites"
"(([[{")
("footcites" "(([[{") ("footcitetexts" "(([[{") ("smartcites" "(([[{")
("Smartcites" "(([[{") ("textcites" "(([[{") ("Textcites" "(([[{")
("supercites" "(([[{"))
- 'font-lock-constant-face 2 command)
+ font-lock-constant-face 2 command)
("reference"
(("nocite" "*{") ("cite" "*[[{") ("label" "{") ("pageref" "{")
("vref" "*{") ("eqref" "{") ("ref" "{") ("include" "{")
("input" "{") ("bibliography" "{") ("index" "{") ("glossary" "{")
("footnote" "[{") ("footnotemark" "[") ("footnotetext" "[{"))
- 'font-lock-constant-face 2 command)
+ font-lock-constant-face 2 command)
("function"
(("begin" "{") ("end" "{") ("pagenumbering" "{")
("thispagestyle" "{") ("pagestyle" "{") ("nofiles" "")
@@ -345,7 +345,7 @@ variable `font-latex-fontify-sectioning'." ',num)
;; separate category with 'noarg instead of 'command handling?
("enspace" "") ("enskip" "") ("quad" "") ("qquad" "") ("nonumber" "")
("centering" "") ("TeX" "") ("LaTeX" ""))
- 'font-lock-function-name-face 2 command)
+ font-lock-function-name-face 2 command)
("sectioning-0"
(("part" "*[{"))
(if (eq font-latex-fontify-sectioning 'color)
@@ -383,36 +383,36 @@ variable `font-latex-fontify-sectioning'." ',num)
'font-lock-type-face
'font-latex-sectioning-5-face)
2 command)
- ("slide-title" () 'font-latex-slide-title-face 2 command)
+ ("slide-title" () font-latex-slide-title-face 2 command)
("textual"
(("item" "[") ("title" "{") ("author" "{") ("date" "{")
("thanks" "{") ("address" "{") ("caption" "[{")
("textsuperscript" "{") ("textsubscript" "{"))
- 'font-lock-type-face 2 command)
+ font-lock-type-face 2 command)
("bold-command"
(("textbf" "{") ("textsc" "{") ("textup" "{") ("boldsymbol" "{")
("pmb" "{"))
- 'font-latex-bold-face 1 command)
+ font-latex-bold-face 1 command)
("italic-command"
(("emph" "{") ("textit" "{") ("textsl" "{"))
- 'font-latex-italic-face 1 command)
+ font-latex-italic-face 1 command)
("math-command"
(("ensuremath" "|{\\"))
- 'font-latex-math-face 1 command)
+ font-latex-math-face 1 command)
("type-command"
(("texttt" "{") ("textsf" "{") ("textrm" "{") ("textmd" "{"))
- 'font-lock-type-face 1 command)
+ font-lock-type-face 1 command)
("bold-declaration"
("bf" "bfseries" "sc" "scshape" "upshape")
- 'font-latex-bold-face 1 declaration)
+ font-latex-bold-face 1 declaration)
("italic-declaration"
("em" "it" "itshape" "sl" "slshape")
- 'font-latex-italic-face 1 declaration)
+ font-latex-italic-face 1 declaration)
("type-declaration"
("tt" "ttfamily" "sf" "sffamily" "rm" "rmfamily" "mdseries"
"tiny" "scriptsize" "footnotesize" "small" "normalsize"
"large" "Large" "LARGE" "huge" "Huge")
- 'font-lock-type-face 1 declaration))
+ font-lock-type-face 1 declaration))
"Built-in keywords and specifications for font locking.
The first element of each item is the name of the keyword class.
@@ -457,7 +457,10 @@ You have to restart Emacs for a change of this variable to
take effect."
(mapconcat 'identity name " "))
" keywords in `"
;; Name of the face
- (symbol-name (eval (nth 2 spec))) "'.\n"
+ (symbol-name
+ (let ((face (nth 2 spec)))
+ (if (symbolp face) face (eval face))))
+ "'.\n"
;; List of keywords
(with-temp-buffer
(insert " Keywords: "
@@ -535,6 +538,11 @@ construct to be highlighted. Currently the symbols
'command,
This is a helper function for `font-latex-make-built-in-keywords'
and `font-latex-make-user-keywords' and not intended for general
use."
+ ;; Quote a list of face attributes and a face symbol
+ ;; but do not quote a form returning such value.
+ (unless (and (listp face) (fboundp (car face)))
+ (setq face `',face))
+
;; In an earlier version of font-latex the type could be a list like
;; (command 1). This indicated a macro with one argument. Provide
;; a matcher in this case but don't actually support it.
@@ -550,10 +558,7 @@ use."
(7 (font-latex-matched-face 7) append t)))
((eq type 'noarg)
`(,(intern (concat prefix name))
- ;; Quote a list of face properties but do not to quote a face symbol.
- (0 ,(if (and (listp face) (not (fboundp (car face))))
- `',face
- face))))
+ (0 ,face)))
((eq type 'declaration)
`(,(intern (concat prefix name))
(0 'font-latex-warning-face t t)
@@ -789,7 +794,7 @@ use \\[customize] or restart Emacs."
Generated by `font-latex-make-user-keywords'.")))
;; defun font-latex-match-*
- (eval `(font-latex-make-match-defun prefix name '',face type))
+ (font-latex-make-match-defun prefix name face type)
;; Add the matcher to `font-latex-keywords-2'.
(add-to-list 'font-latex-keywords-2
- [elpa] externals/auctex 77974e6 71/95: * style/minted.el ("minted"): Add key=val query for \mint and \mintinline., (continued)
- [elpa] externals/auctex 77974e6 71/95: * style/minted.el ("minted"): Add key=val query for \mint and \mintinline., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 43b07d9 70/95: Use `TeX-line-number-at-pos' further for older emacsen, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 9e7f21e 69/95: Use compatibility function `TeX-line-number-at-pos' for older emacsen, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex c360b9a 76/95: Adapt fontification for \lstinline, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 2182b6f 30/95: Append "lstlisting" to `LaTeX-label-alist', Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 337ce76 33/95: Add new keys for package version 4.00, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 6bb49cc 39/95: * style/subfiles.el (LaTeX-subfiles-class-options): New function., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 4992f5a 46/95: Make customization to face specification to appear in, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex c97a654 48/95: * tex-ispell.el (TeX-ispell-skip-setcdr): Add entry for filecontents package., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 0dc770d 42/95: Prevent infinite loop in TeX-command-expand, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 841d4cb 45/95: Unify treatment of face argument over the relevant functions.,
Tassilo Horn <=
- [elpa] externals/auctex 72a6943 54/95: Add fallback for indentation when & is omitted, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 8fdc494 63/95: ; Provide fallback when no locale information is available, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 9d12a06 66/95: Use `TeX-replace-regexp-in-string' in style files, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex a71a72d 74/95: Add support for Japanese font command, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 88a7563 81/95: Fix last improvement for skipping of inline verbatim macros, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 16f24dd 90/95: ; * style/minted.el (LaTeX-minted-add-syntactic-keywords-extra): Fix doc string., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex a46c307 77/95: Improve fontification of verbatim macros in style/minted.el, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 83890d6 86/95: Update package options in style/amsmath.el, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 94b227d 89/95: * doc/auctex.texi (Selecting a Command): Document `TeX-ispell-verb-delimiters'., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 4225941 59/95: Modify `TeX-expand-list-builtin' instead of `TeX-expand-list', Tassilo Horn, 2017/04/16