[Top][All Lists]

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

Re: defvar'ing constants

From: Juanma Barranquero
Subject: Re: defvar'ing constants
Date: Tue, 28 Jun 2005 09:40:12 +0200

On 6/28/05, Stefan Monnier <address@hidden> wrote:
> >     For consistency:
> >       (defvar CONSTANT)               ; should work
> >       (defvar CONSTANT ITS-VALUE)     ; should work
> >       (defvar CONSTANT OTHER-VALUE)   ; should fail

> 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.

Aha, that's why set-default and friends go around a few hoops to allow
setting a keyword to itself. Thanks! Anyway, that was allowed in my
original patch (it's the second case shown above) but I removed it per
Richard's request. I can re-add it if deemed appropriate.

> Whether we should still cater to such thing is another question.

No idea whether it will be usual for people with Emacs 22.X to load
19.X packages :)


reply via email to

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