[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 6a298a8 47/95: Fix documents and add trivial imp
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 6a298a8 47/95: Fix documents and add trivial improvements. |
Date: |
Sun, 16 Apr 2017 01:26:52 -0400 (EDT) |
branch: externals/auctex
commit 6a298a874a572b33e14bf494e0374bdf78dd9eb6
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>
Fix documents and add trivial improvements.
* font-latex.el (font-latex-deactivated-keyword-classes): Add keyword
class biblatexnoarg, biblatex and slide-title to doc string.
Use `buffer-string'.
(font-latex-keyword-matcher): Mention that face attributes is accepted
as FACE argument in doc string.
(font-latex-make-built-in-keywords): Arrange doc string for generated
defvar of `font-latex-match-*-keywords-local' depending on the keyword
type.
Remove spurious type declaration from generated defcustom of
`font-latex-match-*-keywords'.
Replace meaningless argument with nil and add doc string for generated
defvar of `font-latex-match-*'.
Replace redundant call to intern with literal quote of symbol.
(font-latex-user-keyword-classes): Fix doc string. The accepted face
argument is face attribute rather than font specification.
Add doc string for generated defvar of `font-latex-match-*'.
(font-latex-make-user-keywords): Replace backquote with quote where
backquote is not necessary.
(font-latex-add-keywords): Add keyword class biblatexnoarg to doc
string.
* doc/auctex.texi (): Update copyright year.
(Deactivating defaults of built-in keyword classes): Add keyword
class biblatexnoarg, biblatex and slide-title.
Fix sample lisp code.
(User-defined keyword classes): The accepted face argument is face
attribute rather than font specification.
---
doc/auctex.texi | 17 ++++++++------
font-latex.el | 73 +++++++++++++++++++++++++++++++++------------------------
2 files changed, 53 insertions(+), 37 deletions(-)
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 13661c6..6410004 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -12,7 +12,7 @@ This manual is for @AUCTeX{}
(version @value{VERSION} from @value{UPDATED}),
a sophisticated TeX environment for Emacs.
-Copyright @copyright{} 1992-1995, 2001, 2002, 2004-2016
+Copyright @copyright{} 1992-1995, 2001, 2002, 2004-2017
Free Software Foundation, Inc.
@quotation
@@ -2137,10 +2137,11 @@ Face: @code{font-latex-type-face}
described above. You can disable these defaults per class by
customizing the variable @code{font-latex-deactivated-keyword-classes}.
This is a list of strings for keyword classes to be deactivated. Valid
-entries are "warning", "variable", "reference", "function" ,
-"sectioning-0", "sectioning-1", "sectioning-2", "sectioning-3",
-"sectioning-4", "sectioning-5", "textual", "bold-command",
-"italic-command", "math-command", "type-command", "bold-declaration",
+entries are "warning", "variable", "biblatexnoarg", "biblatex",
+"reference", "function" , "sectioning-0", "sectioning-1",
+"sectioning-2", "sectioning-3", "sectioning-4", "sectioning-5",
+"slide-title", "textual", "bold-command", "italic-command",
+"math-command", "type-command", "bold-declaration",
"italic-declaration", "type-declaration".
You can also get rid of certain keywords only. For example if you want
@@ -2151,7 +2152,9 @@ following stanza into your init file:
(eval-after-load "font-latex"
'(setq-default
font-latex-match-reference-keywords-local
- (remove "footnote" font-latex-match-reference-keywords-local)))
+ (remove (TeX-assoc-string "footnote"
+ font-latex-match-reference-keywords-local)
+ font-latex-match-reference-keywords-local)))
@end lisp
But note that this means fiddling with @fontlatex{}'s internals and is
@@ -2177,7 +2180,7 @@ covered by the keyword class. A keyword can either be a
simple command
name omitting the leading backslash or a list consisting of the command
name and a string specifying the sequence of arguments for the command.
-The face argument can either be an existing face or font specifications
+The face argument can either be an existing face or face attributes
made by you. (The latter option is not available on XEmacs.)
There are three alternatives for the type of keywords---``Command with
diff --git a/font-latex.el b/font-latex.el
index 906f0c7..a56d3ce 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -440,11 +440,13 @@ will match macros of the form \"\\foo[bar]{baz}\".")
(defcustom font-latex-deactivated-keyword-classes nil
"List of strings for built-in keyword classes to be deactivated.
-Valid entries are \"warning\", \"variable\", \"reference\",
-\"function\" , \"sectioning-0\", \"sectioning-1\", \"sectioning-2\",
-\"sectioning-3\", \"sectioning-4\", \"sectioning-5\", \"textual\",
-\"bold-command\", \"italic-command\", \"math-command\", \"type-command\",
-\"bold-declaration\", \"italic-declaration\", \"type-declaration\".
+Valid entries are \"warning\", \"variable\", \"biblatexnoarg\",
+\"biblatex\", \"reference\", \"function\" , \"sectioning-0\",
+\"sectioning-1\", \"sectioning-2\", \"sectioning-3\",
+\"sectioning-4\", \"sectioning-5\", \"slide-title\", \"textual\",
+\"bold-command\", \"italic-command\", \"math-command\",
+\"type-command\", \"bold-declaration\", \"italic-declaration\",
+\"type-declaration\".
You have to restart Emacs for a change of this variable to take effect."
:group 'font-latex-keywords
@@ -470,8 +472,7 @@ You have to restart Emacs for a change of this variable to
take effect."
x))
(nth 1 spec) ", "))
(fill-paragraph nil)
- (buffer-substring-no-properties
- (point-min) (point-max))))
+ (buffer-string)))
,(car spec)))
font-latex-built-in-keyword-classes)))
@@ -529,11 +530,12 @@ Generated by `font-latex-make-match-defun'.")
(defun font-latex-keyword-matcher (prefix name face type)
"Return a matcher and highlighter as required by `font-lock-keywords'.
PREFIX and NAME are strings which are concatenated to form the
-respective match function. FACE is a face name or a list of text
-properties that will be applied to the respective part of the
-match returned by the match function. TYPE is the type of
-construct to be highlighted. Currently the symbols 'command,
-'sectioning, 'declaration and 'noarg are valid.
+respective match function. FACE is a face name or a list of face
+attributes that will be applied to the respective part of the
+match returned by the match function. A lisp form returning a
+face name or a list of face attributes is also valid for FACE.
+TYPE is the type of construct to be highlighted. Currently the
+symbols 'command, 'declaration and 'noarg are valid.
This is a helper function for `font-latex-make-built-in-keywords'
and `font-latex-make-user-keywords' and not intended for general
@@ -579,14 +581,18 @@ use."
(eval `(defvar ,(intern (concat prefix name "-keywords-local"))
',keywords
,(concat "Buffer-local keywords to add to `"
- prefix name "-keywords'.
-
+ prefix name "-keywords'.\n\n"
+ (if (eq type 'command)
+ "\
This must be a list where each element is a list consisting of a
keyword string \(not a regular expression\) omitting the leading
-backslash and a format specifier as. The options for the format
-specifier are described in the doc string of
-`font-latex-user-keyword-classes'.
+backslash and a format specifier as described in the doc string of
+`font-latex-user-keyword-classes'."
+ "\
+This must be a list where each element is a keyword string \(not a
+regular expression\) omitting the leading backslash.")
+ "\n\n\
This is an internal variable which should not be set directly.
Use `font-latex-add-keywords' instead.
@@ -643,7 +649,6 @@ Setting this variable directly does not take effect; restart
Emacs.
Generated by `font-latex-make-built-in-keywords'.")
- :type '(repeat (string :tag "Keyword"))
:type '(repeat ,(if (eq type 'command)
'(list (string :tag "Keyword")
(string :tag "Format"))
@@ -654,8 +659,11 @@ Generated by `font-latex-make-built-in-keywords'.")
:group 'font-latex-keywords))
;; defvar font-latex-match-*
- (eval `(defvar ,(intern (concat prefix name))
- ,(intern (concat prefix name "-keywords"))))
+ (eval `(defvar ,(intern (concat prefix name)) nil
+ ,(concat "Regular expression to match " name
+ " keywords.
+
+Generated by `font-latex-make-built-in-keywords'")))
(make-variable-buffer-local (intern (concat prefix name)))
;; defun font-latex-match-*
@@ -668,7 +676,7 @@ Generated by `font-latex-make-built-in-keywords'.")
(number-to-string level)))
keywords-entry t)
(when (= level 1)
- (add-to-list (intern (concat "font-latex-keywords-2"))
+ (add-to-list 'font-latex-keywords-2
keywords-entry t))))))
(font-latex-make-built-in-keywords)
@@ -699,8 +707,8 @@ also specify two alternative arguments by prefixing them
with
\"|\". As an example, the specifier for \\newcommand is
\"*|{\\=\\[[{\".
-The face argument can either be an existing face or a font
-specification. (The latter option is not available in XEmacs.)
+The face argument can either be an existing face or a face
+attribute. (The latter option is not available in XEmacs.)
There are three alternatives for the class type:
@@ -760,7 +768,11 @@ restart Emacs."
(dolist (elt value)
(unless (boundp (intern (concat prefix (car elt))))
;; defvar font-latex-match-*
- (eval `(defvar ,(intern (concat prefix (car elt))) nil)))
+ (eval `(defvar ,(intern (concat prefix (car elt))) nil
+ ,(concat "Regular expression to match " (car elt)
+ " keywords.
+
+Generated by `font-latex-user-keyword-classes'"))))
(let ((keywords (nth 1 elt))
single-char-macro-flag)
(setq keywords (if (listp (car keywords))
@@ -815,7 +827,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
@@ -833,11 +845,12 @@ Generated by `font-latex-make-user-keywords'.")))
"Add KEYWORDS to CLASS.
KEYWORDS is a list of keywords or keywords with syntax specs.
CLASS corresponds to a keyword class and can be one of the
-symbols 'warning, 'variable, 'reference, 'biblatex, 'function,
-'sectioning-0, 'sectioning-1, 'sectioning-2, 'sectioning-3,
-'sectioning-4, 'sectioning-5, 'slide-title, 'textual,
-'bold-command, 'italic-command, 'math-command, 'type-command,
-'bold-declaration, 'italic-declaration or 'type-declaration.
+symbols 'warning, 'variable, 'reference, 'biblatexnoarg,
+'biblatex, 'function, 'sectioning-0, 'sectioning-1,
+'sectioning-2, 'sectioning-3, 'sectioning-4, 'sectioning-5,
+'slide-title, 'textual, 'bold-command, 'italic-command,
+'math-command, 'type-command, 'bold-declaration,
+'italic-declaration or 'type-declaration.
The keywords will be added to the buffer-local list of keywords
of the respective keyword class and necessary updates of the font
- [elpa] externals/auctex 4225941 59/95: Modify `TeX-expand-list-builtin' instead of `TeX-expand-list', (continued)
- [elpa] externals/auctex 4225941 59/95: Modify `TeX-expand-list-builtin' instead of `TeX-expand-list', Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 79361b5 58/95: Add new style/fvextra.el, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex d0908cb 51/95: Fix auto selection of japanese TeX engine, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex aac8694 67/95: Use compat function `TeX-replace-regexp-in-string' in core files, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 5a84d95 88/95: Fix `paragraph-start' and `paragraph-separate', Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 618bdf1 85/95: Append \b to regexp built from TeX control words, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 0cde29b 87/95: ; * tex-ispell.el (TeX-ispell-verb-delimiters): Remove `*'., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 07a2903 82/95: Don't alter standard value or saved value themselves of customize option, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 194a8f8 62/95: Add LaTeX inline math delimiters to Ispell skip list, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 7390999 61/95: ; Simplify insertion of a newline after label, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 6a298a8 47/95: Fix documents and add trivial improvements.,
Tassilo Horn <=
- [elpa] externals/auctex a286e8b 57/95: Improve parsing capabilities of style/fancyvrb.el, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 11e234b 55/95: Remove spurious entries of view settings., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 83a875b 83/95: ; * tex.el (TeX-ispell-tex-arg-verb-end): Drop unnecessary `format'., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 2116248 94/95: * doc/changes.texi: Update with recent changes., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 65e56e1 93/95: ; Make sure that `regex-opt' builds a shy group., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex e6c95e9 78/95: * tests/latex/fontification-verb-macros.tex: New file., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex a8dba19 60/95: Fix addition of key=val's, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 4688310 65/95: Add new compat function `TeX-replace-regexp-in-string', Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 6b5a7e0 56/95: Improve fallback for indentation when & is omitted, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 592297d 64/95: Avoid altering user option as much as possible, Tassilo Horn, 2017/04/16