unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Why isn't the string returned by symbol-name read-only?
@ 2010-01-23 20:55 Daniel Colascione
  2010-01-23 21:53 ` Chong Yidong
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Daniel Colascione @ 2010-01-23 20:55 UTC (permalink / raw)
  To: Emacs development discussions

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Consider

(let ((name (symbol-name 'foo)))
  (aset name 0 ?x)
  (cons name (symbol-name 'foo)))

That yields ("xoo" . " xoo")

Now try


(let ((name (symbol-name 'car)))
  (aset name 0 ?x)
  (cons name (symbol-name 'car)))

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?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iEYEARECAAYFAktbYlAACgkQ17c2LVA10VsTLQCcCjDdAU9NSvOAVEMmVHfyhXxp
PRMAmgPmovQuhwTUwKGIFvd5giGQyXy4
=6FHg
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-01-25  3:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-23 20:55 Why isn't the string returned by symbol-name read-only? Daniel Colascione
2010-01-23 21:53 ` Chong Yidong
2010-01-24  0:33 ` alin.s
2010-01-24  9:48   ` Thien-Thi Nguyen
2010-01-24  1:12 ` Davis Herring
2010-01-24 11:19   ` alin.s
2010-01-25  3:08 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).