File tree Expand file tree Collapse file tree 3 files changed +21
-4
lines changed Expand file tree Collapse file tree 3 files changed +21
-4
lines changed Original file line number Diff line number Diff line change 9
9
* [ #93 ] ( https://github.com/clojure-emacs/inf-clojure/pull/93 ) : Slow response from inf-clojure (completions, arglists, ...).
10
10
* [ #101 ] ( https://github.com/clojure-emacs/inf-clojure/pull/101 ) : ` inf-clojure-set-ns ` hangs Emacs.
11
11
12
+ ### New Features
13
+
14
+ * [ #114 ] ( https://github.com/clojure-emacs/inf-clojure/pull/114 ) : Introduce ` inf-clojure-skip-project-detection ` .
15
+
12
16
## 2.0.1 (2017-05-18)
13
17
14
18
### Bugs Fixed
Original file line number Diff line number Diff line change @@ -74,6 +74,9 @@ interacting with it.
74
74
` inf-clojure ` has several custom variables which control the command
75
75
used to start a REPL for particular project type - ` inf-clojure-lein-cmd ` ,
76
76
` inf-clojure-boot-cmd ` and ` inf-clojure-generic-cmd ` .
77
+ If ` inf-clojure-skip-project-detection ` is non-nil, only
78
+ ` inf-clojure-generic-cmd ` will be used, which can be useful for projects that
79
+ don't have standard layouts.
77
80
78
81
By default all those variables are set to strings (e.g. ` lein repl ` ).
79
82
However, it is possible to use a cons pair like ` ("localhost" . 5555) `
Original file line number Diff line number Diff line change @@ -189,6 +189,15 @@ number (e.g. (\"localhost\" . 5555))."
189
189
(stringp (car x))
190
190
(numberp (cdr x))))
191
191
192
+ (defcustom inf-clojure-skip-project-detection nil
193
+ " Skip project detection if non-nil.
194
+
195
+ This allows to rely on `inf-clojure-generic-cmd` for specifying
196
+ the REPL command."
197
+ :type 'boolean
198
+ :safe #'booleanp
199
+ :package-version '(inf-clojure . " 2.1.0" ))
200
+
192
201
(defcustom inf-clojure-lein-cmd " lein repl"
193
202
" The command used to start a Clojure REPL for Leiningen projects.
194
203
@@ -510,10 +519,11 @@ Fallback to `default-directory.' if not within a project."
510
519
511
520
(defun inf-clojure-project-type ()
512
521
" Determine the type, either leiningen or boot of the current project."
513
- (let ((default-directory (inf-clojure-project-root)))
514
- (cond ((file-exists-p " project.clj" ) " lein" )
515
- ((file-exists-p " build.boot" ) " boot" )
516
- (t nil ))))
522
+ (when (not inf-clojure-skip-project-detection)
523
+ (let ((default-directory (inf-clojure-project-root)))
524
+ (cond ((file-exists-p " project.clj" ) " lein" )
525
+ ((file-exists-p " build.boot" ) " boot" )
526
+ (t nil )))))
517
527
518
528
(defun inf-clojure-cmd (project-type )
519
529
" Determine the command `inf-clojure' needs to invoke for the PROJECT-TYPE."
You can’t perform that action at this time.
0 commit comments