From 23d28f54d0e8128adede5afe222d03fa030a817a Mon Sep 17 00:00:00 2001 From: Vitalie Spinu Date: Thu, 6 Dec 2018 20:26:47 +0100 Subject: [PATCH] Add project-roots method for project.el compatibility emacs-ess/ESS#786 --- clojure-mode.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clojure-mode.el b/clojure-mode.el index 31842fe8..fc217e18 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)) @@ -1718,6 +1719,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)))