Skip to content

Commit 9a33349

Browse files
committed
Replace logical sexp in eval-sexp-and-replace
This function find the sexp to evaluate with `clojure-backward-logical-sexp`, but replaces it with `backward-kill-sexp`. This leads to incorrect results, e.g. when eval+replacing `#inst "2020"`, you get `#inst #inst "2020"`.
1 parent cc20841 commit 9a33349

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cider-eval.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,9 @@ buffer."
802802
;; we have to be sure the evaluation won't result in an error
803803
(cider-nrepl-sync-request:eval last-sexp)
804804
;; seems like the sexp is valid, so we can safely kill it
805-
(backward-kill-sexp)
805+
(let ((opoint (point)))
806+
(clojure-backward-logical-sexp)
807+
(kill-region (point) opoint))
806808
(cider-interactive-eval last-sexp
807809
(cider-eval-print-handler)
808810
nil

0 commit comments

Comments
 (0)