summaryrefslogtreecommitdiff
path: root/nrepl-client.el
diff options
context:
space:
mode:
authorMichael Griffiths <mikey@cich.li>2015-12-12 16:38:44 +0000
committerMichael Griffiths <mikey@cich.li>2015-12-12 17:06:36 +0000
commit042662cade69f94d56186cc0882ec388365155b3 (patch)
tree676aa64b1e0edb5f72351b4c13dffaa4e79769d0 /nrepl-client.el
parent5641300a88cf7f63ec316d5e3bb31dcd4d93d0f9 (diff)
Add optional pprint-out-handler arg to nrepl-make-response-handler
Diffstat (limited to 'nrepl-client.el')
-rw-r--r--nrepl-client.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/nrepl-client.el b/nrepl-client.el
index 94cd2532..8d5773f6 100644
--- a/nrepl-client.el
+++ b/nrepl-client.el
@@ -824,7 +824,8 @@ It is safe to call this function multiple times on the same ID."
(defun nrepl-make-response-handler (buffer value-handler stdout-handler
stderr-handler done-handler
- &optional eval-error-handler)
+ &optional eval-error-handler
+ pprint-out-handler)
"Make a response handler for connection BUFFER.
A handler is a function that takes one argument - response received from
the server process. The response is an alist that contains at least 'id'
@@ -855,8 +856,8 @@ server responses."
(when stdout-handler
(funcall stdout-handler buffer out)))
(pprint-out
- (when stdout-handler
- (funcall stdout-handler buffer pprint-out)))
+ (cond (pprint-out-handler (funcall pprint-out-handler buffer pprint-out))
+ (stdout-handler (funcall stdout-handler buffer pprint-out))))
(err
(when stderr-handler
(funcall stderr-handler buffer err)))