Subject: bug#78585: [PATCH] TeX-fold-verbs: improve macro recognition

From: "Paul D. Nelson" <[email-masked]>
Date: Mon, 26 May 2025 18:11:53 +0200

Hi Arash,

Thanks for your feedback.

>> @@ -1384,7 +1388,8 @@ Replaces the verbatim content with its own text."
>>                          (regexp-opt
>>                           (append
>>                            (LaTeX-verbatim-macros-with-braces)
>> -                          (LaTeX-verbatim-macros-with-delims))))))
>> +                          (LaTeX-verbatim-macros-with-delims)))
>> +                        "\\_>")))
>
> Why do you use the "\\_>" boundary?  I would have expected "\\b" or
> "\\>"?  Am I missing something?

I had in mind stuff like:

(string-match "\\\\verb\\*\\_>" "\\verb*") ; t
(string-match "\\\\verb\\*\\>" "\\verb*") ; nil
(string-match "\\\\verb\\*\b" "\\verb*") ; nil

(I'll confess that I am not too familiar with what sorts of verbatim
macro names are out there, but figured ending on a symbol boundary would
be relatively safe.)

Paul