From 62494d672db8637070ae14f2e6fc0065faff4e0f Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 4 Mar 2026 15:31:01 +0200 Subject: 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 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." -- cgit v1.0