[comp.emacs] intern

merlyn@intelob.intel.com (Randal L. Schwartz @ Stonehenge) (05/03/89)

In article <1256@novavax.UUCP>, weiner@novavax (Bob Weiner) writes:
| Anyone know if there is a way to convert a string to a symbol-name in
| GNU Emacs Lisp?

^H d i n t e r n RET

intern:
Return the symbol whose name is STRING.
A second optional argument specifies the obarray to use;
it defaults to the value of  obarray.

^H d i n t e r n - s o f t RET

intern-soft:
Return the symbol whose name is STRING, or nil if none exists yet.
A second optional argument specifies the obarray to use;
it defaults to the value of  obarray.

Try (intern "foo") or (intern-soft "foo")

Side note for elisp gurus: what happens if you (intern-soft "nil")?
How do you tell? :-) :-)

Just another elisp hacker (for a few more weeks...),
-- 
/=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095===\
{ on contract to BiiN, Hillsboro, Oregon, USA, until 30 May 1989     }
{ <merlyn@intelob.intel.com> ...!uunet!tektronix!biin!merlyn         }
{ or try <merlyn@agora.hf.intel.com> after 30 May 1989               }
\=Cute quote: "Welcome to Oregon... home of the California Raisins!"=/