bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28747: 26.0.60; Usage of "&rest body" in Edebug specs


From: Stefan Monnier
Subject: bug#28747: 26.0.60; Usage of "&rest body" in Edebug specs
Date: Sat, 29 Jan 2022 18:25:55 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> The symbol &rest in an Edebug spec has a different meaning than it has
> in an argument list.

Definitely, yes.
Note that `&optional` is different "in the same way".

> In particular, "&rest body" in an Edebug spec is
> erroneous usage because it is asking Edebug to match something that
> can match nothing (body) as many times as it can, which makes an
> infinite loop.

Only idiots would get caught making such rookie mistakes.

> Here are the macros I've found that have this incorrect usage of &rest
> in their Edebug specs:
>
> crm--completion-command
> easy-mmode-define-navigation
> inline--letlisteval
> inline--leteval
> ses--letref

See: only idiots.

> Does anyone have thoughts on the idea of adding &repeat as a synonym
> for &rest in Edebug specs, with the goal of moving &rest towards
> obsolescence eventually?

I like the idea.  Only problem I can see is that it doesn't
solve the problem for `&optional`.


        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]