branch: elpa/projectile
commit 62494d672db8637070ae14f2e6fc0065faff4e0f
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Use public xref-show-xrefs API in projectile-find-references
    
    Replace private xref--show-xrefs with public xref-show-xrefs. The
    private function's signature changed across Emacs versions. Keep
    xref-references-in-directory to scope the search to Projectile's
    project root.
---
 projectile.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/projectile.el b/projectile.el
index be6dd1630d..0930138f29 100644
--- a/projectile.el
+++ b/projectile.el
@@ -4621,12 +4621,14 @@ installed to work."
 (defun projectile-find-references (&optional symbol)
   "Find all references to SYMBOL in the current project.
 
-A thin wrapper around `xref-references-in-directory'."
+A thin wrapper around `xref-references-in-directory' scoped to the
+project root."
   (interactive)
-  (when (fboundp 'xref--show-xrefs)
-    (let ((project-root (projectile-acquire-root))
-          (symbol (or symbol (read-from-minibuffer "Lookup in project: " 
(projectile-symbol-at-point)))))
-      (xref--show-xrefs (xref-references-in-directory symbol project-root) 
nil))))
+  (let ((project-root (projectile-acquire-root))
+        (symbol (or symbol (read-from-minibuffer "Lookup in project: " 
(projectile-symbol-at-point)))))
+    (xref-show-xrefs
+     (lambda () (xref-references-in-directory symbol project-root))
+     nil)))
 
 (defun projectile-tags-exclude-patterns ()
   "Return a string with exclude patterns for ctags."

Reply via email to