[Top][All Lists]

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

Re: Emacs internals + lisp guru question (with an error corrected)

From: Andrew Gierth
Subject: Re: Emacs internals + lisp guru question (with an error corrected)
Date: 29 Sep 2002 18:03:30 +0100

[followups pruned a bit]

>>>>> "gnuist006" == gnuist006  <address@hidden> writes:

 gnuist006> There are some functions that take a string as argument.
 gnuist006>                                      ^^^^^^
 gnuist006> Text can be read from the buffer as a string.
 gnuist006> There are other functions that take a "symbol" as an argument.
 gnuist006> A string can be converted to a symbol.
 gnuist006> However, when symbol is provided to the function by
 gnuist006> converting a string it is not working.

 gnuist006> For example:

 gnuist006> (describe-function quoted-SYMBOL) works 
 gnuist006>     eg (describe-function 'describe-function)
 gnuist006> (make-symbol "describe-function") works

 gnuist006> but

 gnuist006> (describe-function (make-symbol "describe-function")) is
 gnuist006> not working.

make-symbol creates a new, uninterned symbol that isn't the same as
any existing symbol even if it happens to have the same name. The
values and properties of the new symbol are all undefined.

What you're looking for is 'intern', which returns the symbol with a
specific name from the specified obarray (either the default one or a
specified one).

(describe-function (intern "describe-function"))

 gnuist006> How can we get the code of describe-function?

the source is in help.el

 gnuist006> What is the meaning of the gibberish from
 gnuist006> (insert (format "%s" (symbol-function 'describe-function) ))

it's compiled bytecode.


comp.unix.programmer FAQ: see <URL:>

reply via email to

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