From 99e08c92bb5d8a695062ce53e2cffeffd3a058a6 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sun, 7 Apr 2024 18:42:43 +0200 Subject: [PATCH] Add beacon remap for meow-change-save (#581) --- meow-beacon.el | 13 +++++++++++++ meow-keymap.el | 1 + 2 files changed, 14 insertions(+) diff --git a/meow-beacon.el b/meow-beacon.el index d11cdb1c..71890496 100644 --- a/meow-beacon.el +++ b/meow-beacon.el @@ -459,6 +459,19 @@ The recorded kmacro will be applied to all cursors immediately." (setq-local meow--beacon-insert-enter-key last-input-event) (setq meow--beacon-defining-kbd-macro 'quick))) +(defun meow-beacon-change-save () + "Change and start kmacro recording. + +Will terminate recording when exit insert mode. +The recorded kmacro will be applied to all cursors immediately." + (interactive) + (meow--with-selection-fallback + (meow-beacon-mode -1) + (meow-change-save) + (call-interactively #'kmacro-start-macro) + (setq-local meow--beacon-insert-enter-key last-input-event) + (setq meow--beacon-defining-kbd-macro 'quick))) + (defun meow-beacon-change-char () "Change and start kmacro recording. diff --git a/meow-keymap.el b/meow-keymap.el index c76535d3..0aca7574 100644 --- a/meow-keymap.el +++ b/meow-keymap.el @@ -116,6 +116,7 @@ (define-key map [remap meow-insert] 'meow-beacon-insert) (define-key map [remap meow-append] 'meow-beacon-append) (define-key map [remap meow-change] 'meow-beacon-change) + (define-key map [remap meow-change-save] 'meow-beacon-change-save) (define-key map [remap meow-replace] 'meow-beacon-replace) (define-key map [remap meow-kill] 'meow-beacon-kill-delete)