Skip to content

Commit

Permalink
fix: the paredit-splice should not backward 1 form if current point a…
Browse files Browse the repository at this point in the history
…lready at open-char
  • Loading branch information
sakurawald committed Dec 11, 2024
1 parent 3f325ba commit aa3e9ab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion extensions/paredit-mode/paredit-mode.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
link : http://www.daregada.sakuraweb.com/paredit_tutorial_ja.html
|#


(defpackage :lem-paredit-mode
(:use :cl
:lem)
Expand Down Expand Up @@ -473,7 +474,11 @@ link : http://www.daregada.sakuraweb.com/paredit_tutorial_ja.html
(delete-character end)
(delete-character start))))
(t
(scan-lists start -1 1)
;; If current-point is already at open-char, simply select current list.
(unless
(syntax-open-paren-char-p (character-at start))
(scan-lists start -1 1))

(when (syntax-open-paren-char-p (character-at start))
(with-point ((end start))
(scan-lists end 1 0)
Expand Down

0 comments on commit aa3e9ab

Please sign in to comment.