@@ -170,9 +170,10 @@ nREPL connection."
170
170
(defun cider-nrepl-op-supported-p (op &optional connection skip-ensure )
171
171
" Check whether the CONNECTION supports the nREPL middleware OP.
172
172
Skip check if repl is active if SKIP-ENSURE is non nil."
173
- (nrepl-op-supported-p op (or connection (cider-current-repl nil (if skip-ensure
174
- nil
175
- 'ensure )))))
173
+ (nrepl-op-supported-p op (or connection
174
+ (cider-current-repl 'infer (if skip-ensure
175
+ nil
176
+ 'ensure )))))
176
177
177
178
(defun cider-ensure-op-supported (op )
178
179
" Check for support of middleware op OP.
@@ -187,7 +188,9 @@ REQUEST is a pair list of the form (\"op\" \"operation\" \"par1-name\"
187
188
If CONNECTION is provided dispatch to that connection instead of
188
189
the current connection. Return the id of the sent message.
189
190
If TOOLING is truthy then the tooling session is used."
190
- (nrepl-send-request request callback (or connection (cider-current-repl 'any 'ensure )) tooling))
191
+ (nrepl-send-request request callback (or connection
192
+ (cider-current-repl 'infer 'ensure ))
193
+ tooling))
191
194
192
195
(defun cider-nrepl-send-sync-request (request &optional connection
193
196
abort-on-input callback )
@@ -199,15 +202,15 @@ at the first sign of user input, so as not to hang the
199
202
interface.
200
203
if CALLBACK is non-nil, it will additionally be called on all received messages."
201
204
(nrepl-send-sync-request request
202
- (or connection (cider-current-repl 'any 'ensure ))
205
+ (or connection (cider-current-repl 'infer 'ensure ))
203
206
abort-on-input
204
207
nil
205
208
callback))
206
209
207
210
(defun cider-nrepl-send-unhandled-request (request &optional connection )
208
211
" Send REQUEST to the nREPL CONNECTION and ignore any responses.
209
212
Immediately mark the REQUEST as done. Return the id of the sent message."
210
- (let* ((conn (or connection (cider-current-repl 'any 'ensure )))
213
+ (let* ((conn (or connection (cider-current-repl 'infer 'ensure )))
211
214
(id (nrepl-send-request request #'ignore conn)))
212
215
(with-current-buffer conn
213
216
(nrepl--mark-id-completed id))
@@ -219,7 +222,7 @@ If NS is non-nil, include it in the request. LINE and COLUMN, if non-nil,
219
222
define the position of INPUT in its buffer. ADDITIONAL-PARAMS is a plist
220
223
to be appended to the request message. CONNECTION is the connection
221
224
buffer, defaults to (cider-current-repl)."
222
- (let ((connection (or connection (cider-current-repl nil 'ensure )))
225
+ (let ((connection (or connection (cider-current-repl 'infer 'ensure )))
223
226
(eval-buffer (current-buffer )))
224
227
(run-hooks 'cider-before-eval-hook )
225
228
(nrepl-request:eval input
@@ -238,7 +241,10 @@ buffer, defaults to (cider-current-repl)."
238
241
(defun cider-nrepl-sync-request:eval (input &optional connection ns )
239
242
" Send the INPUT to the nREPL CONNECTION synchronously.
240
243
If NS is non-nil, include it in the eval request."
241
- (nrepl-sync-request:eval input (or connection (cider-current-repl nil 'ensure )) ns))
244
+ (nrepl-sync-request:eval input
245
+ (or connection
246
+ (cider-current-repl 'infer 'ensure ))
247
+ ns))
242
248
243
249
(defcustom cider-format-code-options nil
244
250
" A map of options that will be passed to `cljfmt' to format code.
@@ -426,7 +432,7 @@ clobber *1/2/3)."
426
432
; ; namespace forms are always evaluated in the "user" namespace
427
433
(nrepl-request:eval input
428
434
callback
429
- (or connection (cider-current-repl nil 'ensure ))
435
+ (or connection (cider-current-repl 'infer 'ensure ))
430
436
ns nil nil nil 'tooling ))
431
437
432
438
(defun cider-sync-tooling-eval (input &optional ns connection )
@@ -437,7 +443,7 @@ bindings of the primary eval nREPL session (e.g. this is not going to
437
443
clobber *1/2/3)."
438
444
; ; namespace forms are always evaluated in the "user" namespace
439
445
(nrepl-sync-request:eval input
440
- (or connection (cider-current-repl nil 'ensure ))
446
+ (or connection (cider-current-repl 'infer 'ensure ))
441
447
ns
442
448
'tooling ))
443
449
@@ -458,7 +464,7 @@ itself is present."
458
464
" Interrupt any pending evaluations."
459
465
(interactive )
460
466
; ; FIXME: does this work correctly in cljc files?
461
- (with-current-buffer (cider-current-repl nil 'ensure )
467
+ (with-current-buffer (cider-current-repl 'infer 'ensure )
462
468
(let ((pending-request-ids (cider-util--hash-keys nrepl-pending-requests)))
463
469
(dolist (request-id pending-request-ids)
464
470
(nrepl-request:interrupt
0 commit comments