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

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

bug#44733: Nested let bindings for non-local DEFVAR_PER_BUFFER variables


From: Spencer Baugh
Subject: bug#44733: Nested let bindings for non-local DEFVAR_PER_BUFFER variables unwind wrong
Date: Thu, 19 Nov 2020 09:22:07 -0500

Eli Zaretskii <eliz@gnu.org> writes:
> Why did you think this is a bug?  The ELisp manual seems to document
> what you see:
>
>      A variable can have more than one local binding at a time (e.g., if
>   there are nested ‘let’ forms that bind the variable).  The “current
>   binding” is the local binding that is actually in effect.  It determines
>   the value returned by evaluating the variable symbol, and it is the
>   binding acted on by ‘setq’.
>
> Or did I misunderstand what you found unexpected?

I mentioned two unexpected things, but I don't think that parapgrah
describes either of them.

First was the behavior that when you setq within a let_default binding,
the binding does not appear local when queried with local-variable-p.
That's relatively minor.  It doesn't seem to me that that paragraph says
anything about "You can have local bindings which don't appear local
when queried with local-variable-p".

Second, and the more important bug, which my code example was about, is
"the default value is set to whatever your current binding is, if you
enter and then exit a nested let-binding".  That seems definitely
uncovered by that paragraph, or any documentation.





reply via email to

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