branch: elpa/evil-iedit-state commit a30b4904229e647a807e70acea791872e74d607e Author: syl20bnr <sylvain.ben...@gmail.com> Commit: syl20bnr <sylvain.ben...@gmail.com>
Add variable evil-iedit-state-default-state Allow to choose which state to activate when leaving the iedit states. --- evil-iedit-state.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/evil-iedit-state.el b/evil-iedit-state.el index 5e2e8597a5..ff252aa3cb 100644 --- a/evil-iedit-state.el +++ b/evil-iedit-state.el @@ -34,6 +34,9 @@ (require 'evil) (require 'iedit) +(defvar evil-iedit-state-default-state 'normal + "The state to activate when exiting iedit state") + (evil-define-state iedit "`iedit state' interfacing iedit mode." :tag " <E> " @@ -61,9 +64,10 @@ "Quit iedit-mode and return to `normal state'." (interactive) (iedit-done) - (evil-normal-state)) + (funcall (intern (format "evil-%S-state" evil-iedit-state-default-state)))) -(defmacro evil-iedit-state||swith-to-insert-state-after-command (command &optional interactive) +(defmacro evil-iedit-state||swith-to-insert-state-after-command + (command &optional interactive) "Call COMMAND and switch to iedit-insert state. If INTERACTIVE is non-nil then COMMAND is called interactively." `(progn