[Top][All Lists]

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

Re: Warnings about keymaps

From: Stephen J. Turnbull
Subject: Re: Warnings about keymaps
Date: Sat, 19 Sep 2009 09:04:28 +0900

Glenn Morris writes:
 > Stefan Monnier wrote:

 > > That's unrelated: defconst only says that the variable's binding won't
 > > change, not that the object it is bound to is immutable.
 > I don't understand that distinction. I just read the doc of defconst:
 >     The intent is that neither programs nor users should ever change
 >     this value.

It's the same distinction as between "const *" and "* const" in C.
The value of the variable is a constant object, but that object may be
mutable if it is a container.  Under this definition, if you were
implementing Emacs Lisp in Emacs Lisp, it would make sense to
implement the obarray as a defconst.  (You probably already knew that,
but your question literally says "that distinction", not "why you make
that distinction".)

I would like to know "why?" though.  XEmacs's docstring says "The
intent is that programs do not change this value, but users may."  The
awkward expression of the Emacs docstring suggests that the XEmacs
version is indeed the original.  Can somebody explain why it was
changed?  Is Emacs moving toward true constants?  (Eg, in r/o memory?)

reply via email to

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