analog of fundef for Maxima functions defined in lisp file



On 6/17/2011 10:48 AM, Edwin Woollett wrote:
> Is there an analog of fundef which can be used to
> display the definition of Maxima functions which
> have been loaded in via a lisp file?
> ---------------------------------------
generally no, common lisp does not require that the "original 
definition" be saved anywhere and so if any particular lisp does it, it 
is not part of the standard and may not work in some other lisp.

On the other hand, one can redefine the lisp function defun so that it 
stashes something that looks like the original material, sortof.

HOWEVER

The right thing to do, if you want to see the definition of a function, 
is to get the file name and the location in the file in which the 
function appears.
This will give you the original text, the original spacing, the original 
comments, the context of the function (like declarations in the file) etc.

So the "real" answer is, you should be asking for something else.

Incidentally, some common lisps already store the file name and location 
on the property list of the function name, as files are loaded.

RJF