Skip to content

Add cider-macrostep-expand-all for one-shot full expansion - #3978

Merged
bbatsov merged 2 commits into
masterfrom
feat-macrostep-expand-all
Jun 19, 2026
Merged

Add cider-macrostep-expand-all for one-shot full expansion#3978
bbatsov merged 2 commits into
masterfrom
feat-macrostep-expand-all

Conversation

@bbatsov

@bbatsov bbatsov commented Jun 19, 2026

Copy link
Copy Markdown
Member

A small follow-up to the inline macrostep work: cider-macrostep-expand-all (bound to a in cider-macrostep-mode) fully expands the form before point in one step via macroexpand-all, for when you don't want to step down level by level to get to the bottom.

A couple of details:

  • It deliberately doesn't require the form's head to be a macro (the stepwise e does), since a recursive expansion can reach macros nested under a non-macro head like do or let.
  • "Nothing to expand" is reported (with whitespace normalized, so a mere reindent doesn't count as a change) when the form is already fully expanded.

Reuses the existing overlay/collapse machinery, so the result is a single collapsible expansion just like a stepwise one. The internal expander helper was generalized to take the expander name.

Also adds documentation for the inline macrostep flow as a whole - the manual only covered the separate-buffer commands until now, so the new section documents cider-macrostep-expand, the mode's keybindings (including a), the expandable-head highlighting/navigation and gensym coloring, and the relevant options.

bbatsov added 2 commits June 19, 2026 18:19
`cider-macrostep-expand-all' (bound to `a' in `cider-macrostep-mode')
fully expands the form before point in one step via `macroexpand-all',
for when you don't want to step down level by level.  Unlike the stepwise
command it doesn't require the head to be a macro, since a recursive
expansion can still reach macros in nested sub-forms.

Generalizes the internal expander helper to take the expander name.
@bbatsov
bbatsov merged commit 2953dc4 into master Jun 19, 2026
13 checks passed
@bbatsov
bbatsov deleted the feat-macrostep-expand-all branch June 19, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant