[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-lisp-state f6923427e9 121/125: Add variable evil-lisp
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-lisp-state f6923427e9 121/125: Add variable evil-lisp-state-default-state |
Date: |
Thu, 6 Jan 2022 04:58:46 -0500 (EST) |
branch: elpa/evil-lisp-state
commit f6923427e9e09b9d7a90a6148f8cdf14ffa74f81
Author: syl20bnr <sylvain.benner@gmail.com>
Commit: syl20bnr <sylvain.benner@gmail.com>
Add variable evil-lisp-state-default-state
Allow to choose the state to activate when leaving the list state.
---
evil-lisp-state.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/evil-lisp-state.el b/evil-lisp-state.el
index d3db8782e8..d9bf93c33d 100644
--- a/evil-lisp-state.el
+++ b/evil-lisp-state.el
@@ -145,6 +145,9 @@ If `evil-lisp-state-global' is non nil then this variable
has no effect."
:type 'sexp
:group 'evil-lisp-state))
+(defvar evil-lisp-state-default-state 'normal
+ "The state to activate when exiting lisp state")
+
(defmacro evil-lisp-state-enter-command (command)
"Wrap COMMAND to call evil-lisp-state before executing COMMAND."
(let ((funcname (if (string-match "lisp-state-"
@@ -180,8 +183,13 @@ If `evil-lisp-state-global' is non nil then this variable
has no effect."
:evil-states (normal)
:major-modes ,evil-lisp-state-major-modes)))
+(defun evil-lisp-state/quit ()
+ "Quit lisp state and set state `evil-lisp-state-default-state'."
+ (interactive)
+ (funcall (intern (format "evil-%S-state" evil-lisp-state-default-state))))
+
;; escape
-(define-key evil-lisp-state-map [escape] 'evil-normal-state)
+(define-key evil-lisp-state-map [escape] 'evil-lisp-state/quit)
;; toggle lisp state
(define-key evil-lisp-state-map "." 'lisp-state-toggle-lisp-state)
;; hjkl
- [nongnu] elpa/evil-lisp-state df3f2e1a3c 111/125: Fix confusing message in toggle state func, (continued)
- [nongnu] elpa/evil-lisp-state df3f2e1a3c 111/125: Fix confusing message in toggle state func, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 36e74307b5 083/125: Add `I` evil key binding, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 81ffba2855 086/125: Version 4.1, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state fdddd81806 096/125: Rethink all the key-bindings to be used with evil-leader, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 8a3cffa60b 100/125: Add 0 and $ key bindings, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state ca00f0f6f5 103/125: fix `evil-list-state` typo in readme, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state ab02bf8cd3 110/125: Version 8: use bind-map instead of evil-leader, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 6491bdb6ff 119/125: use bind-map :evil-use-local, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 82601dc5ed 117/125: Fix dumb error, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state d2abdb86a2 118/125: Fix some minor issues with bind-map, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state f6923427e9 121/125: Add variable evil-lisp-state-default-state,
ELPA Syncer <=
- [nongnu] elpa/evil-lisp-state fb15814e55 017/125: Add key binding for sp-join-sexp `m` (think `merge-sexp), ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 2d13c56e14 042/125: Add expand-region dependency, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 872d59ebaf 058/125: Better formating for readme, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state d055246db1 060/125: Add synonyms for navigation commands in readme, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state df979a68a5 070/125: Wrap and unwrap are now on `w` and `W` respectively, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 483e20ff97 073/125: Regular evil `o` and `O` command, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state e1cf52572a 077/125: Remove expand-region dependency, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 383de2fdd3 082/125: Remove warning in readme, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state c0b43aa30e 087/125: Add `Shift-Return` to insert new line and switch to insert state, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-lisp-state 7bd49350df 090/125: Change sp-absorb-sexp binding to `B`, ELPA Syncer, 2022/01/06