Hi Arash, >>>>> Arash Esbati <ar...@gnu.org> writes: >> I haven't updated my TeX Live 2022 installation yet, so maybe the latest >> version is revised in such a way?
> Yes, this is the corresponding bug report: > https://github.com/latex3/hyperref/issues/249 Indeed, thanks. > How about this: > diff --git a/font-latex.el b/font-latex.el > index b78cf58a..bcb27b64 100644 > --- a/font-latex.el > +++ b/font-latex.el > @@ -1095,7 +1095,10 @@ have changed." > ;; Some macros take an optional argument. This is > ;; the same line as above for environments. > "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?" > - "\\({\\).*?[^\\]\\(?:\\\\\\\\\\)*\\(}\\)") > + "\\({\\)" > + "\\(?:[^}{]*\\(?:{[^}{]*}[^}{]*\\)*\\)*" > + "[^\\]\\(?:\\\\\\\\\\)*" > + "\\(}\\)") > (1 "|") (2 "|"))))) > (when font-latex-syntactic-keywords-extra > (nconc font-latex-syntactic-keywords > font-latex-syntactic-keywords-extra)) Hmm. That would fail if some verbatim macro has an intentional unpaired "{" in its argument like \foobar{aaa"{"bbb} . But maybe it's a corner case that we don't have to worry about. I'm not sure. What do others think about this? Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine