summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2017-04-16 10:01:09 +0000
committerAlan Mackenzie <acm@muc.de>2017-04-16 10:01:09 +0000
commit92879a1b035baf297158812ccdbaf6ae1d157e16 (patch)
treefe565cbaea272bc550bc833b7e32d66af1b2f7f7
parentbdd0c8600fcd33b6f8a535a66343591a29575042 (diff)
downloademacs-92879a1b035baf297158812ccdbaf6ae1d157e16.tar.gz
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.
-rw-r--r--lisp/help-fns.el6
1 files 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.