emacs-devel
[Top][All Lists]
Advanced

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

Re: use of (defvar <foo>)


From: Dave Love
Subject: Re: use of (defvar <foo>)
Date: Thu, 13 Apr 2006 17:44:58 +0100
User-agent: Gnus/5.11 (Gnus v5.11)

David Kastrup <address@hidden> writes:

> defvar is the main way to inform the system a variable could be bound
> dynamically instead of just lexically.  Having it omitted on runtime
> could lead to hard to find bugs if we change to lexical binding at one
> time.

[I'll believe that when I see it (even more than Emacs 22).]

defvars are often not added with the intention of actually
distinguishing dynamic and putative lexical binding, but specifically
to suppress the compiler warning when people care.  They may well not
be in the right place to signal that bindings are lexical.

If that ever becomes an issue, you need diagnostics for the existing
code which correctly (in Emacs 21) uses the guard, and for `declare',
at least.




reply via email to

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