branch: externals/consult
commit 55454bee7aca7a09f91bd8e26f4bcca62210f409
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@daniel-mendler.de>

    Fix project function
---
 consult.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/consult.el b/consult.el
index 8c4f7aa967..594f855274 100644
--- a/consult.el
+++ b/consult.el
@@ -851,13 +851,12 @@ Otherwise the `default-directory' is returned."
   "Return project directories depending on WHAT.
 If WHAT is current-project return the directory of the current project.
 If WHAT is known-projects return the list of known project directories."
-  (unless (fboundp 'project-current) (require 'project))
   (pcase what
     ('current-project
      (when-let (proj (project-current))
        (cond
         ((fboundp 'project-root) (project-root proj))
-        ((fboundp 'project-roots) (project-roots proj)))))
+        ((fboundp 'project-roots) (car (project-roots proj))))))
     ('known-projects
      (and (fboundp 'project-known-project-roots)
           (project-known-project-roots)))))

Reply via email to