diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi index e94e222e6a6..ed3cf56e098 100644 --- a/doc/lispref/eval.texi +++ b/doc/lispref/eval.texi @@ -435,7 +435,7 @@ expansion. @cindex forms, special @cindex evaluation of special forms - A @dfn{special form} is a primitive function specially marked so that + A @dfn{special form} is a primitive specially marked so that its arguments are not all evaluated. Most special forms define control structures or perform variable bindings---things which functions cannot do. diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 2f386eaa47e..55bbf8fd5a2 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -146,7 +146,12 @@ function: This function returns @code{t} if @var{object} is any kind of function, i.e., can be passed to @code{funcall}. Note that @code{functionp} returns @code{t} for symbols that are function names, -and returns @code{nil} for special forms. +and returns @code{nil} for symbols that are macros or special forms. + +If @var{object} is not a function, this function ordinarily returns +@code{nil}. However, the representation of function objects is +complicated, and for efficiency reasons in rare cases this function +can return @code{t} even when @var{object} is not a function. @end defun It is also possible to find out how many arguments an arbitrary diff --git a/src/eval.c b/src/eval.c index 950338bf799..29c122e2fb2 100644 --- a/src/eval.c +++ b/src/eval.c @@ -2805,9 +2805,11 @@ apply1 (Lisp_Object fn, Lisp_Object arg) DEFUN ("functionp", Ffunctionp, Sfunctionp, 1, 1, 0, doc: /* Return t if OBJECT is a function. -An object is a function if it is callable via `funcall'; -this includes primitive functions, byte-code functions, closures, and -symbols with function bindings. */) +An object is a function if it is callable via `funcall'; this includes +symbols with function bindings, but excludes macros and special forms. + +Ordinarily return nil if OBJECT is not a function, although t might be +returned in rare cases. */) (Lisp_Object object) { if (FUNCTIONP (object))