Function: cider-xref--defmethod-sites

cider-xref--defmethod-sites is a byte-compiled function defined in cider-xref-source.el.

Signature

(cider-xref--defmethod-sites VAR)

Documentation

Return the (defmethod VAR ...) sites across the project source.

VAR is the multimethod, resolved via the REPL when possible (else matched by bare name). Each element is a plist with :dispatch, :file, :line and
:column - locating the defmethods the runtime can't, since their method
functions carry no source metadata.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-xref-source.el
(defun cider-xref--defmethod-sites (var)
  "Return the `(defmethod VAR ...)' sites across the project source.
VAR is the multimethod, resolved via the REPL when possible (else matched by
bare name).  Each element is a plist with `:dispatch', `:file', `:line' and
`:column' - locating the `defmethod's the runtime can't, since their method
functions carry no source metadata."
  (let* ((resolved (and (cider-connected-p) (cider-xref--resolve-var var)))
         (target-ns (car resolved))
         (name (or (cdr resolved) (cider-xref--short-name var))))
    (when-let* ((files (cider-xref--project-source-files))
                (candidates (cider-xref--candidate-files name files)))
      (seq-mapcat (lambda (file)
                    (cider-xref--defmethods-in-file file target-ns name))
                  candidates))))