help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Strange incf behavior in Emacs 22. Intentional?


From: Stefan Monnier
Subject: Re: Strange incf behavior in Emacs 22. Intentional?
Date: Thu, 12 Jul 2007 15:36:35 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

>>> A quoted list is evaluated to a cons cell at _compile_ time.
>> 
>> Actually, it's done at "read" time (aka "load" time).  I.e. when you
>> load the .el or .elc file, or when you hit C-x C-e on the (defun
>> ...).

> Sure.

>>> The contents of this cons cell can be changed with setcar (or, in
>>> this case, incf).
>> 
>> And I consider this as a bug, actually, but a known one that's a bit
>> difficult to fix satisfactorily.

> Why would that be a bug?

Because immediate literal values such as '(1 2) are conceptually part of the
code rather than part of the data, so setcar on them will change program
code which is against my religion.

Of course, this might be considered moot since my religion also
opposes setcar (and aset on strings).


        Stefan


reply via email to

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