GNU bug report logs - #78693
14.0.9; Folding of math macros with a function spec is broken

Previous Next

Package: auctex;

Reported by: Rahguzar <rahguzar <at> mailbox.org>

Date: Wed, 4 Jun 2025 08:49:03 UTC

Severity: normal

Merged with 78696, 78698

Found in version 14.0.9

Done: "Paul D. Nelson" <ultrono <at> gmail.com>

Full log


View this message in rfc822 format

From: "Paul D. Nelson" <ultrono <at> gmail.com>
To: Rahguzar <rahguzar <at> mailbox.org>
Cc: 78693 <at> debbugs.gnu.org
Subject: bug#78693: 14.0.9; Folding of math macros with a function spec is broken
Date: Sat, 07 Jun 2025 20:32:53 +0200
Hi Raghuzar,

> I like this proposal. It is backward compatible I think it should also
> allow us to deal with optional arguments in a function spec.

OK, great.  I'll try fleshing it out when I get the chance.

> Currently if the spec is a function it only receives the mandatory
> arguments. If the number of arguments is part of the spec we can allow
> it to receive up to p+q args without breaking existing code.

Regarding optional arguments, I am in the habit of extracting those
using TeX-fold-macro-nth-arg.  This is possible because (with recent
enough AUCTeX) the function display spec is always called with point at
the beginning of the macro to be folded.  See for instance the
implementation of TeX-fold-cite-display.

For this reason, I'm inclined to first implement the proposal without
changing how optional args are used - we could change that later, if
desired.


Thanks, best,
Paul




This bug report was last modified today.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.