Tweak Fdocumentation's error for an undefined function

* src/doc.c (Fdocumentation): Restore the pre-25 behavior
of signalling a void-function error for an undefined function.
This seems cleaner than Emacs 25's "invalid-function: nil" error,
which was (probably) an unintended consequence of changes to
Findirect_function.
This commit is contained in:
Glenn Morris 2017-10-20 19:18:23 -04:00
parent 7c63655e39
commit 6a00914d6d

View file

@ -336,6 +336,8 @@ string is passed through `substitute-command-keys'. */)
}
fun = Findirect_function (function, Qnil);
if (NILP (fun))
xsignal1 (Qvoid_function, function);
if (CONSP (fun) && EQ (XCAR (fun), Qmacro))
fun = XCDR (fun);
if (SUBRP (fun))