Skip to content

Commit

Permalink
Add optional pprint-out-handler arg to nrepl-make-response-handler
Browse files Browse the repository at this point in the history
  • Loading branch information
cichli authored and cap10morgan committed Dec 24, 2015
1 parent 4462e28 commit 03a4952
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nrepl-client.el
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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)))
Expand Down

0 comments on commit 03a4952

Please sign in to comment.