[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 907bad0: Find macro binding for symbol-bound macros
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master 907bad0: Find macro binding for symbol-bound macros too (Bug#6848) |
Date: |
Tue, 21 Feb 2017 21:44:16 -0500 (EST) |
branch: master
commit 907bad07f25ca91e72ebb29a468c6b1b8b91fa49
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
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.
---
lisp/macros.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/macros.el b/lisp/macros.el
index c134829..fc65489 100644
--- a/lisp/macros.el
+++ b/lisp/macros.el
@@ -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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 907bad0: Find macro binding for symbol-bound macros too (Bug#6848),
Noam Postavsky <=