Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix use of macroexpand-all in loopy-iter and loopy. #173

Merged
merged 1 commit into from
Oct 6, 2023
Merged

Conversation

okamsn
Copy link
Owner

@okamsn okamsn commented Oct 6, 2023

We should always be passing an environment to the function, otherwise the
environment is reset to nil, which breaks macros like cl-flet.

  • Stop doing top-level and sub-level expansion with different functions.
    • Instead, add loopy-iter--level.
    • Remove loopy-iter--sub-level-expanders, loopy-iter--top-level-expanders,
      loopy-iter--macroexpand-sub, loopy-iter--macroexpand-top,
      loopy-iter--keyword-expander-sub, and loopy-iter--keyword-expander-top.
  • Pass the macro temporary environment in all places where we didn't before:
    • loopy-iter
    • loopy
    • loopy-iter--parse-at-command
    • loopy-iter--opt-accum-expand-val
  • Add a loopy--with-protected-stack and loopy--bind-main-body.
  • Add tests.

We should always be passing an environment to the function, otherwise the
environment is reset to nil, which breaks macros like `cl-flet`.

- Stop doing top-level and sub-level expansion with different functions.
  - Instead, add `loopy-iter--level`.
  - Remove `loopy-iter--sub-level-expanders`, `loopy-iter--top-level-expanders`,
    `loopy-iter--macroexpand-sub`, `loopy-iter--macroexpand-top`,
    `loopy-iter--keyword-expander-sub`, and `loopy-iter--keyword-expander-top`.
- Pass the macro temporary environment in all places where we didn't before:
  - `loopy-iter`
  - `loopy`
  - `loopy-iter--parse-at-command`
  - `loopy-iter--opt-accum-expand-val`
- Add a `loopy--with-protected-stack` and `loopy--bind-main-body`.
- Add tests.
@okamsn okamsn merged commit 1a0e7c4 into master Oct 6, 2023
5 checks passed
@okamsn okamsn deleted the iter-flet branch October 6, 2023 00:54
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