Skip to content

Commit 92efe5f

Browse files
author
Bozhidar Batsov
committed
Simplify dummy contents generation
As suggested by @Vitoshka.
1 parent 14ac115 commit 92efe5f

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

cider-interaction.el

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,14 +1302,11 @@ When invoked with a prefix ARG the command doesn't prompt for confirmation."
13021302
(let ((current-ns (cider-current-ns))
13031303
(start-line (line-number-at-pos start-pos))
13041304
(start-column (save-excursion (goto-char start-pos) (current-column))))
1305-
(with-temp-buffer
1306-
(insert (format "(ns %s)" current-ns))
1307-
(dotimes (_ (1- start-line))
1308-
(insert "\n"))
1309-
(dotimes (_ start-column)
1310-
(insert " "))
1311-
(insert form)
1312-
(buffer-string))))
1305+
(concat
1306+
(format "(ns %s)" current-ns)
1307+
(make-string (1- start-line) ?\n)
1308+
(make-string start-column ? )
1309+
form)))
13131310

13141311
(defun cider-interactive-eval (form &optional start-pos)
13151312
"Evaluate the given FORM and print value in minibuffer."

0 commit comments

Comments
 (0)