[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59539: 29.0.50; Commands created with `insert-kbd-macro` are NOT get
From: |
Robert Pluim |
Subject: |
bug#59539: 29.0.50; Commands created with `insert-kbd-macro` are NOT getting repeated. |
Date: |
Wed, 14 Dec 2022 18:13:03 +0100 |
>>>>> On Thu, 24 Nov 2022 16:28:47 +0530, Ramesh Nedunchezian
>>>>> <rameshnedunchezian@outlook.com> said:
Ramesh> (defalias 'my-cmd-a
Ramesh> (kmacro "C-f C-f"))
Ramesh> (defalias 'my-cmd-b
Ramesh> (kmacro "C-b C-b"))
Ramesh> (define-prefix-command 'my-kmacro-keymap)
Ramesh> (define-key my-kmacro-keymap (kbd "a") #'my-cmd-a)
Ramesh> (define-key my-kmacro-keymap (kbd "b") #'my-cmd-b)
Ramesh> (put 'my-cmd-a 'repeat-map 'my-kmacro-keymap)
Ramesh> (put 'my-cmd-b 'repeat-map 'my-kmacro-keymap)
Ramesh> (global-set-key (kbd "<f12>")
Ramesh> my-kmacro-keymap)
Ramesh> (repeat-mode -1)
Ramesh> (repeat-mode +1)
Hmm, with your recipe on emacs master, "<f12> b" repeats, but "<f12>
a" doesnʼt. I have no clue why, they call the same underlying
infrastructure.
If I use the following instead:
(defun my-cmd-a ()
(interactive)
(forward-char 2))
(defun my-cmd-b ()
(interactive)
(backward-char 2))
it all works as expected, but Iʼm guessing you have a bunch of macros
defined already.
Robert
--
- bug#59539: 29.0.50; Commands created with `insert-kbd-macro` are NOT getting repeated.,
Robert Pluim <=