From 391420d0c0beb699d79a66c26824d5bbefca905b Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Mon, 23 Oct 2023 23:51:08 +0300 Subject: [PATCH] xref-backend-references: Avoid finding duplicates * lisp/progmodes/xref.el (xref-backend-references): Cull subdirectories of other elements (bug#66683). --- lisp/progmodes/xref.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index fd788ec8f32..81618428bf3 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -281,9 +281,10 @@ current project's main and external roots." (xref-references-in-directory identifier dir) (message "Searching %s... done" dir))) (let ((pr (project-current t))) - (cons - (xref--project-root pr) - (project-external-roots pr))))) + (project-combine-directories + (cons + (xref--project-root pr) + (project-external-roots pr)))))) (cl-defgeneric xref-backend-apropos (backend pattern) "Find all symbols that match PATTERN string. -- 2.39.2