Function: cider-xref--candidate-files
cider-xref--candidate-files is a byte-compiled function defined in
cider-xref-source.el.
Signature
(cider-xref--candidate-files NAME FILES)
Documentation
Return the subset of FILES that textually mention NAME.
This is a fast first pass via grep/ripgrep, used only to narrow the set of files that the precise per-file scan then has to open. When the search can't run (no search program, say) all of FILES are returned as candidates.
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-xref-source.el
(defun cider-xref--candidate-files (name files)
"Return the subset of FILES that textually mention NAME.
This is a fast first pass via grep/ripgrep, used only to narrow the set of files
that the precise per-file scan then has to open. When the search can't run (no
search program, say) all of FILES are returned as candidates."
(if (null files)
nil
(condition-case nil
;; The left edge treats `/' as a boundary (via -no-slash) so that
;; qualified references like `alias/foo' aren't filtered out here before
;; the precise per-file scan - which knows how to match them - ever runs.
(let ((regexp (concat "[^" cider-xref--symbol-chars-no-slash "]"
(regexp-quote name)
"[^" cider-xref--symbol-chars "]")))
(delete-dups
(mapcar (lambda (item)
(xref-file-location-file (xref-item-location item)))
(xref-matches-in-files regexp files))))
(error files))))