1106671c6853dc795b021f4d95dfcfcf2ffa7f09 — Philip Kaludercic 6 months ago 0d585d7
Interpret 'xref-union-excluded-backends' as a predicate
1 files changed, 7 insertions(+), 4 deletions(-)

M xref-union.el
M xref-union.el => xref-union.el +7 -4
@@ 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'."
       (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))
      (setq xref-union--current (cons 'union backends))