emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ivy-hydra 7b1af79 012/395: counsel.el (counsel--project


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra 7b1af79 012/395: counsel.el (counsel--projectile-root): Add
Date: Thu, 25 Feb 2021 08:31:20 -0500 (EST)

branch: externals/ivy-hydra
commit 7b1af7931b1a652fd69cbabb58ba1f4c31fdc910
Author: Andrew Whatson <whatson@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    counsel.el (counsel--projectile-root): Add
    
    Adds projectile support to `counsel-compile-root-functions', so
    projectile will be used to determine the project root if it's loaded.
    
    Fixes #2291
---
 counsel.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/counsel.el b/counsel.el
index a11bc37..afec27b 100644
--- a/counsel.el
+++ b/counsel.el
@@ -5729,7 +5729,8 @@ This variable is suitable for addition to
 `savehist-additional-variables'.")
 
 (defvar counsel-compile-root-functions
-  '(counsel--project-current
+  '(counsel--projectile-root
+    counsel--project-current
     counsel--configure-root
     counsel--git-root
     counsel--dir-locals-root)
@@ -5744,6 +5745,12 @@ The root is determined by 
`counsel-compile-root-functions'."
   (or (run-hook-with-args-until-success 'counsel-compile-root-functions)
       (error "Couldn't find project root")))
 
+(defun counsel--projectile-root ()
+  "Return root of current projectile project or nil on failure.
+Use `projectile-project-root' to determine the root."
+  (and (fboundp 'projectile-project-root)
+       (projectile-project-root)))
+
 (defun counsel--project-current ()
   "Return root of current project or nil on failure.
 Use `project-current' to determine the root."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]