diff options
| author | Tom Dalziel <tom_dl@hotmail.com> | 2023-11-04 19:29:34 +0000 |
|---|---|---|
| committer | Tom Dalziel <tom_dl@hotmail.com> | 2023-11-04 20:34:11 +0000 |
| commit | ad80a0a185ba1b28d19813e55acabb9d38419657 (patch) | |
| tree | d59d801e9b342352e4bab764d44cf83579401959 /evil-common.el | |
| parent | d28206ccff74bc07ba335b8ff77805564f6928d7 (diff) | |
Don't disable keypad num fallbacks for digraph's read-key
Diffstat (limited to 'evil-common.el')
| -rw-r--r-- | evil-common.el | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/evil-common.el b/evil-common.el index e266e1b..bc5e282 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) |
