From 92879a1b035baf297158812ccdbaf6ae1d157e16 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sun, 16 Apr 2017 10:01:09 +0000 Subject: [PATCH] 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. --- lisp/help-fns.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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. -- 2.39.5