Subject: Re: 14.0.9; Folding of math macros with a function spec is broken

From: Rahguzar <[email-masked]>
Date: Sat, 21 Jun 2025 14:54:55 +0500

Hi Paul,

"Paul D. Nelson" <[email-masked]> writes:

> Hi Raghuzar and all,
>
> Please see the attached patch which implements signature support for
> macro folds, following the plan outlined in my earlier email.  This
> should address both the issue in your report and that in my earlier bug.
> We also need to update the manual, but I'll do that later once the
> general shape of the proposal is agreed upon.  If you get the chance,
> please let me know what you think.

I have tested the patch and resolve the original issue. I haven't tested
the new functionality using the SPEC.

One question about it: One problem I have had is that, if I have
something like

\begin{align}
  [\hat{X},\hat{P}] = i\hbar
\end{align}

the commutator gets folded as an optional argument to the \begin.
It is possible to not have this effect with new machinery without
specifying \begin as not taking any optional arguments?

I have only seen optional arguments before mandatory ones but I don't
know if that can be relied upon in general.

> Thanks, best,
> Paul

Best,
Rahguzar

> [2. text/x-patch; 0001-Add-signature-support-for-macro-folding.patch]...