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

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

[nongnu] elpa/evil-escape 09e0622e16 109/133: Add support for image-mode


From: ELPA Syncer
Subject: [nongnu] elpa/evil-escape 09e0622e16 109/133: Add support for image-mode
Date: Wed, 3 Jan 2024 21:59:57 -0500 (EST)

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

    Add support for image-mode
---
 README.md      |  1 +
 evil-escape.el | 11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 7304569357..c02c8c8207 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,7 @@ Press quickly `fd` (or the 2-keys sequence of your choice) to:
 - quit minibuffer
 - abort isearch
 - quit ibuffer
+- quit image buffer
 - quit compilation buffers
 - quit magit buffers
 - quit help buffers
diff --git a/evil-escape.el b/evil-escape.el
index fe26a85a80..c1a39117cb 100644
--- a/evil-escape.el
+++ b/evil-escape.el
@@ -37,6 +37,7 @@
 ;;   - quit compilation buffers
 ;;   - abort isearch
 ;;   - quit ibuffer
+;;   - quit image buffer
 ;;   - quit magit buffers
 ;;   - quit help buffers
 ;;   - quit apropos buffers
@@ -201,7 +202,8 @@ with a key sequence."
        (not evil-escape-inhibit)
        (or (window-minibuffer-p)
            (bound-and-true-p isearch-mode)
-           (eq 'ibuffer-mode major-mode)
+           (memq major-mode '(ibuffer-mode
+                              image-mode))
            (evil-escape--is-magit-buffer)
            (and (fboundp 'helm-alive-p) (helm-alive-p))
            (or (not (eq 'normal evil-state))
@@ -223,6 +225,7 @@ with a key sequence."
   (cond
    ((and (fboundp 'helm-alive-p) (helm-alive-p)) 'helm-keyboard-quit)
    ((eq 'ibuffer-mode major-mode) 'ibuffer-quit)
+   ((eq 'image-mode major-mode) 'quit-window)
    ((evil-escape--is-magit-buffer) 'evil-escape--escape-with-q)
    ((bound-and-true-p isearch-mode) 'isearch-abort)
    ((window-minibuffer-p) 'abort-recursive-edit)
@@ -235,7 +238,8 @@ with a key sequence."
                            help-mode
                            ert-results-mode
                            ert-simple-view-mode
-                           compilation-mode))) 'quit-window)
+                           compilation-mode
+                           image-mode))) 'quit-window)
    ((eq 'undo-tree-visualizer-mode major-mode) 'undo-tree-visualizer-quit)
    ((and (fboundp 'helm-ag--edit-abort)
          (string-equal "*helm-ag-edit*" (buffer-name))) 'helm-ag--edit-abort)
@@ -251,7 +255,8 @@ with a key sequence."
    ((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)
+   ((memq major-mode '(gist-list-menu-mode
+                       image-mode)) 'quit-window)
    (t 'evil-normal-state)))
 
 (defun evil-escape--first-key ()



reply via email to

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