[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sat, 3 Jul 2010 15:33:58 -0400
On Sat, Jul 3, 2010 at 3:00 AM, Andreas Schwab <address@hidden> wrote:
> MON KEY <address@hidden> writes:
>> Except it doesn't, as indicated by following pathology:
>> (setq foo (unintern (makunbound 'foo)))
>> (indirect-variable foo)
>> `foo' should evaluate to t per return value of `unintern'.
> The foos in the two lines are completely unrelated.
The "first" foo is made unbound.
The "first" foo is uninterned which returns `t'.
The "second" foo is bound to the return value of uninterning the
"first" foo e.g. `t'.
That was not the point of the illustration.
The evaluation of the indirect-variable for the "second" foo should return `t'.
In the following, we change the "first" foo to a `tbar' there is no
"second" foo and we `set' tbar instead of `setq'ing foo and this form
does return `t':
(progn (unintern 'foo) (unintern 'tbar))
(let ((tbar (make-symbol "foo") ))
(set 'tbar (unintern (makunbound 'foo)))
; => t