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.
This commit is contained in:
Sean Farley 2019-12-13 16:26:05 -08:00
parent 384fcc5df3
commit 02b5bc805c
1 changed files with 1 additions and 0 deletions

View File

@ -253,6 +253,7 @@ trying an exact match."
(while (not chosen) (while (not chosen)
(message nil);; this seems needed... (message nil);; this seems needed...
(setq choice (read-char-exclusive prompt)) (setq choice (read-char-exclusive prompt))
(if (eq choice 27) (keyboard-quit)) ;; quit if ESC is pressed
(setq chosen (or (member choice choices) (setq chosen (or (member choice choices)
(member (downcase choice) choices) (member (downcase choice) choices)
(member (upcase choice) choices)))) (member (upcase choice) choices))))