summaryrefslogtreecommitdiff
path: root/cider.el
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.com>2015-08-13 12:13:17 +0300
committerBozhidar Batsov <bozhidar@batsov.com>2015-08-13 12:13:17 +0300
commitfe4acded4c925785bcb9afdb422da6d2e646aec3 (patch)
treea2ddf22c1d1ade17f1fdea748db13bae12bb78eb /cider.el
parent2d89c29e9de9798f7c1db635c18d34fdb8786e67 (diff)
Make it possible to suppress the project prompt when doing cider-connect
Diffstat (limited to 'cider.el')
-rw-r--r--cider.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/cider.el b/cider.el
index 4b7de8d5..c3e03aa4 100644
--- a/cider.el
+++ b/cider.el
@@ -61,6 +61,12 @@
:link '(url-link :tag "Github" "https://github.com/clojure-emacs/cider")
:link '(emacs-commentary-link :tag "Commentary" "cider"))
+(defcustom cider-prompt-for-project-on-connect t
+ "Controls whether to prompt for associated project on `cider-connect'."
+ :type 'boolean
+ :group 'cider
+ :package-version '(cider . "0.10.0"))
+
(require 'cider-client)
(require 'cider-interaction)
(require 'cider-eldoc)
@@ -264,7 +270,8 @@ Create REPL buffer and start an nREPL client connection."
(let ((nrepl-create-client-buffer-function #'cider-repl-create)
(nrepl-use-this-as-repl-buffer repl-buff))
(nrepl-start-client-process host port)
- (when (y-or-n-p "Do you want to associate the new connection with a local project? ")
+ (when (and cider-prompt-for-project-on-connect
+ (y-or-n-p "Do you want to associate the new connection with a local project? "))
(cider-assoc-project-with-connection
nil
(nrepl-default-connection-buffer))))))