summaryrefslogtreecommitdiff
path: root/cider-client.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-10-04 12:33:18 +0100
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-10-04 12:47:49 +0100
commitb853dc58c2cc5da2f078e95f326de661945f8f6d (patch)
treead00233d1cb2c533d821f80392aa084a4d421ced /cider-client.el
parent442de8f5ac2f5b089e27c8d8a36dbe4ea620aacd (diff)
New function: cider-nrepl-send-unhandled-request
Diffstat (limited to 'cider-client.el')
-rw-r--r--cider-client.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/cider-client.el b/cider-client.el
index bf877910..1564364d 100644
--- a/cider-client.el
+++ b/cider-client.el
@@ -386,6 +386,15 @@ If ABORT-ON-INPUT is non-nil, the function will return nil at the first
sign of user input, so as not to hang the interface."
(nrepl-send-sync-request request (cider-current-connection) abort-on-input))
+(defun cider-nrepl-send-unhandled-request (request)
+ "Send REQUEST to the nREPL server and ignore any responses.
+Immediately mark the REQUEST as done."
+ (let* ((conn (cider-current-connection))
+ (id (nrepl-send-request request #'ignore conn)))
+ (with-current-buffer conn
+ (nrepl--mark-id-completed id))
+ id))
+
(defun cider-nrepl-request:eval (input callback &optional ns point)
"Send the request INPUT and register the CALLBACK as the response handler.
If NS is non-nil, include it in the request. POINT, if non-nil, is the