GNU bug report logs -
#79587
Fontification: Numbers directly after a macro
Previous Next
To reply to this bug, email your comments to 79587 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
tsdh <at> gnu.org, bug-auctex <at> gnu.org:
bug#79587; Package
auctex.
(Mon, 06 Oct 2025 21:15:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Arash Esbati <arash <at> gnu.org>:
New bug report received and forwarded. Copy sent to
tsdh <at> gnu.org, bug-auctex <at> gnu.org.
(Mon, 06 Oct 2025 21:15:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
X-Debbugs-CC: tsdh <at> gnu.org
Hi all,
currently, \LaTeX3 is fontified like this:
[unpatched.png (image/png, inline)]
[Message part 3 (text/plain, inline)]
i.e., the 3 after the macro kills fontification of the macro \LaTeX.
It should actually look like this:
[patched.png (image/png, inline)]
[Message part 5 (text/plain, inline)]
This can be achieved with this change:
--8<---------------cut here---------------start------------->8---
diff --git a/font-latex.el b/font-latex.el
index ffba35cf..054e134c 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1284,7 +1284,9 @@ have changed."
(defvar font-latex-syntax-alist
;; Use word syntax for @ because we use \> for matching macros and
;; we don't want \foo <at> bar to be found if we search for \foo.
- '((?\( . ".") (?\) . ".") (?@ . "w"))
+ '((?\( . ".") (?\) . ".") (?@ . "w")
+ (?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)
--8<---------------cut here---------------end--------------->8---
The patch changes the syntax of all numbers in `font-latex-syntax-alist'
to Punctuation so they are not matched by \>. The tests we have pass
after this change.
Any comments?
Best, Arash
Reply sent
to
Arash Esbati <arash <at> gnu.org>:
You have taken responsibility.
(Fri, 24 Oct 2025 15:22:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Arash Esbati <arash <at> gnu.org>:
bug acknowledged by developer.
(Fri, 24 Oct 2025 15:22:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 79587-done <at> debbugs.gnu.org (full text, mbox):
Arash Esbati <arash <at> gnu.org> writes:
> This can be achieved with this change:
>
> diff --git a/font-latex.el b/font-latex.el
> index ffba35cf..054e134c 100644
> --- a/font-latex.el
> +++ b/font-latex.el
> @@ -1284,7 +1284,9 @@ have changed."
> (defvar font-latex-syntax-alist
> ;; Use word syntax for @ because we use \> for matching macros and
> ;; we don't want \foo <at> bar to be found if we search for \foo.
> - '((?\( . ".") (?\) . ".") (?@ . "w"))
> + '((?\( . ".") (?\) . ".") (?@ . "w")
> + (?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)
>
> The patch changes the syntax of all numbers in `font-latex-syntax-alist'
> to Punctuation so they are not matched by \>. The tests we have pass
> after this change.
>
> Any comments?
No comments, so I installed the proposed change, closing.
Best, Arash
This bug report was last modified 12 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.