Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn11feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc02.POSTED!not-for-mail From: Raffael Cavallaro Newsgroups: comp.lang.lisp Subject: Re: LISP - simple novice request References: <87hegat56d.fsf@valhalla.localnet> User-Agent: MT-NewsWatcher/3.2 (PPC Mac OS X) Message-ID: Lines: 47 NNTP-Posting-Host: 24.61.40.85 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc02 1033313487 24.61.40.85 (Sun, 29 Sep 2002 15:31:27 GMT) NNTP-Posting-Date: Sun, 29 Sep 2002 15:31:27 GMT Organization: AT&T Broadband Date: Sun, 29 Sep 2002 15:31:27 GMT In article , ilias wrote: > if it is as you say: > how can i convert a function to a funtion-name? If you define this function: (defun name-of-function ( a-function) (nth-value 2 (function-lambda-expression a-function))) Then you can do things like: ? (name-of-function #'car) CAR ? (name-of-function (symbol-function 'car)) CAR Unfortunately, function-lambda-expression is not required to return a usable name, so it may not return a name of (get-macro-character #\`) that is usable by trace (it doesn't in OpenMCL, for example). from the spec: "The tertiary value, name, is the ``name'' of function. The name is intended for debugging only and is not necessarily one that would be valid for use as a name in defun or function, for example. By convention, nil is used to mean that function has no name. Any implementation may legitimately return nil as the name of any function." As a broader issue, you should be aware that whatever the name of (get-macro-character #\`) is in your implimentation - it happens to be CCL::|` reader| in OpenMCL - may be inlined, and so not produce any usable results from trace. again, from the spec: "If a function to be traced has been open-coded (e.g., because it was declared inline), a call to that function might not produce trace output." So you might want to reconsider your broader goal here.