help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: obarray


From: Barry Margolin
Subject: Re: obarray
Date: Sun, 15 Dec 2013 01:04:31 -0500
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <address@hidden>,
 Emanuel Berg <address@hidden> wrote:

> Barry Margolin <address@hidden> writes:
> 
> > Values are unrelated to whether a symbol is in the
> > obarray. An uninterned symbol can have a value.
> 
> OK.
> 
> > (setq uninterned-symbol (make-symbol "foo"))
> > (setf (symbol-value uninterned-symbol) 'bar)
> 
> That looks backward. It looks like you are setting the
> value (i.e. data) to 'bar. But `symbol-value' returns
> not only the data for practical purposes, but the
> *place* of the data (and those are the same)?
> 
> > This symbol "foo" won't be in the obarray, but it
> > still has a value.
> 
> To me, with the defun I wrote in the beginning of this
> thread, I *do* get uninterned-symbol, and that should
> only look in obarray - also, the value seems to be not
> 'bar, but "foo" (?).

uninterned-symbol is an interned symbol. Its *value* is the symbol foo, 
which is not interned; foo shouldn't show up in the function you wrote 
earlier in the thread; unless you happen to have interned some other 
symbol by that name -- it would probably be clearer if I'd done:

(setq uninterned-symbol (make-symbol "something-you-have-never-typed"))

Now try your function and see if something-you-have-never-typed shows up.

The value of the symbol something-you-have-never-typed would then be bar.

-- 
Barry Margolin, address@hidden
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

[Prev in Thread] Current Thread [Next in Thread]