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

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

Re: obarray


From: Michael Heerdegen
Subject: Re: obarray
Date: Sun, 15 Dec 2013 05:47:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Barry Margolin <barmar@alum.mit.edu> writes:

> Values are unrelated to whether a symbol is in the obarray. An 
> uninterned symbol can have a value.
>
> (setq uninterned-symbol (make-symbol "foo"))
> (setf (symbol-value uninterned-symbol) 'bar)

The last line easier without cl'ish setf:

   (set uninterned-symbol 'bar)  

> This symbol "foo" won't be in the obarray, but it still has a value.

And to answer the next question: "What are uninterned symbols good for"?
They are useful especially when writing macros, as a way to avoid
collisions with already used symbols.  But that doesn't matter here.

All that need to know is that obarray is a thing that holds all
essential symbols (variables), and that it is a valid COLLECTION
argument for `completing-read'.


Regards,

Michael.




reply via email to

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