1

In scratch buffer, Emacs can expand macros(C-c e; macrostep-expand). But once I expanded the macro, it seems to become a read-only buffer. I don't know how to end macro expansion and return to writable buffer.

It would be very helpful if you could tell me the solution.

My environment is below.

  • GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0)
  • WSL2

Thanks

EDIT macro-expansion is a function of macrostep.el.

5
  • 1
    C-c e is reserved for end users, so whatever it is bound to, it should be you who defined that keybinding (hence we don't know what that might be). If something else has bound C-c e (or any C-c LETTER) then please report it as a bug, as that's in breach of the documented conventions.
    – phils
    Commented May 24, 2021 at 12:00
  • Sorry for the lack of information. In my setting, C-c e is bound to macrostep-expand.
    – R. Y
    Commented May 24, 2021 at 12:37
  • What is macrostep-expand, and where is it defined? I don't see it in Emacs 27.1 from emacs -Q. Please provide all relevant info in your question.
    – Drew
    Commented May 24, 2021 at 18:03
  • Is this about keyboard macros or Elisp macros? The question is unclear. I suspect it might be the former, in which case the tags are wrong. Unless you clarify the question it should be closed, I think.
    – Drew
    Commented May 24, 2021 at 18:04
  • 1
    macro-expand is a function of macrostep.el.
    – R. Y
    Commented May 24, 2021 at 21:52

1 Answer 1

0

The solution was just to press q on the expanded macro.

according to M-x describe-bindings

q       macrostep-collapse-all
c       macrostep-collapse
u       macrostep-collapse
DEL     macrostep-collapse
n       macrostep-next-macro
p       macrostep-prev-macro
e       macrostep-expand
1
  • You didn't answer the questions in my comment, so the question (and answer) remain unclear. Based on the answer I'm guessing this is about keyboard macros, not Elisp macros, but you should provide a reference (link) for macrostep-*.
    – Drew
    Commented May 24, 2021 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.