[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible defvar bug
From: |
Didier Verna |
Subject: |
Re: Possible defvar bug |
Date: |
Mon, 18 Feb 2013 16:00:28 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Jambunathan K <address@hidden> wrote:
> I am certain I don't understand what these paragraphs mean,
> particularly the second one.
> lands.
> ,---- C-h f
> | If SYMBOL has a local binding, then this form affects the local
> | binding. This is usually not what you want. Thus, if you need to
> | load a file defining variables, with this form or with `defconst' or
> | `defcustom', you should always load that file _outside_ any bindings
> | for these variables. (`defconst' and `defcustom' behave similarly in
> | this respect.)
> `----
This means that:
ELISP> (let ((foo 3))
(defvar foo 1)
(print foo))
3
ELISP> foo
*** Eval error *** Symbol's value as variable is void: foo
ELISP>
And, no, this is almost never what you want :-) Just like Tassilo
noticed by accident.
--
Resistance is futile. You will be jazzimilated.
Scientific site: http://www.lrde.epita.fr/~didier
Music (Jazz) site: http://www.didierverna.com
- Possible defvar bug, Tassilo Horn, 2013/02/18
- Re: Possible defvar bug, Jambunathan K, 2013/02/18
- Re: Possible defvar bug, Tassilo Horn, 2013/02/18
- Re: Possible defvar bug,
Didier Verna <=
- Re: Possible defvar bug, Alan Mackenzie, 2013/02/18
- Re: Possible defvar bug, Thierry Volpiatto, 2013/02/18
- RE: Possible defvar bug, Drew Adams, 2013/02/18
- Re: Possible defvar bug, Thierry Volpiatto, 2013/02/18
- RE: Possible defvar bug, Drew Adams, 2013/02/18
- Re: Possible defvar bug, Lawrence Mitchell, 2013/02/18
- Re: Possible defvar bug, Tassilo Horn, 2013/02/18
- Re: Possible defvar bug, Didier Verna, 2013/02/18
Re: Possible defvar bug, Glenn Morris, 2013/02/18