Subject: Re: bug#73302: TeX-find-closing-brace and verbatim macros

From: Arash Esbati <[email-masked]>
Date: Sat, 21 Sep 2024 09:30:02 +0200

Ikumi Keita <[email-masked]> writes:

>>>>>> Paul Nelson <[email-masked]> writes:
>> As a fix, we could either:
>
>> (i) Do (save-restriction (widen) ...) in TeX-fold-macro-nth-arg before
>> (TeX-verbatim-p).
>
>> (ii) Do (save-restriction (widen) ...) in LaTeX-verbatim-p.
>
>> The advantage of (ii) is that it arguably fixes the root cause rather
>> than just patching it at the source.  The disadvantage is that I don't
>> know off hand whether this would affect other calls to
>> LaTeX-verbatim-p in an undesired way.  I lean in favor of (i) for now,
>> and have updated my patch accordingly, but would welcome other
>> feedback.
>
> I don't have particular preference,

I think we should go with (i) and let the caller decide.

> so I think we can install your change, provided that no objection is
> raised.

@Paul: How does you change work in a file like this:

--8<---------------cut here---------------start------------->8---
\documentclass{article}

\usepackage{fvextra}

\begin{document}

Vanilla \verb|LaTeX|

With \Verb|fvextra|, or \Verb[fontsize=\scriptsize]|fvextra|.

With \Verb{fvextra}, or \Verb[fontsize=\scriptsize]{fvextra}.

\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
--8<---------------cut here---------------end--------------->8---

> Thank you for your contribution!

+1.

Best, Arash