branch: elpa/cider
commit 9542769debba7b983bd9e15644238e9826156218
Author: yuhan0 <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Fix indentation of eval-to-comments
---
 cider-eval.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cider-eval.el b/cider-eval.el
index 5ea02b21e1..3c821e082c 100644
--- a/cider-eval.el
+++ b/cider-eval.el
@@ -830,11 +830,15 @@ RESULT will be preceded by COMMENT-PREFIX.
 CONTINUED-PREFIX is inserted for each additional line of output.
 COMMENT-POSTFIX is inserted after final text output."
   (unless (string= result "")
-    (let ((lines (split-string result "[\n]+" t)))
+    (clojure-indent-line)
+    (let ((lines (split-string result "[\n]+" t))
+          (beg (point))
+          (col (current-indentation)))
       ;; only the first line gets the normal comment-prefix
       (insert (concat comment-prefix (pop lines)))
       (dolist (elem lines)
         (insert (concat "\n" continued-prefix elem)))
+      (indent-rigidly beg (point) col)
       (unless (string= comment-postfix "")
         (insert comment-postfix)))))
 

Reply via email to