Function: cider-xref--reference-regexp

cider-xref--reference-regexp is a byte-compiled function defined in cider-xref-source.el.

Signature

(cider-xref--reference-regexp TARGET-NS NAME CONTEXT)

Documentation

Build a regexp matching references to TARGET-NS/NAME licensed by CONTEXT.

Group 1 captures the symbol token itself (so its bounds are the match bounds). CONTEXT is a plist as returned by cider-xref--ns-context.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-xref-source.el
(defun cider-xref--reference-regexp (target-ns name context)
  "Build a regexp matching references to TARGET-NS/NAME licensed by CONTEXT.
Group 1 captures the symbol token itself (so its bounds are the match bounds).
CONTEXT is a plist as returned by `cider-xref--ns-context'."
  (when-let* ((alts (cider-xref--name-alts target-ns name context)))
    (concat "\\(?:^\\|[^" cider-xref--symbol-chars "]\\)"  ; left boundary
            "\\(?:#'\\|[#'@`]\\)?"                          ; optional reader prefix
            "\\(" (mapconcat #'identity alts "\\|") "\\)"   ; the symbol token
            "\\(?:$\\|[^" cider-xref--symbol-chars "]\\)"))) ; right boundary