[armedbear-devel] defun return value is not conforming.

Alessio Stalla alessiostalla at gmail.com
Sat Nov 20 09:45:01 UTC 2010


On Sat, Nov 20, 2010 at 10:38 AM, Erik Huelsmann <ehuels at 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).

Alessio




More information about the armedbear-devel mailing list