branch: externals/auctex
commit e3f60d415aced21dea961fb52805ea0c01b265b4
Author: Arash Esbati <[email protected]>
Commit: Arash Esbati <[email protected]>
Fix fontification of macros followed by a number
* font-latex.el (font-latex-syntax-alist): Give numbers
punctuation syntax during fontification. (Bug#79587)
---
font-latex.el | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/font-latex.el b/font-latex.el
index 826ea0c547..3da68ba4b3 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1286,9 +1286,14 @@ have changed."
;;; Setup
(defvar font-latex-syntax-alist
- ;; Use word syntax for @ because we use \> for matching macros and
- ;; we don't want \foo@bar to be found if we search for \foo.
- '((?\( . ".") (?\) . ".") (?@ . "w"))
+ '((?\( . ".") (?\) . ".")
+ ;; Use word syntax for @ because we use \> for matching macros and
+ ;; we don't want \foo@bar to be found if we search for \foo.
+ (?@ . "w")
+ ;; Use punctuation syntax for numbers for the same reason, so things
+ ;; like \LaTeX3 are fontified correctly. (Bug#79587)
+ (?0 . ".") (?1 . ".") (?2 . ".") (?3 . ".") (?4 . ".")
+ (?5 . ".") (?6 . ".") (?7 . ".") (?8 . ".") (?9 . "."))
"List of specifiers for the syntax alist of `font-lock-defaults'.")
(defun font-latex-add-to-syntax-alist (list)