Function: cider-macrostep--expand

cider-macrostep--expand is a byte-compiled function defined in cider-macrostep.el.

Signature

(cider-macrostep--expand CODE EXPANDER)

Documentation

Return the macroexpansion of CODE in the current namespace.

EXPANDER is a cider/macroexpand expander name, such as "macroexpand-1"
(one level) or "macroexpand-all" (fully, recursively).

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-macrostep.el
(defun cider-macrostep--expand (code expander)
  "Return the macroexpansion of CODE in the current namespace.
EXPANDER is a `cider/macroexpand' expander name, such as \"macroexpand-1\"
\(one level) or \"macroexpand-all\" (fully, recursively)."
  (let ((result (thread-first `("op" "cider/macroexpand"
                                "expander" ,expander
                                "code" ,code
                                "ns" ,(cider-current-ns)
                                "display-namespaces" ,(symbol-name cider-macroexpansion-display-namespaces))
                              (cider-nrepl-sync-request))))
    (nrepl-dbind-response result (expansion status)
      (if (member "macroexpand-error" status)
          (user-error "Macroexpansion failed.  Check *cider-error* for more details")
        expansion))))