Skip to content

Commit 86f5803

Browse files
committed
Document the changes to nrepl-make-response-handler
1 parent 93c6037 commit 86f5803

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

nrepl-client.el

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -775,13 +775,18 @@ and 'session' keys. Other standard response keys are 'value', 'out', 'err',
775775
776776
The presence of a particular key determines the type of the response. For
777777
example, if 'value' key is present, the response is of type 'value', if
778-
'out' key is present the response is 'stdout' etc. Depending on the type,
779-
the handler dispatches the appropriate value to one of the supplied
780-
handlers: VALUE-HANDLER, STDOUT-HANDLER, STDERR-HANDLER, DONE-HANDLER,
781-
EVAL-ERROR-HANDLER, and PPRINT-OUT-HANDLER. If the optional
782-
EVAL-ERROR-HANDLER is nil, the default `nrepl-err-handler' is used. If any
783-
of the other supplied handlers are nil nothing happens for the
784-
corresponding type of response."
778+
'out' key is present the response is 'stdout' etc.
779+
780+
Depending on the type, the handler dispatches the appropriate value to one
781+
of the supplied handlers: VALUE-HANDLER, STDOUT-HANDLER, STDERR-HANDLER,
782+
DONE-HANDLER, EVAL-ERROR-HANDLER, PPRINT-OUT-HANDLER and
783+
CONTENT-TYPE-HANDLER. Handlers are functions of the buffer and the value
784+
they handle, except for the optional CONTENT-TYPE-HANDLER which should be a
785+
function of the buffer, content and content-type to be handled.
786+
787+
If the optional EVAL-ERROR-HANDLER is nil, the default `nrepl-err-handler'
788+
is used. If any of the other supplied handlers are nil nothing happens for
789+
the corresponding type of response."
785790
(lambda (response)
786791
(nrepl-dbind-response response (content-type content value ns out err status id pprint-out)
787792
(when (buffer-live-p buffer)

0 commit comments

Comments
 (0)