Hrvoje Niksic <hniksic(a)xemacs.org> wrote:
"Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
>>>>>> "jpw" == John Paul Wallington
<jpw(a)shootybangbang.com> writes:
>
> jpw> Sorry, I wasn't paying attention. That isn't a workaround:
> jpw> `functionp' is supposed to return nil for a macro.
>
> Right, but the question is "what should functionp return for an
> autoload?"
Return T because an autoloaded function is still a function. Our
FUNCTIONP docstring even defines what a function is -- "an object that
can be applied to arguments, using for example `funcall' or `apply'."
Of course, when we know that what we're going to autoload is not a
function, we might as well return NIL immediately. And that's all
Paul is asking for. A patch might look like this (minimally tested):
[patch elided]
Thanks Hrvoje!
Compilation says:
eval.c: In function `Ffunctionp':
eval.c:3840: warning: implicit declaration of function `Fcdr_safe'
Minimal testing:
xemacs -vanilla
(functionp 'loop)
=> nil
Hooray!
--
John Paul Wallington