branch: externals/counsel
commit 44cef8c420266c06a3280c2c58d7ef4ee8943c9e
Merge: 5c89943a4d 49c749515d
Author: Basil L. Contovounesios <[email protected]>
Commit: Basil L. Contovounesios <[email protected]>

    Merge branch 'master' into externals/counsel
---
 counsel.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/counsel.el b/counsel.el
index 493bb7df27..32965cb66d 100644
--- a/counsel.el
+++ b/counsel.el
@@ -6432,8 +6432,12 @@ Use `projectile-project-root' to determine the root."
 (defun counsel--project-current ()
   "Return root of current project or nil on failure.
 Use `project-current' to determine the root."
-  (and (fboundp 'project-current)
-       (cdr (project-current))))
+  (let ((proj (and (fboundp 'project-current)
+                   (project-current))))
+    (cond ((fboundp 'project-root)
+           (project-root proj))
+          ((fboundp 'project-roots)
+           (car (project-roots proj))))))
 
 (defun counsel--configure-root ()
   "Return root of current project or nil on failure.

Reply via email to