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

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

Re: obarray


From: Emanuel Berg
Subject: Re: obarray
Date: Sun, 15 Dec 2013 06:11:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> The last line easier without cl'ish setf:
>
>    (set uninterned-symbol 'bar)

CL or not, I get the same situation (what I can see),
the symbol *does* end up in obarray, and that second
part (setf or set) - what is that supposed to do? What
I can see it doesn't change the value, either with my
defun or describe-variable (which I trust more), I get
the argument to make-symbol.

> And to answer the next question: "What are uninterned
> symbols good for"?

Professor X...

> They are useful especially when writing macros, as a
> way to avoid collisions with already used symbols.
> But that doesn't matter here.

Macros as in programs writing programs (?). You need to
get at unique symbol and you can't spell it out as you
don't know what in what setting the macro is
executed. I guess you can use `let' in macros, so does
this mean you use this for example when you need a new
global variable? But if it is global, and the name is
generated, how can anyone outside know how to access
it?

> 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'.

Yes, it seems to work. I am happy you read my code.

-- 
Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu
underground experts united:  http://user.it.uu.se/~embe8573


reply via email to

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