From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andrew Gierth Newsgroups: gmane.emacs.help Subject: Re: Emacs internals + lisp guru question (with an error corrected) Date: 29 Sep 2002 18:03:30 +0100 Organization: disorganised Sender: help-gnu-emacs-admin@gnu.org Message-ID: <87bs6gpw2l.fsf@erlenstar.demon.co.uk> References: NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1033337173 7953 127.0.0.1 (29 Sep 2002 22:06:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 29 Sep 2002 22:06:13 +0000 (UTC) Cc: gnuist006@hotmail.com (gnuist006) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17vmCZ-000248-00 for ; Mon, 30 Sep 2002 00:06:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17vmCo-0003tt-00; Sun, 29 Sep 2002 18:06:26 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!news-feed.riddles.org.uk!news-spur.riddles.org.uk!newsmonster Original-Newsgroups: gnu.emacs.help,comp.lang.lisp,gnu.utils.help,comp.unix.programmer,comp.unix.shell Original-Followup-To: gnu.emacs.help,comp.lang.lisp,comp.unix.programmer Original-Lines: 46 X-Mayan-Date: Long count = 12.19.9.11.2; tzolkin = 10 Ik; haab = 15 Chen X-Pgp-0x0E9FFBE9: 87 25 7F 14 41 24 B3 51 E0 19 8B DE 49 74 0C 29 X-Attribution: AG X-P-Persistent-Headers: are a bad idea. X-Newsreader: Gnus v5.5/Emacs 20.2 Original-X-Complaints-To: abuse@news-spur.riddles.org.uk X-Post-Filter: postfilter v0.6 alpha Original-Xref: nntp.stanford.edu gnu.emacs.help:105516 comp.lang.lisp:94969 gnu.utils.help:4056 comp.unix.programmer:143518 comp.unix.shell:133568 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2060 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2060 [followups pruned a bit] >>>>> "gnuist006" == gnuist006 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. -- Andrew. comp.unix.programmer FAQ: see