Skip to content

Commit 501e348

Browse files
committed
Merge pull request #1109 from abo-abo/master
Add an option to disable automatic cider-mode
2 parents 5b5615e + 4e6b0b9 commit 501e348

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
### New features
66

7+
* [#1109](https://github.com/clojure-emacs/cider/issues/1061) New defcustom `cider-auto-mode`.
8+
On by default, when nil don't automatically enable `cider-mode` in all Clojure buffers.
9+
710
* [#1061](https://github.com/clojure-emacs/cider/issues/1061) New command `cider-find-ns`, bound to <kbd>C-c C-.</kbd>, which prompts for an ns and jumps to the corresponding source file.
811
* [#1019](https://github.com/clojure-emacs/cider/pull/1019): New file, cider-debug.el.
912
Provides a new command, `cider-debug-defun-at-point`, bound to <kbd>C-u C-M-x</kbd>.

cider.el

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ This variable is used by `cider-connect'."
130130
:group 'cider
131131
:version "0.9.0")
132132

133+
(defcustom cider-auto-mode t
134+
"When non-nil, automatically enable `cider-mode' for all Clojure buffers."
135+
:type 'boolean
136+
:version "0.9.0")
137+
133138
(defvar cider-ps-running-nrepls-command "ps u | grep leiningen"
134139
"Process snapshot command used in `cider-locate-running-nrepl-ports'.")
135140

@@ -323,7 +328,8 @@ buffer."
323328
(cider--check-required-nrepl-version)
324329
(cider--check-required-nrepl-ops)
325330
(cider--check-middleware-compatibility)
326-
(cider-enable-on-existing-clojure-buffers)
331+
(when cider-auto-mode
332+
(cider-enable-on-existing-clojure-buffers))
327333
(run-hooks 'cider-connected-hook))
328334

329335
(defun cider--disconnected-handler ()

0 commit comments

Comments
 (0)