GNU bug report logs - #6848
insert-kbd-macro

Previous Next

Package: emacs;

Reported by: "Goodrich, Charles H. (KSC-ASRC-433)[ASRC AEROSPACE]" <charles.h.goodrich <at> nasa.gov>

Date: Thu, 12 Aug 2010 15:01:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #8 received at 6848 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: 6848 <at> debbugs.gnu.org
Subject: RE: bug#6848: insert-kbd-macro
Date: Tue, 31 May 2016 20:00:23 -0400
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. The fix for #5481 fixed the lambda case but
broke the symbol case. Should be easy enough to handle both:

diff --git i/lisp/macros.el w/lisp/macros.el
index f7a4732..c456dcb 100644
--- i/lisp/macros.el
+++ w/lisp/macros.el
@@ -140,8 +140,9 @@ insert-kbd-macro
     (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))




This bug report was last modified 8 years and 151 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.