From: Robert Pluim <rpluim@gmail.com>
To: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
Cc: 59539@debbugs.gnu.org
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 [thread overview]
Message-ID: <87v8mdoqn4.fsf@gmail.com> (raw)
In-Reply-To: <TY2PR0101MB3693EF7ADB9389A508C60A64DA0F9@TY2PR0101MB3693.apcprd01.prod.exchangelabs.com> (Ramesh Nedunchezian's message of "Thu, 24 Nov 2022 16:28:47 +0530")
>>>>> 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
--
next prev parent reply other threads:[~2022-12-14 17:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-24 10:58 bug#59539: 29.0.50; Commands created with `insert-kbd-macro` are NOT getting repeated Ramesh Nedunchezian
2022-12-14 17:13 ` Robert Pluim [this message]
2022-12-15 7:20 ` Juri Linkov
2022-12-15 9:45 ` Robert Pluim
2022-12-17 17:20 ` Juri Linkov
2022-12-27 9:19 ` Ramesh Nedunchezian
2022-12-27 18:06 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v8mdoqn4.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=59539@debbugs.gnu.org \
--cc=rameshnedunchezian@outlook.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).