emacs-devel
[Top][All Lists]
Advanced

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

Re: Real constants


From: Juanma Barranquero
Subject: Re: Real constants
Date: Wed, 13 Jul 2005 20:29:52 +0200

On 7/13/05, Stefan Monnier <address@hidden> wrote:

> I believe it's mostly because it wasn't nearly as trivial/cheap until Gerd
> installed his defvaralias patch, which also introduced the `constant' field
> in symbols.

Yeah, I meant "trivial now", of course. But that's been in Emacs for
what? Five years?

> Among the local patches I use, I've expanded this `constant' field to
> 2 bits, so it can be either hard-read-only or soft-read-only (or writable,
> of course).  The soft-read-only state is used by defconst so that variables
> defined by defconst cannot be setq but can be changed via defconst
> (important when you reload a new version of a package where a defconst was
> changed).

Do you allow un-const'ing things? If so, special care should be taken
with `enable-multibyte-characters', nil, t and perhaps a few others...

> Making defconst variables into constants introduces a few occasional
> problems with some packages, of course, but nothing too hard to fix.

And in fact I'd bet most of these problems are, if not bugs, at least
bad style... :)

Could you please post your code here? I think it would be a great
feature (after 22.1).

-- 
                    /L/e/k/t/u




reply via email to

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