[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why isn't the string returned by symbol-name read-only?
From: |
Davis Herring |
Subject: |
Re: Why isn't the string returned by symbol-name read-only? |
Date: |
Sat, 23 Jan 2010 17:12:17 -0800 (PST) |
User-agent: |
SquirrelMail/1.4.8-5.7.lanl7 |
> That returns in an error when you try to evaluate it. The object
> returned by (symbol-name 'car) must have some read-only bit set.
>
> Why isn't that bit set for *all* symbol names?
It's set for that string not because `car' is too important to be changed,
but because it was created before Emacs was dumped. (Of course, it is
created that early because it is important.) Making such strings
read-only saves the time in checking whether they might need
garbage-collection later. So it's purely an optimization; it's not meant
to protect anything.
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.