* lisp/macros.el (insert-kbd-macro): Don't give bogus output on
names that have no function definition (bug#30309).
(_ (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 ")