emacs-devel
[Top][All Lists]
Advanced

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

Re: defvars at compile time


From: Juanma Barranquero
Subject: Re: defvars at compile time
Date: Fri, 16 Sep 2005 15:25:52 +0200

On 9/16/05, David Kastrup <address@hidden> wrote:

> Actually, I get "might be undefined at run time" in some similar
> eval-when-compile wrapped situations.

Maybe with some unusual combination of circumstances.

> And having different semantics
> during compilation and execution also is not a good idea.

There's almost zero semantics in `(eval-when-compile (defvar xxx))'.
It doesn't generate code, or assign any value, or affect dynamic
bindings (on normal situations, which we're discussing now). It's only
a trick to say "shhh" to the byte-compiler. `defvar' is special cased
for this.

It has no relation with other uses of `eval-when-compile' and friends,
which do indeed change the semantics. Whether these cases are a good
idea or not, IMO depends on each particular case. `eval-when-compile'
exists for a reason.

But anyway, I'm not advocating wrapping the defvars in e-w-c; I was
just pointing out to Carsten why I didn't wrap them in the first
place, and why I found surprising that he did.

-- 
                    /L/e/k/t/u




reply via email to

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