mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Find macro binding for symbol-bound macros too (Bug#6848)
There are 2 ways to bind a macro: with global-set-key or kmacro-bind-to-key. The former binds a key to a symbol, while the latter binds to a lambda. In 2010-03-03 "Fix keyboard macro key lookup (Bug#5481)", `insert-kbd-macro' was fixed to detect the lambda case, but broke the symbol case. * lisp/macros.el (insert-kbd-macro): Also check for bindings of MACRONAME.
This commit is contained in:
parent
3f1cd957ff
commit
907bad07f2
1 changed files with 3 additions and 2 deletions
|
|
@ -140,8 +140,9 @@ use this command, and then save the file."
|
|||
(prin1 definition (current-buffer))))
|
||||
(insert ")\n")
|
||||
(if keys
|
||||
(let ((keys (where-is-internal (symbol-function macroname)
|
||||
'(keymap))))
|
||||
(let ((keys (or (where-is-internal (symbol-function macroname)
|
||||
'(keymap))
|
||||
(where-is-internal macroname '(keymap)))))
|
||||
(while keys
|
||||
(insert "(global-set-key ")
|
||||
(prin1 (car keys) (current-buffer))
|
||||
|
|
|
|||
Loading…
Reference in a new issue