branch: externals/auctex
commit bd2f3a806cee336fc94767ebc77f0e09264ad8cd
Author: Arash Esbati <[email protected]>
Commit: Arash Esbati <[email protected]>
Track changes in LaTeX kernel 2021-11-15
* font-latex.el (font-latex-built-in-keyword-classes): Add the
macros \counterwith(in|out) to variable keyword-class.
* latex.el (LaTeX-common-initialization): Support completion for
\counterwith(in|out) macros.
---
font-latex.el | 1 +
latex.el | 29 ++++++++++++++++++++++++++++-
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/font-latex.el b/font-latex.el
index 43b074e..5f1f888 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -247,6 +247,7 @@ variable `font-latex-fontify-sectioning'." ',num)
("settodepth" "{{") ("setcounter" "{|{\\")
("addtolength" "|{\\{") ("addtocounter" "{|{\\")
("stepcounter" "{") ("refstepcounter" "{")
+ ("counterwithin" "*[{{") ("counterwithout" "*[{{")
("arabic" "{") ("roman" "{") ("Roman" "{") ("alph" "{") ("Alph" "{")
("fnsymbol" "{"))
font-lock-variable-name-face 2 command)
diff --git a/latex.el b/latex.el
index 52a0a9c..96e55df 100644
--- a/latex.el
+++ b/latex.el
@@ -7428,7 +7428,34 @@ function would return non-nil and `(match-string 1)'
would return
;; LaTeX hook macros:
'("AddToHook" TeX-arg-hook [ "Label" ] t)
'("RemoveFromHook" TeX-arg-hook [ "Label" ])
- '("AddToHookNext" TeX-arg-hook t)))
+ '("AddToHookNext" TeX-arg-hook t)
+
+ ;; Added in LaTeX 2021-11-15
+ '("counterwithin"
+ [TeX-arg-eval completing-read
+ (TeX-argument-prompt t nil "Format")
+ '("\\arabic" "\\roman" "\\Roman" "\\alph" "\\Alph")]
+ (TeX-arg-counter)
+ (TeX-arg-counter "Within counter"))
+ '("counterwithin*"
+ [TeX-arg-eval completing-read
+ (TeX-argument-prompt t nil "Format")
+ '("\\arabic" "\\roman" "\\Roman" "\\alph" "\\Alph")]
+ (TeX-arg-counter)
+ (TeX-arg-counter "Within counter"))
+
+ '("counterwithout"
+ [TeX-arg-eval completing-read
+ (TeX-argument-prompt t nil "Format")
+ '("\\arabic" "\\roman" "\\Roman" "\\alph" "\\Alph")]
+ (TeX-arg-counter)
+ (TeX-arg-counter "Within counter"))
+ '("counterwithout*"
+ [TeX-arg-eval completing-read
+ (TeX-argument-prompt t nil "Format")
+ '("\\arabic" "\\roman" "\\Roman" "\\alph" "\\Alph")]
+ (TeX-arg-counter)
+ (TeX-arg-counter "Within counter"))))
(TeX-run-style-hooks "LATEX")