@@ -275,13 +275,6 @@ Takes its root binding from inf-clojure-repl-default-flavor but
275
275
can be further customized using either `setq-local` or an entry
276
276
in `.dir-locals.el`." )
277
277
278
- (defun inf-clojure--flavor-setup ()
279
- " Setup inf-clojure defcustoms depending on the choose flavor."
280
- (pcase inf-clojure-repl-flavor
281
- (lumo (inf-clojure--flavor-lumo-setup))
282
- (clojure nil )
283
- (_ (user-error " [inf-clojure] The specified flavor is not supported at the moment." ))))
284
-
285
278
(define-derived-mode inf-clojure-mode comint-mode " Inferior Clojure"
286
279
" Major mode for interacting with an inferior Clojure process.
287
280
Runs a Clojure interpreter as a subprocess of Emacs, with Clojure
@@ -391,12 +384,20 @@ Fallback to `default-directory.' if not within a project."
391
384
((file-exists-p " build.boot" ) " boot" )
392
385
(t nil ))))
393
386
387
+ (defun inf-clojure-flavor ()
388
+ " Determine the flavor of the project."
389
+ (pcase inf-clojure-repl-flavor
390
+ (lumo (inf-clojure--lumo-repl-command))
391
+ (_ nil )))
392
+
394
393
(defun inf-clojure-cmd (project-type )
395
394
" Determine the command `inf-clojure' needs to invoke for the PROJECT-TYPE."
396
- (pcase project-type
397
- (" lein" inf-clojure-lein-cmd)
398
- (" boot" inf-clojure-boot-cmd)
399
- (_ inf-clojure-generic-cmd)))
395
+ (if-let ((flavor-command (inf-clojure-flavor)))
396
+ flavor-command
397
+ (pcase project-type
398
+ (" lein" inf-clojure-lein-cmd)
399
+ (" boot" inf-clojure-boot-cmd)
400
+ (_ inf-clojure-generic-cmd))))
400
401
401
402
(defun inf-clojure-clear-repl-buffer ()
402
403
" Clear the REPL buffer."
0 commit comments