[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-escape 9c8799446f 080/133: Add support for spacemacs
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-escape 9c8799446f 080/133: Add support for spacemacs hybrid-state and fix emacs state |
Date: |
Wed, 3 Jan 2024 21:59:55 -0500 (EST) |
branch: elpa/evil-escape
commit 9c8799446f16f9d304d55e7f90464d7155815ad2
Author: syl20bnr <sylvain.benner@gmail.com>
Commit: syl20bnr <sylvain.benner@gmail.com>
Add support for spacemacs hybrid-state and fix emacs state
Correctly insert and delete character in emacs state
---
evil-escape.el | 37 +++++++++++++++++++++++++------------
1 file changed, 25 insertions(+), 12 deletions(-)
diff --git a/evil-escape.el b/evil-escape.el
index 8f8e18aca6..a6457b6bd5 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.07
+;; Version: 3.08
;; Package-Requires: ((emacs "24") (evil "1.0.9"))
;; URL: https://github.com/syl20bnr/evil-escape
@@ -128,6 +128,7 @@ with a key sequence."
(`motion (evil-escape--escape-motion-state))
(`insert (evil-normal-state))
(`emacs (evil-escape--escape-emacs-state))
+ (`hybrid (evil-escape--escape-emacs-state))
(`evilified (evil-escape--escape-emacs-state))
(`visual (evil-exit-visual-state))
(`replace (evil-normal-state))
@@ -227,28 +228,40 @@ with a key sequence."
(defun evil-escape--insert ()
"Insert the first key of the sequence."
(pcase evil-state
- (`insert (pcase major-mode
- (`term-mode (call-interactively 'term-send-raw))
- (_ (cond
- ((bound-and-true-p isearch-mode) (isearch-printing-char))
- (t (evil-escape--insert-func))))) t)
+ (`insert (evil-escape--insert-2) t)
+ (`emacs (evil-escape--insert-2) t)
+ (`hybrid (evil-escape--insert-2) t)
(`normal
(when (window-minibuffer-p) (evil-escape--insert-func) t))
(`iedit-insert (evil-escape--insert-func) t)))
+(defun evil-escape--insert-2 ()
+ "Insert character while taking into account mode specificites."
+ (pcase major-mode
+ (`term-mode (call-interactively 'term-send-raw))
+ (_ (cond
+ ((bound-and-true-p isearch-mode) (isearch-printing-char))
+ (t (evil-escape--insert-func))))))
+
(defun evil-escape--delete ()
"Revert the insertion of the first key of the sequence."
(pcase evil-state
- (`insert (pcase major-mode
- (`term-mode (call-interactively 'term-send-backspace))
- (`deft-mode (call-interactively 'deft-filter-increment))
- (_ (cond
- ((bound-and-true-p isearch-mode) (isearch-delete-char))
- (t (evil-escape--delete-func))))))
+ (`insert (evil-escape--delete-2))
+ (`emacs (evil-escape--delete-2))
+ (`hybrid (evil-escape--delete-2))
(`normal
(when (minibuffer-window-active-p (evil-escape--delete-func))))
(`iedit-insert (evil-escape--delete-func))))
+(defun evil-escape--delete-2 ()
+ "Delete character while taking into account mode specifities."
+ (pcase major-mode
+ (`term-mode (call-interactively 'term-send-backspace))
+ (`deft-mode (call-interactively 'deft-filter-increment))
+ (_ (cond
+ ((bound-and-true-p isearch-mode) (isearch-delete-char))
+ (t (evil-escape--delete-func))))))
+
(defun evil-escape--escape-with-q ()
"Send `q' key press event to exit from a buffer."
(setq unread-command-events (listify-key-sequence "q")))
- [nongnu] elpa/evil-escape 739871a837 124/133: Enforce use of spaces for indentation, (continued)
- [nongnu] elpa/evil-escape 739871a837 124/133: Enforce use of spaces for indentation, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape f4e9116bfb 117/133: Add a separate var for controlling mode lighter, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape c3592a774e 123/133: Add minor introduction to the library commentary., ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape efe9a3a3d1 071/133: Simplify even more evil-escape-pre-command-hook, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape c2946d8f4f 120/133: Use lexical-binding, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape a7714e61b2 112/133: set `this-original-command`, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 02aee7f613 079/133: New variable evil-escape-unordered-key-sequence, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 25920fb2f4 114/133: Bump version to 3.15, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 8683314f68 127/133: Depend on Emacs 26 or later, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape b4d44fc501 111/133: Bump version to 3.14, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 9c8799446f 080/133: Add support for spacemacs hybrid-state and fix emacs state,
ELPA Syncer <=
- [nongnu] elpa/evil-escape b159b4307e 074/133: Allow evil-escape in motion state, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 9164cdad0b 075/133: Fix evil-escape--escape-motion-state syntax error, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 7603a2f288 092/133: Fix broken interactive evil-escape function, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape f62630c7d6 070/133: Simplify evil-escape-pre-command-hook, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 3d3c941db8 082/133: add evil escape suppressed predicates., ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 9f7ed13160 086/133: Add support for read-only buffers, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape 0039182e81 103/133: v3.13: use new funtion evil-lisp-state/quit, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape d9737a9075 096/133: Execute helm-keyboard-quit in helm buffers, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape aac5bc3206 115/133: Exit multiedit-insert-state into multiedit-state, ELPA Syncer, 2024/01/03
- [nongnu] elpa/evil-escape a14fb7a538 106/133: Change predicate to characterp in pre-command-hook, ELPA Syncer, 2024/01/03