[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: defvar'ing constants
From: |
Stefan Monnier |
Subject: |
Re: defvar'ing constants |
Date: |
Tue, 28 Jun 2005 01:06:40 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> For consistency:
> (defvar CONSTANT) ; should work
> (defvar CONSTANT ITS-VALUE) ; should work
> (defvar CONSTANT OTHER-VALUE) ; should fail
> I think it is more consistent to make them all errors.
> defvar should not be used on these symbols.
One case I know was consciously make to work is (defvar :foo :foo) so that
packages using :foo could be kept backward compatible with Emacs-19
where :foo is a normal variable because keywords don't exist.
Whether we should still cater to such thing is another question.
Stefan