emacs-devel
[Top][All Lists]
Advanced

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

defvar without value


From: Michael Heerdegen
Subject: defvar without value
Date: Wed, 01 Apr 2020 02:03:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hello,

Using `defvar' (on top-level) without specifying a value differs in two
ways from calls that specify a value: (1) the variable's value is not
set, and (2) the variable is made special only in the context of the
(rest of the) current file or buffer.

I wonder if it is good that these two things are chained together, and
if there are alternatives to what we have now.  Latest changes have
revealed that in some cases, people wanted (1) to always get compiler
warnings when a variable is not explicitly bound, but they didn't intend
that the variable is not always special.  Dunno to how many people this
happened, but it is a kind of pitfall.


TIA,

Michael.



reply via email to

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