Some time ago, Olivier Galibert wrote...
|+
|
| With the indexed lrecord implementation, it is quite easy to do. But
| I'm not convinced this is what you really want to have:
|
| (setq bar 10)
| 10
| (setq nbar (symbol-name 'bar))
| "bar"
| (aset nbar 0 ?x)
| ?x
| nbar
| "xar"
| bar
| --> Symbol's value as variable is void: bar
|
| How am I supposed to work on the string which happens to be initially
| a symbol name ? I see no "copy-string" or equivalent function.
(copy-sequence) is the function you are looking for.
So, IMO the correct behavior in your sample would be that aset signals;
although if you write (setq nbar (copy-sequence (symbol-name 'bar))) it
is ok, as it mangles with a copy of the string.
Kirill