Skip to content

Commit d0571da

Browse files
committed
Enable cider-stacktrace-mode before displaying the error buffer
Fixes #946.
1 parent c85d5ae commit d0571da

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ when in buffer that's not visiting a file (e.g. a REPL buffer).
8888
* [#1033](https://github.com/clojure-emacs/cider/issues/1033): Removed erroneous underlining from stacktrace frames and disabled frame filters in the error buffer.
8989
* The error buffer no longer pops up when there is no error to display.
9090
* `cider-find-resource` now correctly throws an error when no path is provided.
91+
* [#946](https://github.com/clojure-emacs/cider/issues/946): `cider-stacktrace-mode` is now enabled before the error buffer is displayed.
9192

9293
## 0.8.2 / 2014-12-21
9394

cider-interaction.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,17 +1241,17 @@ currently selected buffer."
12411241
'(t always only-in-repl)
12421242
'(t always except-in-repl)))))
12431243

1244-
(defun cider-new-error-buffer ()
1245-
"Return an empty error buffer, possibly displaying and/or selecting it.
1244+
(defun cider-new-error-buffer (&optional mode)
1245+
"Return an empty error buffer using MODE.
12461246
12471247
When deciding whether to display the buffer, takes into account both the
12481248
value of `cider-show-error-buffer' and the currently selected buffer.
12491249
12501250
When deciding whether to select the buffer, takes into account the value of
12511251
`cider-auto-select-error-buffer'."
12521252
(if (cider--show-error-buffer-p)
1253-
(cider-popup-buffer cider-error-buffer cider-auto-select-error-buffer)
1254-
(cider-make-popup-buffer cider-error-buffer)))
1253+
(cider-popup-buffer cider-error-buffer cider-auto-select-error-buffer mode)
1254+
(cider-make-popup-buffer cider-error-buffer mode)))
12551255

12561256
(defun cider--handle-err-eval-response (response)
12571257
"Render eval RESPONSE into a new error buffer.
@@ -1275,7 +1275,7 @@ Uses the value of the `out' slot in RESPONSE."
12751275
(defun cider--render-stacktrace-causes (causes)
12761276
"If CAUSES is non-nil, render its contents into a new error buffer."
12771277
(when causes
1278-
(let ((error-buffer (cider-new-error-buffer)))
1278+
(let ((error-buffer (cider-new-error-buffer #'cider-stacktrace-mode)))
12791279
(cider-stacktrace-render error-buffer (reverse causes)))))
12801280

12811281
(defun cider--handle-stacktrace-response (response causes)

cider-stacktrace.el

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,6 @@ This associates text properties to enable filtering and source navigation."
552552
(defun cider-stacktrace-render (buffer causes)
553553
"Emit into BUFFER useful stacktrace information for the CAUSES."
554554
(with-current-buffer buffer
555-
(cider-stacktrace-mode)
556555
(let ((inhibit-read-only t))
557556
(erase-buffer)
558557
(newline)

0 commit comments

Comments
 (0)