emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 6a00914: Tweak Fdocumentation's error for an unde


From: Glenn Morris
Subject: [Emacs-diffs] emacs-26 6a00914: Tweak Fdocumentation's error for an undefined function
Date: Fri, 20 Oct 2017 19:18:32 -0400 (EDT)

branch: emacs-26
commit 6a00914d6d4e4eaac4d4beea19570838a72a1e39
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    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 3286c12..e81740b 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]