emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/meow 574773e487: Add meow-keypad-execute-on-beacons


From: ELPA Syncer
Subject: [nongnu] elpa/meow 574773e487: Add meow-keypad-execute-on-beacons
Date: Sat, 9 Nov 2024 19:00:22 -0500 (EST)

branch: elpa/meow
commit 574773e487e5f7d1f604e5025f17dea962abeec8
Author: DogLooksGood <doglooksgood@hotmail.com>
Commit: DogLooksGood <doglooksgood@hotmail.com>

    Add meow-keypad-execute-on-beacons
---
 meow-keypad.el | 19 ++++++++++++++++++-
 meow-var.el    |  8 ++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/meow-keypad.el b/meow-keypad.el
index 25c3ff49a0..fd71f53a93 100644
--- a/meow-keypad.el
+++ b/meow-keypad.el
@@ -40,6 +40,7 @@
 (require 'meow-var)
 (require 'meow-util)
 (require 'meow-helpers)
+(require 'meow-beacon)
 
 (defun meow--keypad-format-upcase (k)
   "Return S-k for upcase k."
@@ -367,6 +368,22 @@ Returning DEF will result in a generated title."
                  (propertize pre 'face 'font-lock-comment-face)))
              (propertize (meow--keypad-format-keys nil) 'face 
'font-lock-string-face))))
 
+(defun meow--keypad-execute (command)
+  "Execute the COMMAND.
+
+If there are beacons, execute it at every beacon."
+  (cond
+   ((and meow-keypad-execute-on-beacons
+         (not defining-kbd-macro)
+         (not executing-kbd-macro)
+         (meow--beacon-inside-secondary-selection)
+         meow--beacon-overlays)
+    (call-interactively command)
+    (meow--beacon-apply-command command))
+
+   (t
+    (call-interactively command))))
+
 (defun meow--keypad-try-execute ()
   "Try execute command.
 
@@ -389,7 +406,7 @@ try replacing the last modifier and try again."
             (meow--keypad-quit)
             (setq real-this-command cmd
                   this-command cmd)
-            (call-interactively cmd))))
+            (meow--keypad-execute cmd))))
        ((keymapp cmd)
         (when meow-keypad-message (meow--keypad-show-message))
         (meow--keypad-display-message))
diff --git a/meow-var.el b/meow-var.el
index e5dc50cdc1..0d8420f52d 100644
--- a/meow-var.el
+++ b/meow-var.el
@@ -46,6 +46,14 @@ This will affect how selection is displayed."
   :group 'meow
   :type '(repeat sexp))
 
+(defcustom meow-keypad-execute-on-beacons nil
+  "Execute keypad command directly on beacons when using it directly from
+beacon state.
+
+This doesn't affect how keypad works on recording or executing a kmacro."
+  :group 'meow
+  :type 'boolean)
+
 (defcustom meow-selection-command-fallback
   '((meow-change . meow-change-char)
     (meow-kill . meow-C-k)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]