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

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

[elpa] externals/xref-union 1106671c68 3/5: Interpret 'xref-union-exclud


From: ELPA Syncer
Subject: [elpa] externals/xref-union 1106671c68 3/5: Interpret 'xref-union-excluded-backends' as a predicate
Date: Sun, 26 Mar 2023 08:01:54 -0400 (EDT)

branch: externals/xref-union
commit 1106671c6853dc795b021f4d95dfcfcf2ffa7f09
Author: Philip Kaludercic <philip.kaludercic@fau.de>
Commit: Philip Kaludercic <philipk@posteo.net>

    Interpret 'xref-union-excluded-backends' as a predicate
---
 xref-union.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/xref-union.el b/xref-union.el
index a8246672ad..08587089cf 100644
--- a/xref-union.el
+++ b/xref-union.el
@@ -43,9 +43,12 @@
   "Combine multiple Xref backends."
   :group 'xref)
 
-(defcustom xref-union-excluded-backends '()
-  "List of Xref backend not combine."
-  :type '(repeat sexp))
+(defcustom xref-union-excluded-backends #'ignore
+  "Predicate to exclude backends in `xref-union-mode'.
+The function is invoked with a single argument, the backend.  If
+a non-nil value is returned, the backend will not be added to the
+union backend, otherwise it will be."
+  :type 'function)
 
 
 ;;;; Xref interface
@@ -113,7 +116,7 @@ PATTERN is specified in `xref-backend-apropos'."
        'xref-backend-functions
        (lambda (b)
          (setq b (funcall b))
-         (unless (and b (member b xref-union-excluded-backends))
+         (when (and b (funcall xref-union-excluded-backends b))
            (push b backends))
          nil))
       (setq xref-union--current (cons 'union backends))



reply via email to

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