emacs-devel
[Top][All Lists]
Advanced

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

Proposal for debugging/testing option


From: Kelly Dean
Subject: Proposal for debugging/testing option
Date: Fri, 20 Feb 2015 20:27:17 +0000

Stefan Monnier wrote:
> Based on my experience with emitting messages in similar oddball cases
> (i.e. making a variable buffer-local while it's globally let-bound), my
> guess is that it would catch a few very rare oddball cases indeed, but:
> 1- those oddball cases end up harmless.
> 2- there's no easy "fix" for those cases (because the let-binding and the
>    makunbound happen in completely unrelated code which usually aren't
>    used at the same time and what *really* should happen is at best
>    unclear, or is otherwise exactly what happens with the current
>    semantics you don't like).

Would it be ok to add an option to barf in those cases instead of just emitting 
warning messages? Even if users won't use the option, it would be appropriate 
during development and testing.

I.e. barf-if-probable-bug, with the possible values t, 'warn, and nil. With 
'warn as the default.

Then, in the rare cases where it really is not a bug, the barf option can be 
let-bound to nil (i.e. a runtime analog of the with-no-warnings wrapper), which 
both suppresses the warning messages for known-correct usage and explicitly 
indicates in the code that the case has been reviewed and determined to not be 
a bug.



reply via email to

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