summaryrefslogtreecommitdiff
path: root/lisp/macros.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-01-23 16:48:42 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2022-01-23 16:48:42 +0100
commita82c3557fc49a5c4f0f71f769daf778770597b95 (patch)
treeb2e10679a2dae421cf1651e84ccd6187bf5f3a8b /lisp/macros.el
parent80098a2830cafe0a09f18c5186bf670a91828fef (diff)
downloademacs-a82c3557fc49a5c4f0f71f769daf778770597b95.tar.gz
Make `C-x M-x insert-kbd-macro RET RET' work better
* lisp/macros.el (insert-kbd-macro): Don't give bogus output on names that have no function definition (bug#30309).
Diffstat (limited to 'lisp/macros.el')
-rw-r--r--lisp/macros.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/macros.el b/lisp/macros.el
index 4cb4e98d3fd..35d34d2e337 100644
--- a/lisp/macros.el
+++ b/lisp/macros.el
@@ -134,8 +134,9 @@ use this command, and then save the file."
(_ (prin1 definition (current-buffer))))))
(insert ")\n")
(if keys
- (let ((keys (or (where-is-internal (symbol-function macroname)
- '(keymap))
+ (let ((keys (or (and (symbol-function macroname)
+ (where-is-internal (symbol-function macroname)
+ '(keymap)))
(where-is-internal macroname '(keymap)))))
(while keys
(insert "(global-set-key ")