Skip to content

Commit

Permalink
[Fix clojure-emacs#1947] Reorder repl init after debugger init
Browse files Browse the repository at this point in the history
When initializing the repl, we ask what namespace we are in by evaling code,
eg (eval "(str *ns*)"). However, enlighten mode hijacks eval messages in the
middleware and uses the debugger on them which causes an error if the debugger
is not yet initialized.
  • Loading branch information
Dan Sutton committed Mar 5, 2017
1 parent 5ffb2ea commit ef47c0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cider.el
Original file line number Diff line number Diff line change
Expand Up @@ -858,11 +858,13 @@ This function is appended to `nrepl-connected-hook' in the client process
buffer."
;; `nrepl-connected-hook' is run in the connection buffer
(cider-make-connection-default (current-buffer))
(cider-repl-init (current-buffer))
(cider--check-required-nrepl-version)
(cider--check-clojure-version-supported)
(cider--check-middleware-compatibility)
(cider--debug-init-connection)
;; `cider-repl-init' evals code. if `enlighten-mode' is on, eval requires the
;; debugger so make sure to init the repl after the debugger
(cider-repl-init (current-buffer))
(cider--subscribe-repl-to-server-out)
(when cider-auto-mode
(cider-enable-on-existing-clojure-buffers))
Expand Down

0 comments on commit ef47c0f

Please sign in to comment.