emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/xref-union 0eb3d8cffb 4/7: Return first match in 'xref-


From: ELPA Syncer
Subject: [elpa] externals/xref-union 0eb3d8cffb 4/7: Return first match in 'xref-backend-identifier-at-point'
Date: Sat, 9 Dec 2023 15:58:58 -0500 (EST)

branch: externals/xref-union
commit 0eb3d8cffb40ae51388ca344b8a84bd5f59a02ed
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Return first match in 'xref-backend-identifier-at-point'
---
 xref-union.el | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/xref-union.el b/xref-union.el
index 7475422863..dbdd2240b2 100644
--- a/xref-union.el
+++ b/xref-union.el
@@ -50,6 +50,11 @@ a non-nil value is returned, the backend will not be added 
to the
 union backend, otherwise it will be."
   :type 'function)
 
+(defcustom xref-union-hook-depth -95    ;-100 has the highest priority
+  "Priority of the xref-union Xref backend.
+Consult `add-hook' for the interpretation of DEPTH."
+  :type 'number)
+
 
 ;;;; Xref interface
 
@@ -61,10 +66,9 @@ Same in this context means they reference the same object."
 
 (cl-defmethod xref-backend-identifier-at-point ((backends (head union)))
   "Collect the results of multiple Xref BACKENDS."
-  (seq-uniq
-   (cl-loop for backend in (cdr backends)
-           append (xref-backend-identifier-at-point backend))
-   #'xref-union-same-p))
+  (cl-loop for backend in (cdr backends)
+           when (xref-backend-identifier-at-point backend)
+           return it))
 
 (cl-defmethod xref-backend-identifier-completion-table ((backends (head 
union)))
   "Collect the results of multiple Xref BACKENDS."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]