emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/evil-escape c80afe7335 099/133: Handle minibuffer in emacs


From: ELPA Syncer
Subject: [nongnu] elpa/evil-escape c80afe7335 099/133: Handle minibuffer in emacs-state as well
Date: Wed, 3 Jan 2024 21:59:56 -0500 (EST)

branch: elpa/evil-escape
commit c80afe73355b511ab1e449296776ad8f1bbc9ae0
Author: sbenner <sylvain.benner@ubisoft.com>
Commit: sbenner <sylvain.benner@ubisoft.com>

    Handle minibuffer in emacs-state as well
---
 evil-escape.el | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/evil-escape.el b/evil-escape.el
index a9b8fa7342..27f9a04a0a 100644
--- a/evil-escape.el
+++ b/evil-escape.el
@@ -5,7 +5,7 @@
 ;; Author: Sylvain Benner <sylvain.benner@gmail.com>
 ;; Keywords: convenience editing evil
 ;; Created: 22 Oct 2014
-;; Version: 3.10
+;; Version: 3.11
 ;; Package-Requires: ((emacs "24") (evil "1.0.9") (cl-lib "0.5"))
 ;; URL: https://github.com/syl20bnr/evil-escape
 
@@ -230,13 +230,15 @@ with a key sequence."
 
 (defun evil-escape--escape-emacs-state ()
   "Return the function to escape from emacs state."
-  (cond ((string-match "magit" (symbol-name major-mode))
-         'evil-escape--escape-with-q)
-        ((eq 'ibuffer-mode major-mode) 'ibuffer-quit)
-        ((eq 'emoji-cheat-sheet-plus-buffer-mode major-mode) 'kill-this-buffer)
-        ((eq 'paradox-menu-mode major-mode) 'evil-escape--escape-with-q)
-        ((eq 'gist-list-menu-mode major-mode) 'quit-window)
-        (t 'evil-normal-state)))
+  (cond
+   ((bound-and-true-p isearch-mode) 'isearch-abort)
+   ((window-minibuffer-p) 'abort-recursive-edit)
+   ((string-match "magit" (symbol-name major-mode)) 
'evil-escape--escape-with-q)
+   ((eq 'ibuffer-mode major-mode) 'ibuffer-quit)
+   ((eq 'emoji-cheat-sheet-plus-buffer-mode major-mode) 'kill-this-buffer)
+   ((eq 'paradox-menu-mode major-mode) 'evil-escape--escape-with-q)
+   ((eq 'gist-list-menu-mode major-mode) 'quit-window)
+   (t 'evil-normal-state)))
 
 (defun evil-escape--first-key ()
   "Return the first key string in the key sequence."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]