On Sat, Nov 20, 2010 at 10:45 AM, Alessio Stalla alessiostalla@gmail.com wrote:
On Sat, Nov 20, 2010 at 10:38 AM, Erik Huelsmann ehuels@gmail.com wrote:
Hi Alessio, Pascal,
The definition of DEFUN changes when the compiler is loaded (because it's redefined in precompiler.lisp).
In this case you're correct Alessio, that they return the same thing. However, the form should have been (PROG1 ...) instead of (PROGN ...), because if there's documentation, the docstring will be returned, I think. (it'll contain an additional (SETF (fdocumentation ...) ...))
My guess is that Pascal is running into issues with functions with documentation at the start of the body.
Is that it?
You're right Erik, it should be PROG1, because PROGN returns the docstring as you said; I verified it by loading the compiler and then issuing a DEFUN with docstring. However, Pascal says DEFUN returned the function object, not the docstring, so there may be even another case (perhaps still caused by the incorrect PROGN).
Anyway, I committed the fix changing PROGN to PROG1 in precompiler.lisp.