Skip to content

Commit e6c118d

Browse files
[eval] Fix broken stacktrace response when C-c C-p throws an exception
1 parent ff44b5b commit e6c118d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cider-eval.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ COMMENT-POSTFIX is the text to output after the last line."
884884
(lambda (_buffer warning)
885885
(setq res (concat res warning))))))
886886

887-
(defun cider-popup-eval-handler (&optional buffer _bounds _source-buffer)
887+
(defun cider-popup-eval-handler (&optional buffer _bounds source-buffer)
888888
"Make a handler for printing evaluation results in popup BUFFER,
889889
_BOUNDS representing the buffer bounds of the evaled input,
890890
and _SOURCE-BUFFER the original buffer
@@ -907,15 +907,15 @@ This is used by pretty-printing commands."
907907
;; done handler:
908908
nil
909909
;; eval-error handler:
910-
(lambda (buffer)
910+
(lambda (_buffer)
911911
(when (and (buffer-live-p chosen-buffer)
912912
(member (buffer-name chosen-buffer)
913913
cider-ancillary-buffers))
914914
(with-selected-window (get-buffer-window chosen-buffer)
915915
(cider-popup-buffer-quit-function t)))
916916
;; also call the default nrepl-err-handler, so that our custom behavior doesn't void the base behavior:
917917
(when nrepl-err-handler
918-
(funcall nrepl-err-handler buffer)))
918+
(funcall nrepl-err-handler source-buffer)))
919919
;; content type handler:
920920
nil
921921
;; truncated handler:

0 commit comments

Comments
 (0)