From 6a00914d6d4e4eaac4d4beea19570838a72a1e39 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 20 Oct 2017 19:18:23 -0400 Subject: [PATCH] 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. --- src/doc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/doc.c b/src/doc.c index 3286c12675a..e81740bfc1c 100644 --- a/src/doc.c +++ b/src/doc.c @@ -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)) -- 2.39.2