Skip to content

Commit 9542769

Browse files
yuhan0bbatsov
authored andcommitted
Fix indentation of eval-to-comments
1 parent 4839398 commit 9542769

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cider-eval.el

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,11 +830,15 @@ RESULT will be preceded by COMMENT-PREFIX.
830830
CONTINUED-PREFIX is inserted for each additional line of output.
831831
COMMENT-POSTFIX is inserted after final text output."
832832
(unless (string= result "")
833-
(let ((lines (split-string result "[\n]+" t)))
833+
(clojure-indent-line)
834+
(let ((lines (split-string result "[\n]+" t))
835+
(beg (point))
836+
(col (current-indentation)))
834837
;; only the first line gets the normal comment-prefix
835838
(insert (concat comment-prefix (pop lines)))
836839
(dolist (elem lines)
837840
(insert (concat "\n" continued-prefix elem)))
841+
(indent-rigidly beg (point) col)
838842
(unless (string= comment-postfix "")
839843
(insert comment-postfix)))))
840844

0 commit comments

Comments
 (0)