[Top][All Lists]

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

Re: convert strings to symbol

From: David Kastrup
Subject: Re: convert strings to symbol
Date: Mon, 16 Jun 2008 16:48:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Andreas Röhler <address@hidden> writes:

> Am Montag, 16. Juni 2008 schrieb address@hidden:
>> Does someone have an idea how to convert a string object to a symbol?
>> One purpose would be some kind of variable substitution :
>> (setq y "z")
>> (setq x "y")
>> (print  ..? x ....) -> "z"
>> Thanks in advance.
> make-symbol (?)
> (setq a (make-symbol "eins"))
> a => eins

No, that is entirely useless since it creates a new symbol that has only
the print name "eins" but is not accessible via its name.

He wants something like

(print (symbol-value (intern x)))

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

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