Skip to content

Commit 03a4952

Browse files
cichlicap10morgan
authored andcommitted
Add optional pprint-out-handler arg to nrepl-make-response-handler
1 parent 4462e28 commit 03a4952

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

nrepl-client.el

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,8 @@ It is safe to call this function multiple times on the same ID."
824824

825825
(defun nrepl-make-response-handler (buffer value-handler stdout-handler
826826
stderr-handler done-handler
827-
&optional eval-error-handler)
827+
&optional eval-error-handler
828+
pprint-out-handler)
828829
"Make a response handler for connection BUFFER.
829830
A handler is a function that takes one argument - response received from
830831
the server process. The response is an alist that contains at least 'id'
@@ -855,8 +856,8 @@ server responses."
855856
(when stdout-handler
856857
(funcall stdout-handler buffer out)))
857858
(pprint-out
858-
(when stdout-handler
859-
(funcall stdout-handler buffer pprint-out)))
859+
(cond (pprint-out-handler (funcall pprint-out-handler buffer pprint-out))
860+
(stdout-handler (funcall stdout-handler buffer pprint-out))))
860861
(err
861862
(when stderr-handler
862863
(funcall stderr-handler buffer err)))

0 commit comments

Comments
 (0)