Skip to content

Commit 44dc350

Browse files
vspinubbatsov
authored andcommitted
Make cider-eval-ns-form for interactive use only
... making multi-functional functions is generally a bad idea.
1 parent ddf3f35 commit 44dc350

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

cider-interaction.el

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,21 +1268,13 @@ command `cider-debug-defun-at-point'."
12681268
(interactive)
12691269
(cider--pprint-eval-form (cider-defun-at-point 'bounds)))
12701270

1271-
(defun cider-eval-ns-form (&optional sync)
1272-
"Evaluate the current buffer's namespace form.
1273-
1274-
When SYNC is true the form is evaluated synchronously,
1275-
otherwise it's evaluated interactively."
1271+
(defun cider-eval-ns-form ()
1272+
"Evaluate the current buffer's namespace form."
12761273
(interactive)
12771274
(when (clojure-find-ns)
12781275
(save-excursion
12791276
(goto-char (match-beginning 0))
1280-
(if sync
1281-
;; The first interactive eval on a file can load a lot of libs. This
1282-
;; can easily lead to more than 10 sec.
1283-
(let ((nrepl-sync-request-timeout 30))
1284-
(cider-nrepl-sync-request:eval (cider-defun-at-point)))
1285-
(cider-eval-defun-at-point)))))
1277+
(cider-eval-defun-at-point))))
12861278

12871279
(defun cider-read-and-eval (&optional value)
12881280
"Read a sexp from the minibuffer and output its result to the echo area.

0 commit comments

Comments
 (0)