From: Alan Mackenzie Date: Sun, 16 Apr 2017 10:01:09 +0000 (+0000) Subject: Fix bug #26529: C-h k errors with a lambda function bound to a key. X-Git-Tag: emacs-26.0.90~521^2~620 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=92879a1b035baf297158812ccdbaf6ae1d157e16;p=emacs.git Fix bug #26529: C-h k errors with a lambda function bound to a key. * lisp/help-fns.el (help-fns--signature, describe-function-1): Check `function' is a symbol before trying to get property `reader-construct' from it. --- diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 5459ddf4a39..2c635ffa500 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -473,7 +473,8 @@ suitable file is found, return nil." (let ((fill-begin (point)) (high-usage (car high)) (high-doc (cdr high))) - (unless (get function 'reader-construct) + (unless (and (symbolp function) + (get function 'reader-construct)) (insert high-usage "\n")) (fill-region fill-begin (point)) high-doc))))) @@ -613,7 +614,8 @@ FILE is the file where FUNCTION was probably defined." ;; Print what kind of function-like object FUNCTION is. (princ (cond ((or (stringp def) (vectorp def)) "a keyboard macro") - ((get function 'reader-construct) + ((and (symbolp function) + (get function 'reader-construct)) "a reader construct") ;; Aliases are Lisp functions, so we need to check ;; aliases before functions.