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

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

[nongnu] elpa/evil-lisp-state 692507643f 064/125: Fix `o` and `O` behavi


From: ELPA Syncer
Subject: [nongnu] elpa/evil-lisp-state 692507643f 064/125: Fix `o` and `O` behavior
Date: Thu, 6 Jan 2022 04:58:41 -0500 (EST)

branch: elpa/evil-lisp-state
commit 692507643f63d151145d7de302e193ba2af659ab
Author: syl20bnr <sylvain.benner@gmail.com>
Commit: syl20bnr <sylvain.benner@gmail.com>

    Fix `o` and `O` behavior
---
 evil-lisp-state.el | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/evil-lisp-state.el b/evil-lisp-state.el
index 3aff484d31..f7d6c423f0 100644
--- a/evil-lisp-state.el
+++ b/evil-lisp-state.el
@@ -189,18 +189,22 @@ of COMMAND.
 (defun evil-lisp-state-insert-sexp-after ()
   "Insert sexp after the current one."
   (interactive)
+  (if (char-equal (char-after) ?\() (evil-lisp-state-forward-symbol))
   (sp-up-sexp)
   (evil-insert-state)
-  (insert " ")
+  (sp-newline)
   (sp-insert-pair "("))
 
 (defun evil-lisp-state-insert-sexp-before ()
   "Insert sexp before the current one."
   (interactive)
-  (sp-backward-up-sexp)
+  (if (char-equal (char-after) ?\() (evil-lisp-state-forward-symbol))
+  (sp-backward-sexp)
   (evil-insert-state)
-  (insert " ")
-  (backward-char 1)
-  (sp-insert-pair "("))
+  (sp-newline)
+  (evil-previous-visual-line)
+  (evil-end-of-line)
+  (sp-insert-pair "(")
+  (indent-for-tab-command))
 
 (provide 'evil-lisp-state)



reply via email to

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