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

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

[nongnu] elpa/meow 2d352b94df: Quit keypad on any error


From: ELPA Syncer
Subject: [nongnu] elpa/meow 2d352b94df: Quit keypad on any error
Date: Sun, 1 Dec 2024 16:00:16 -0500 (EST)

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

    Quit keypad on any error
---
 meow-keypad.el | 36 +++++++++++++++++++++---------------
 1 file changed, 21 insertions(+), 15 deletions(-)

diff --git a/meow-keypad.el b/meow-keypad.el
index 9f8d49b833..8135f84458 100644
--- a/meow-keypad.el
+++ b/meow-keypad.el
@@ -513,27 +513,33 @@ try replacing the last modifier and try again."
 (defun meow-keypad-start ()
   "Enter keypad state with current input as initial key sequences."
   (interactive)
-  (setq this-command last-command
-        meow--keypad-keys nil
-        meow--keypad-previous-state (meow--current-state)
-        meow--prefix-arg current-prefix-arg)
-  (meow--switch-state 'keypad)
-  (meow--keypad-handle-input-with-keymap last-input-event)
-  (while (not (meow--keypad-handle-input-with-keymap (read-key)))))
+  (condition-case _
+      (progn
+        (setq this-command last-command
+              meow--keypad-keys nil
+              meow--keypad-previous-state (meow--current-state)
+              meow--prefix-arg current-prefix-arg)
+        (meow--switch-state 'keypad)
+        (meow--keypad-handle-input-with-keymap last-input-event)
+        (while (not (meow--keypad-handle-input-with-keymap (read-key)))))
+    (t (meow--keypad-quit))))
 
 (defun meow-keypad-start-with (input)
   "Enter keypad state with INPUT.
 
 A string INPUT, stands for initial keys.
 When INPUT is nil, start without initial keys."
-  (setq this-command last-command
-        meow--keypad-keys (when input (meow--parse-string-to-keypad-keys 
input))
-        meow--keypad-previous-state (meow--current-state)
-        meow--prefix-arg current-prefix-arg)
-  (meow--switch-state 'keypad)
-  (meow--keypad-show-message)
-  (meow--keypad-display-message)
-  (while (not (meow--keypad-handle-input-with-keymap (read-key)))))
+  (condition-case e
+      (progn
+        (setq this-command last-command
+              meow--keypad-keys (when input (meow--parse-string-to-keypad-keys 
input))
+              meow--keypad-previous-state (meow--current-state)
+              meow--prefix-arg current-prefix-arg)
+        (meow--switch-state 'keypad)
+        (meow--keypad-show-message)
+        (meow--keypad-display-message)
+        (while (not (meow--keypad-handle-input-with-keymap (read-key)))))
+    (t (meow--keypad-quit))))
 
 (defun meow-keypad-describe-key ()
   "Describe key via KEYPAD input."



reply via email to

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