Jan Vroonhof <vroonhof(a)math.ethz.ch> writes:
Hrvoje Niksic <hniksic(a)srce.hr> writes:
>
> Hmm. The old "pure" stuff behaved this way for strings. It took the
> easy way out for symbols, simply refusing to create pure symbols.
>
And it breaks big time when you have reference to symbols in pure
objects.
This has been fixed long ago. See Fpurecopy():
/* Order of subsequent tests determined via profiling. */
else if (SYMBOLP (obj))
{
/* Symbols can't be made pure (and thus read-only), because
assigning to their function, value or plist slots would
produced a SEGV in the dumped XEmacs. So we previously would
just return the symbol unchanged.
But purified aggregate objects like lists and vectors can
contain uninterned symbols. If there are no other non-pure
references to the symbol, then the symbol is not protected
from garbage collection because the collector does not mark
the contents of purified objects. So to protect the symbols,
an impure reference has to be kept for each uninterned symbol
that is referenced by a pure object. All such symbols are
stored in the hash table pointed to by
Vpure_uninterned_symbol_table, which is itself
staticpro'd. */
if (NILP (XSYMBOL (obj)->obarray))
Fputhash (obj, Qnil, Vpure_uninterned_symbol_table);
return obj;
}