Skip to content

Commit be187d8

Browse files
vspinubbatsov
authored andcommitted
Add project-roots method for project.el compatibility
emacs-ess/ESS#786
1 parent c617a2a commit be187d8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clojure-mode.el

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
(require 'align)
7171
(require 'subr-x)
7272
(require 'lisp-mnt)
73+
(require 'project)
7374

7475
(declare-function lisp-fill-paragraph "lisp-mode" (&optional justify))
7576

@@ -1719,6 +1720,9 @@ Return nil if not inside a project."
17191720
(when (> (length choices) 0)
17201721
(car (sort choices #'file-in-directory-p)))))
17211722

1723+
(cl-defmethod project-roots ((project (head clojure)))
1724+
(list (cdr project)))
1725+
17221726
(defun clojure-project-relative-path (path)
17231727
"Denormalize PATH by making it relative to the project root."
17241728
(file-relative-name path (clojure-project-dir)))

0 commit comments

Comments
 (0)