[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: void variable
From: |
Adrian Aichner |
Subject: |
Re: void variable |
Date: |
Sun, 25 Jul 2004 09:56:21 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (chayote, windows-nt) |
Lars Hansen <address@hidden> writes:
> Assume that you on the load path have a file foo.el containing the line
>
> (defvar foo 'x)
>
> If you evaluate
>
> (let ((foo 'y)) (load "foo.el"))
> foo
>
> you get
>
> Symbol's value as variable is void: foo
>
> Observe that the loading may very well be implicit like in
>
> (let ((foo 'y)) (bar))
>
> where bar could be an autoloaded function in foo.el or even in another
> module requiring foo.el.
> This behavior is not new. It works like that in Emacs 21.2 and Emacs 20.7.
>
> Is the behavior a bug that should be fixed, or is it OK but should be
> documented? Or is it documented already?
Hi Lars, the local binding of foo established by the let form is
causing this behavior.
This is pretty well documented in
(info "(lispref)Local Variables")
and
(info "(lispref)Variable Scoping")
Hope this helps,
Adrian
--
Adrian Aichner
mailto:address@hidden
http://www.xemacs.org/
- void variable, Lars Hansen, 2004/07/25
- Re: void variable,
Adrian Aichner <=
- Re: void variable, Lars Hansen, 2004/07/25
- Re: void variable, Luc Teirlinck, 2004/07/25
- Re: void variable, Luc Teirlinck, 2004/07/25
- Re: void variable, Luc Teirlinck, 2004/07/25
- Re: void variable, Richard Stallman, 2004/07/26
- Re: void variable, Lars Hansen, 2004/07/26
- Re: void variable, Richard Stallman, 2004/07/27