[Top][All Lists]

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

Re: void variable

From: Luc Teirlinck
Subject: Re: void variable
Date: Thu, 19 Aug 2004 20:27:51 -0500 (CDT)

Stefan Monnier wrote:

   The patch below seems to work well.  Any objection (or suggestion of
   a better message)?

Of course, `defcustom' has exactly the same problem as `defvar'.  So
doing this for defvar and not defcustom seems inconsistent.  Strictly
speaking, `defconst' also has the same problem, but let-binding a
variable defined with defconst seems very iffy in any circumstances.

The message:  VAR is still globally unbound

looks cryptic.  It makes it seem that there is something wrong with
let-binding a variable that is globally unbound whereas, of course,
that happens all the time.

Davis Herring wrote:

"Can't bind `foo-bar' globally: `let' around `defvar'"

I would prefer:

"Warning: defvar for locally bound `%s' failed to globally define it."


"Warning: defcustom for locally bound `%s' failed to globally define it."

For one thing, local bindings are not always made with `let'.

Anyway, somebody with a reasonably fast machine may only see this when
studying the *Messages* buffer.  It easily can be overwritten by
messages like:

Loading ~/foo.el ...done



reply via email to

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