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

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

bug#65516: 30.0.50; Edebug behavior of signaling errors in &or


From: Stefan Monnier
Subject: bug#65516: 30.0.50; Edebug behavior of signaling errors in &or
Date: Sat, 26 Aug 2023 16:39:20 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

> My question is about edebug-no-match.  Do you perhaps have an idea what
> the reason might be why it ever chooses to signal an error instead of
> just throwing no-match?

`edebug-no-match` is the only place where we test `edebug-gate`, so if
we make it throw to `no-match` it would make `gate` into a no-op.

(`gate` doesn't occur explicitly in your example, but it's implicitly
present inside other things like `&define`, and hence `def-form`, IIRC).

In a sense `gate` is supposed to be a bit like Prolog's "cut", but
Edebug isn't quite like Prolog (e.g. it doesn't really do backtracking;
it works more like a PEG parser) and similarly its `gate` isn't the same
as "cut".

See bug#41988 for a case where we didn't want a failure in one
"definition form" to be allowed to continue matching in a second branch
of an `&or` (tho this was arguably because some of the code executed
along the way had side-effects that can't be undone).

:-(


        Stefan






reply via email to

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