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

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

[nongnu] elpa/evil ad80a0a185: Don't disable keypad num fallbacks for di


From: ELPA Syncer
Subject: [nongnu] elpa/evil ad80a0a185: Don't disable keypad num fallbacks for digraph's read-key
Date: Sat, 4 Nov 2023 18:59:17 -0400 (EDT)

branch: elpa/evil
commit ad80a0a185ba1b28d19813e55acabb9d38419657
Author: Tom Dalziel <tom_dl@hotmail.com>
Commit: Tom Dalziel <tom_dl@hotmail.com>

    Don't disable keypad num fallbacks for digraph's read-key
---
 evil-common.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/evil-common.el b/evil-common.el
index e266e1b1c3..bc5e28206e 100644
--- a/evil-common.el
+++ b/evil-common.el
@@ -565,6 +565,15 @@ as a command. Its main use is in the `evil-read-key-map'."
   (interactive)
   (read-quoted-char))
 
+(defvar evil-digraph-read-key-keymap
+  (let ((map (make-sparse-keymap))
+        (n ?0))
+    (while (<= n ?9)
+      (define-key map (kbd (concat "<kp-" (string n) ">")) nil)
+      (cl-incf n))
+    map)
+   "By default, used to exclude otherwise disabled fallbacks.")
+
 (declare-function evil-digraph "evil-digraphs")
 (defun evil-read-digraph-char-with-overlay (overlay)
   "Read two chars, displaying the first in OVERLAY, replacing \"?\".
@@ -572,7 +581,7 @@ Return the digraph from `evil-digraph', else return second 
char."
   (interactive)
   (unwind-protect
       (let ((read-key-empty-map
-             (let ((map (make-sparse-keymap)))
+             (let ((map (copy-keymap evil-digraph-read-key-keymap)))
                (set-keymap-parent map read-key-empty-map)
                ;; Disable read-key-sequence unbound fallbacks, e.g. downcasing
                (define-key map [t] 'dummy)



reply via email to

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