Skip to content

Commit 766fc5b

Browse files
committed
clojure-project-dir delegates call to clojure-project-root-function
1 parent 3e58acd commit 766fc5b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

clojure-mode.el

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ Out-of-the box `clojure-mode' understands lein, boot and gradle."
192192
(and (listp value)
193193
(cl-every 'stringp value))))
194194

195-
(defcustom clojure-project-root-function 'clojure-project-dir
195+
(defcustom clojure-project-root-function 'clojure-project-root-path
196196
"Function to locate clojure project root directory."
197197
:type 'function
198198
:risky t
@@ -1606,6 +1606,13 @@ nil."
16061606
(defun clojure-project-dir (&optional dir-name)
16071607
"Return the absolute path to the project's root directory.
16081608
1609+
Call is delegated down to `clojure-project-root-function' with
1610+
optional DIR-NAME as argument."
1611+
(funcall clojure-project-root-function dir-name))
1612+
1613+
(defun clojure-project-root-path (&optional dir-name)
1614+
"Return the absolute path to the project's root directory.
1615+
16091616
Use `default-directory' if DIR-NAME is nil.
16101617
Return nil if not inside a project."
16111618
(let* ((dir-name (or dir-name default-directory))

0 commit comments

Comments
 (0)