Function: cider-macrostep--refresh-expandable
cider-macrostep--refresh-expandable is a byte-compiled function
defined in cider-macrostep.el.
Signature
(cider-macrostep--refresh-expandable)
Documentation
Re-highlight the operators of further-expandable sub-forms.
Scans the text of every active expansion, asks the REPL which heads resolve
to a macro or inline function, and underlines those. A no-op when disabled
or when the cider/classify-symbols op isn't available.
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-macrostep.el
(defun cider-macrostep--refresh-expandable ()
"Re-highlight the operators of further-expandable sub-forms.
Scans the text of every active expansion, asks the REPL which heads resolve
to a macro or inline function, and underlines those. A no-op when disabled
or when the `cider/classify-symbols' op isn't available."
(cider-macrostep--clear-expandable-overlays)
(when (and cider-macrostep-highlight-expandable
(cider-nrepl-op-supported-p "cider/classify-symbols"))
(when-let* ((heads (seq-mapcat
(lambda (ov)
(when (overlay-buffer ov)
(cider-macrostep--list-heads (overlay-start ov)
(overlay-end ov))))
cider-macrostep--overlays)))
(let ((classification (cider-macrostep--classify
(seq-uniq (mapcar #'car heads)))))
;; `seq-uniq' drops the duplicate hits that overlapping nested
;; expansions produce for the same head position.
(pcase-dolist (`(,operator ,head-beg ,head-end) (seq-uniq heads))
;; Only macros are expandable today; inline functions will join once
;; the expander learns to expand them (a separate effort).
(when (equal (nrepl-dict-get classification operator) "macro")
(let ((ov (make-overlay head-beg head-end)))
(overlay-put ov 'face 'cider-macrostep-expandable-face)
(overlay-put ov 'priority 100)
(push ov cider-macrostep--expandable-overlays))))))))