Skip to content

Commit 2ec98ea

Browse files
magnarsbbatsov
authored andcommitted
Optionally specify a callback to cider-load-buffer
1 parent 31abf6e commit 2ec98ea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cider-eval.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ passing arguments."
10791079
(widen)
10801080
(substring-no-properties (buffer-string)))))
10811081

1082-
(defun cider-load-buffer (&optional buffer)
1082+
(defun cider-load-buffer (&optional buffer callback)
10831083
"Load (eval) BUFFER's file in nREPL.
10841084
If no buffer is provided the command acts on the current buffer. If the
10851085
buffer is for a cljc file, and both a Clojure and ClojureScript REPL exists
@@ -1114,7 +1114,8 @@ for the project, it is evaluated in both REPLs."
11141114
(funcall cider-to-nrepl-filename-function
11151115
(cider--server-filename filename))
11161116
(file-name-nondirectory filename)
1117-
repl)))
1117+
repl
1118+
callback)))
11181119
(message "Loading %s..." filename))))))
11191120

11201121
(defun cider-load-file (filename)

0 commit comments

Comments
 (0)