emacs-devel
[Top][All Lists]
Advanced

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

defvar inside let-binding (was: bug#9090: 24.0.50; void-variable jka-com


From: Stefan Monnier
Subject: defvar inside let-binding (was: bug#9090: 24.0.50; void-variable jka-compr-verbose)
Date: Mon, 18 Jul 2011 10:03:20 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>>> When starting emacs, I'm getting a warning "Warning: defvar ignored
>>> because jka-compr-verbose is let-bound".
>> Fixed.
> Sorry; my fault.  The binding/later-loading thing is pretty annoying in
> general, though.

Yes.

> Has changing the way `defvar' works in the presence of let-bindings been
> discussed? 

No.  Personally I can't see how to make it work, because by the time we
get to defvar it's kind of too late.  Maybe we could try to change the
let-binding so that the "saved void state" (which will be restored at
the end of the outer let) gets changed as if the var had been defvarred
before the let-binding.  But it sounds terribly hackish.

Of course, another problem is that in the case of defcustom we don't
even detect the problem.


        Stefan



reply via email to

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