branch: externals/auctex
commit dbc1fa09d37b5ce9b73e92548c311c87ab66da0f
Author: Arash Esbati <[email protected]>
Commit: Arash Esbati <[email protected]>
Support new kernel macros \Ref and \labelformat
* font-latex.el (font-latex-built-in-keyword-classes): Add \Ref to
reference and \labelformat to function class.
* latex.el (LaTeX-common-initialization): Add support for \Ref and
\labelformat which are part of LaTeX kernel 2019-10-01 release.
---
font-latex.el | 6 ++++--
latex.el | 3 +++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/font-latex.el b/font-latex.el
index 486f39f..4df9526 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -340,7 +340,7 @@ variable `font-latex-fontify-sectioning'." ',num)
font-lock-constant-face 2 command)
("reference"
(("nocite" "*{") ("cite" "*[[{") ("label" "{") ("pageref" "{")
- ("vref" "*{") ("eqref" "{") ("ref" "{") ("include" "{")
+ ("vref" "*{") ("eqref" "{") ("ref" "{") ("Ref" "{") ("include" "{")
("input" "{") ("bibliography" "{") ("index" "{") ("glossary" "{")
("footnote" "[{") ("footnotemark" "[") ("footnotetext" "[{")
("marginpar" "[{"))
@@ -356,7 +356,9 @@ variable `font-latex-fontify-sectioning'." ',num)
("newcounter" "{[") ("renewenvironment" "*{[[{{")
("renewcommand" "*|{\\[[{") ("renewtheorem" "{[{[")
("usepackage" "[{[") ("fbox" "{") ("mbox" "{") ("rule" "[{{")
- ("addvspace" "{") ("vspace" "*{") ("hspace" "*{") ("thinspace" "")
("negthinspace" "")
+ ("addvspace" "{") ("vspace" "*{") ("hspace" "*{")
+ ("thinspace" "") ("negthinspace" "")
+ ("labelformat" "{{")
;; XXX: Should macros without arguments rather be listed in a
;; separate category with 'noarg instead of 'command handling?
("enspace" "") ("enskip" "") ("quad" "") ("qquad" "") ("nonumber" "")
diff --git a/latex.el b/latex.el
index 602e2df..b4cf54f 100644
--- a/latex.el
+++ b/latex.el
@@ -6222,6 +6222,9 @@ function would return non-nil and `(match-string 1)'
would return
'("label" TeX-arg-define-label)
'("pageref" TeX-arg-ref)
'("ref" TeX-arg-ref)
+ ;; \Ref and \labelformat are part of kernel with LaTeX 2019-10-01:
+ '("Ref" TeX-arg-ref)
+ '("labelformat" TeX-arg-counter t)
'("newcommand" TeX-arg-define-macro [ TeX-arg-define-macro-arguments ] t)
'("renewcommand" TeX-arg-macro [ TeX-arg-define-macro-arguments ] t)
'("newenvironment" TeX-arg-define-environment