Hi Arash and Al,

>>>>> Arash Esbati <ar...@gnu.org> writes:
> Al Haji-Ali <abdo.haji....@gmail.com> writes:
>> On 11/01/2023, Arash Esbati wrote:
>> 
>>> We can teach the code to accept one level of braces, but is there a real
>>> use-case for it?
>> Why only one level? Doesn't AUCTeX have code to balance braces somewhere?

> This is all regexp-based, so brace balancing is not the way you would
> expect it.  Or am I missing your point?  This is currently what
> `font-latex-set-syntactic-keywords' does:

> (let ((...)
>       (verb-macros-with-braces
>        (and (fboundp 'LaTeX-verbatim-macros-with-braces)
>             (LaTeX-verbatim-macros-with-braces))))
>   (...)
>   (unless (= (length verb-macros-with-braces) 0)
>     (add-to-list
>      'font-latex-syntactic-keywords
>      `(,(concat "\\\\\\(?:" verb-macros-with-braces "\\)"
>                 ;; Some macros take an optional argument.  This is
>                 ;; the same line as above for environments.
>                 "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?"
>                 "\\({\\).*?[^\\]\\(?:\\\\\\\\\\)*\\(}\\)")
>        (1 "|") (2 "|"))))
>   ...)

Is it appropriate to treat the URL argument of \href as verbatim?
According to hyperdoc document, only "#" and "~" are special there.
Maybe we should reconsider not to add "href" (and alikes as well?) to
`LaTeX-verbatim-macros-with-braces-local' in style/hyperref.el.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine

Reply via email to