summaryrefslogtreecommitdiff
path: root/clojure-mode.el
diff options
context:
space:
mode:
authorVitalie Spinu <spinuvit@gmail.com>2018-12-06 20:26:47 +0100
committerBozhidar Batsov <bozhidar.batsov@gmail.com>2019-01-05 10:31:40 +0200
commitbe187d8ece298c544cc6b5016ad2e5325dc70df5 (patch)
tree21b2e42ee88c0f7445071a46a1c89efff23694b0 /clojure-mode.el
parentc617a2a840c129a9035303a4f7ed25e4bc7dc42a (diff)
Add project-roots method for project.el compatibility
emacs-ess/ESS#786
Diffstat (limited to 'clojure-mode.el')
-rw-r--r--clojure-mode.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/clojure-mode.el b/clojure-mode.el
index 61d51b2..d7ad722 100644
--- a/clojure-mode.el
+++ b/clojure-mode.el
@@ -70,6 +70,7 @@
(require 'align)
(require 'subr-x)
(require 'lisp-mnt)
+(require 'project)
(declare-function lisp-fill-paragraph "lisp-mode" (&optional justify))
@@ -1719,6 +1720,9 @@ Return nil if not inside a project."
(when (> (length choices) 0)
(car (sort choices #'file-in-directory-p)))))
+(cl-defmethod project-roots ((project (head clojure)))
+ (list (cdr project)))
+
(defun clojure-project-relative-path (path)
"Denormalize PATH by making it relative to the project root."
(file-relative-name path (clojure-project-dir)))