[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: use of (defvar <foo>)
From: |
Stefan Monnier |
Subject: |
Re: use of (defvar <foo>) |
Date: |
Sun, 09 Apr 2006 20:29:53 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
>> From the future's point of view (Emacs-22 and up), placing such defvars
>> inside eval-when-compile is a bad practice (in the future it may even fail
>> to work since there's nothing that guarantees that the content of
>> eval-when-compile is actually compiled rather than just eval'd).
> Huh? You don't want it compiled -- that's the point.
By "compiled" I only mean that it goes through the byte-compiler (before
being eval'd). Not that the resulting byte-code is written in the
output file.
If the content of eval-when-compile were not compiled, then
(eval-when-compile (defvar foo)) would be 100% equivalent to a nop.
It's only because it's both compiled&eval'd that the byte-compiler notices
the defvar and thus silences warnings about subsequent uses of
this variable.
> You're actually considering changing what eval-when-compile does and
> breaking more existing code??
Compiling the content of eval-when-compile before eval'ing doesn't
remove/hide any bug AFAIK, quite the opposite.
Stefan
- Re: use of (defvar <foo>), Reiner Steib, 2006/04/07
- Re: use of (defvar <foo>), Stefan Monnier, 2006/04/07
- Re: use of (defvar <foo>), Bill Wohler, 2006/04/07
- Re: use of (defvar <foo>), Dave Love, 2006/04/09
- Re: use of (defvar <foo>),
Stefan Monnier <=
- Re: use of (defvar <foo>), Dave Love, 2006/04/11
- Re: use of (defvar <foo>), David Kastrup, 2006/04/11
- Re: use of (defvar <foo>), Dave Love, 2006/04/13
- Re: use of (defvar <foo>), Stefan Monnier, 2006/04/11
- Re: use of (defvar <foo>), Dave Love, 2006/04/13
Re: use of (defvar <foo>), Richard Stallman, 2006/04/08