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

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

[nongnu] elpa/evil-lisp-state 12f974b74d 124/125: Allow navigation for b


From: ELPA Syncer
Subject: [nongnu] elpa/evil-lisp-state 12f974b74d 124/125: Allow navigation for braces and brackets with j/k.
Date: Thu, 6 Jan 2022 04:58:46 -0500 (EST)

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

    Allow navigation for braces and brackets with j/k.
---
 evil-lisp-state.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/evil-lisp-state.el b/evil-lisp-state.el
index 89f83b7625..969f73b518 100644
--- a/evil-lisp-state.el
+++ b/evil-lisp-state.el
@@ -68,9 +68,9 @@
 ;; `leader H'   | go to previous sexp
 ;; `leader i'   | switch to `insert state`
 ;; `leader I'   | go to beginning of current expression and switch to `insert 
state`
-;; `leader j'   | next closing parenthesis
+;; `leader j'   | next closing parenthesis/bracket/brace
 ;; `leader J'   | join expression
-;; `leader k'   | previous opening parenthesis
+;; `leader k'   | previous opening parenthesis/bracket/brace
 ;; `leader l'   | next symbol
 ;; `leader L'   | go to next sexp
 ;; `leader p'   | paste after
@@ -285,13 +285,13 @@ If `evil-lisp-state-global' is non nil then this variable 
has no effect."
   (sp-wrap-with-pair "("))
 
 (defun evil-lisp-state-next-paren (&optional closing)
-  "Go to the next/previous closing/opening parenthesis."
+  "Go to the next/previous closing/opening parenthesis/bracket/brace."
   (if closing
       (let ((curr (point)))
         (forward-char)
-        (unless (eq curr (search-forward ")"))
+        (unless (eq curr (search-forward-regexp "[])}]"))
           (backward-char)))
-    (search-backward "(")))
+    (search-backward-regexp "[[({]")))
 
 (defun lisp-state-prev-opening-paren ()
   "Go to the next closing parenthesis."



reply via email to

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