From 5c18500b873802a3b167caef98c0ced62515b2ef Mon Sep 17 00:00:00 2001 From: DogLooksGood Date: Sun, 1 Dec 2024 19:25:55 +0800 Subject: [PATCH] Fix the warning on (kbd "ESC") --- meow-keymap.el | 1 - meow-keypad.el | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/meow-keymap.el b/meow-keymap.el index 598dd7a..05ef90b 100644 --- a/meow-keymap.el +++ b/meow-keymap.el @@ -82,7 +82,6 @@ (define-key map (kbd "DEL") 'meow-keypad-undo) (define-key map (kbd "") 'meow-keypad-undo) (define-key map (kbd "") 'meow-keypad-quit) - (define-key map "" 'meow-keypad-quit) (define-key map [remap keyboard-quit] 'meow-keypad-quit) map) "Keymap for Meow keypad state.") diff --git a/meow-keypad.el b/meow-keypad.el index 02d17d2..e7be34d 100644 --- a/meow-keypad.el +++ b/meow-keypad.el @@ -444,7 +444,9 @@ try replacing the last modifier and try again." (defun meow--keypad-handle-input-with-keymap (input-event) "Handle INPUT-EVENT with `meow-keypad-state-keymap'." - (let* ((k (kbd (single-key-description input-event))) + (let* ((k (if (= 27 input-event) + [escape] + (kbd (single-key-description input-event)))) (cmd (lookup-key meow-keypad-state-keymap k))) (if cmd (call-interactively cmd)