Skip to content

Commit 19c9ec8

Browse files
committed
[Fix #2882] Move the cider-auto-mode check
It was in a block of code that's specific to Clojure's nREPL, but it didn't belong there.
1 parent ca232aa commit 19c9ec8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cider-connection.el

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,17 +305,19 @@ buffer."
305305
(cider-nrepl-op-supported-p "out-subscribe"))
306306
(cider--subscribe-repl-to-server-out))
307307

308-
(when cider-auto-mode
309-
(cider-enable-on-existing-clojure-buffers))
310-
311308
;; Middleware on cider-nrepl's side is deferred until first usage, but
312309
;; loading middleware concurrently can lead to occasional "require" issues
313310
;; (likely a Clojure bug). Thus, we load the heavy debug middleware towards
314311
;; the end, allowing for the faster "server-out" middleware to load
315312
;; first.
316313
(cider--debug-init-connection))
314+
317315
(when cider-repl-init-function
318316
(funcall cider-repl-init-function))
317+
318+
(when cider-auto-mode
319+
(cider-enable-on-existing-clojure-buffers))
320+
319321
(run-hooks 'cider-connected-hook)))))
320322

321323
(defun cider--disconnected-handler ()

0 commit comments

Comments
 (0)