Function: cider-browse-spec--tree-node
cider-browse-spec--tree-node is a byte-compiled function defined in
cider-browse-spec.el.
Signature
(cider-browse-spec--tree-node SPEC ANCESTORS)
Documentation
Return a cider-tree-view node for SPEC.
ANCESTORS is the list of specs on the path from the root; a SPEC that recurs onto its own path is rendered as a leaf, so expansion can't loop on a recursive spec. Visiting a node shows that spec's full definition.
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-browse-spec.el
(defun cider-browse-spec--tree-node (spec ancestors)
"Return a `cider-tree-view' node for SPEC.
ANCESTORS is the list of specs on the path from the root; a SPEC that recurs
onto its own path is rendered as a leaf, so expansion can't loop on a recursive
spec. Visiting a node shows that spec's full definition."
(let ((recursive (member spec ancestors)))
(cider-tree-view-node-create
:label (concat (cider-font-lock-as-clojure spec)
(when recursive (propertize " (recursive)" 'face 'shadow)))
:on-visit (lambda () (cider-browse-spec--browse spec))
:children-fn (unless recursive
(lambda ()
(mapcar (lambda (s)
(cider-browse-spec--tree-node s (cons spec ancestors)))
(cider-browse-spec--subspecs
(cider-sync-request:spec-form spec))))))))