File tree 3 files changed +20
-4
lines changed
3 files changed +20
-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-project-type ` defcustom.
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
+ The ` inf-clojure-project-type ` can force a particular project type, skipping
78
+ the project detection, which can be useful for projects that don't have
79
+ 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,14 @@ number (e.g. (\"localhost\" . 5555))."
189
189
(stringp (car x))
190
190
(numberp (cdr x))))
191
191
192
+ (defcustom inf-clojure-project-type nil
193
+ " Defines the project type.
194
+
195
+ If this is `nil`, the project will be automatically detected."
196
+ :type 'string
197
+ :safe #'stringp
198
+ :package-version '(inf-clojure . " 2.1.0" ))
199
+
192
200
(defcustom inf-clojure-lein-cmd " lein repl"
193
201
" The command used to start a Clojure REPL for Leiningen projects.
194
202
@@ -511,10 +519,11 @@ Fallback to `default-directory.' if not within a project."
511
519
512
520
(defun inf-clojure-project-type ()
513
521
" Determine the type, either leiningen or boot of the current project."
514
- (let ((default-directory (inf-clojure-project-root)))
515
- (cond ((file-exists-p " project.clj" ) " lein" )
516
- ((file-exists-p " build.boot" ) " boot" )
517
- (t nil ))))
522
+ (or inf-clojure-project-type
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 " generic" )))))
518
527
519
528
(defun inf-clojure-cmd (project-type )
520
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