From 02b5bc805c9b5b7876d7302e172fd1ff9b1ba4aa Mon Sep 17 00:00:00 2001 From: Sean Farley Date: Fri, 13 Dec 2019 16:26:05 -0800 Subject: [PATCH] mu4e-util: allow ESC to exit a choice selection I occasionally find myself pressing escape to exit a menu choice in mu4e and it's a bit unfortunate that nothing happens. As best I could tell, since this is a C call, none of the keymaps are checked for `(keyboard-quit)' so we need to explicitly check for ESC here. --- mu4e/mu4e-utils.el | 1 + 1 file changed, 1 insertion(+) diff --git a/mu4e/mu4e-utils.el b/mu4e/mu4e-utils.el index 3946c043..3b43396e 100644 --- a/mu4e/mu4e-utils.el +++ b/mu4e/mu4e-utils.el @@ -253,6 +253,7 @@ trying an exact match." (while (not chosen) (message nil);; this seems needed... (setq choice (read-char-exclusive prompt)) + (if (eq choice 27) (keyboard-quit)) ;; quit if ESC is pressed (setq chosen (or (member choice choices) (member (downcase choice) choices) (member (upcase choice) choices))))