Function: cider-xref--defmethod-regexp

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

Signature

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

Documentation

Build a regexp matching (defmethod NAME ...) forms for TARGET-NS/NAME.

NAME is matched per CONTEXT (qualified, aliased, or bare). Group 1 captures the method-name token; the dispatch value follows it.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-xref-source.el
(defun cider-xref--defmethod-regexp (target-ns name context)
  "Build a regexp matching `(defmethod NAME ...)' forms for TARGET-NS/NAME.
NAME is matched per CONTEXT (qualified, aliased, or bare).  Group 1 captures the
method-name token; the dispatch value follows it."
  (when-let* ((alts (cider-xref--name-alts target-ns name context)))
    (concat "(" cider-xref--ws "*defmethod" cider-xref--ws "+"
            "\\(" (mapconcat #'identity alts "\\|") "\\)"
            "\\(?:$\\|[^" cider-xref--symbol-chars "]\\)")))