aboutsummaryrefslogtreecommitdiff
path: root/projectile.el
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.dev>2026-03-04 15:31:01 +0200
committerBozhidar Batsov <bozhidar@batsov.dev>2026-03-04 21:43:10 +0200
commit62494d672db8637070ae14f2e6fc0065faff4e0f (patch)
tree7d7170b67bc383f1015b9e63dd2593aeaacf848b /projectile.el
parentfd3b64146e581ad10c383bb7335407188184b07b (diff)
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.
Diffstat (limited to 'projectile.el')
-rw-r--r--projectile.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/projectile.el b/projectile.el
index be6dd16..0930138 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."