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

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

bug#41988: 28.0.50; Edebug unconditionally instruments definitions with


From: Stefan Monnier
Subject: bug#41988: 28.0.50; Edebug unconditionally instruments definitions with &define specs
Date: Sun, 21 Mar 2021 10:37:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> - The old spec of `cl-flet` would be broken by such a change, so if we
>>  want to make such a change, we'd probably want to arrange so that it
>>  emits a clear warning.
> Where?  When setting the debug specification (byte-run--set-debug), or in 
> some other place?

The old spec was of the form (or (&define name form) (&define name sexp
body)), so if we put a gate at `&define`, this will probably fail to even match
the (&define name sexp body) part.

[ Disclaimer: I don't understand the precise semantics of `gate`, tho
  I do remember using it once via trial-and-error.  So maybe it wouldn't
  prevent it, but if doesn't prevent it, then it doesn't likely "fix"
  our problem ;-)  ]

>> I'm not sure it's worth the trouble: the pain seems higher than the gain.
> This bug is rather nasty when it's hit (it took me quite a while to
> debug/hunt down),

Could you remind me what was this nasty outcome?  In the context of
Edebug the effect is negligible (it just emits a spurious message about
defining an extra something, but other than that debugging works just fine).

> so I think it would be reasonable to prevent.  We already
> disable backtracking for literal symbols, and I think forms that require
> multiple &define forms with backtracking should be exceedingly rare and can
> be rewritten as you did with cl-flet.

Emitting a warning would be much more helpful than just silently
"cut"ting the backtracking.


        Stefan






reply via email to

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