]> git.eshelyaron.com Git - emacs.git/commitdiff
Add explicit support for C-g or ESC ESC ESC after keymap prompt
authorDmitry Gutov <dgutov@yandex.ru>
Wed, 7 Apr 2021 00:24:17 +0000 (03:24 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Wed, 7 Apr 2021 00:25:18 +0000 (03:25 +0300)
* lisp/progmodes/project.el (project-switch-project):
Add explicit support for C-g or ESC ESC ESC after keymap prompt
(bug#47620).

lisp/progmodes/project.el

index 84d02e25d939eca68b468ec5b1a7b3fa99993d3a..a819e7243cad1d67da46020dabca420889c9ede6 100644 (file)
@@ -1363,7 +1363,11 @@ to directory DIR."
                       (assq command commands-menu))
             ;; TODO: Add some hint to the prompt, like "key not
             ;; recognized" or something.
-            (setq command nil)))))
+            (setq command nil)))
+        (let ((global-command (lookup-key (current-global-map) choice)))
+          (when (memq global-command
+                      '(keyboard-quit keyboard-escape-quit))
+            (call-interactively global-command)))))
     (let ((default-directory dir)
           (project-current-inhibit-prompt t))
       (call-interactively command))))