I mistakenly ran a keyboard macro with an Infinite Argument, which made the macro execute endlessly. Take the following example, which just inserts the character a
:
C-x ( a C-x )
If I then run:
C-u 0 C-x e
in the *scratch*
buffer, the newly defined keyboard macro will be executed over and over again.
I tried C-g
several times, as well as ESC-ESC-ESC
, but the execution did not stop, and I had to kill Emacs, as it was not responding. Is there any way to halt the execution of a macro without losing the Emacs session?
In case it makes a difference, the Emacs version I tried is 24.3.1.
C-g
should work (it just did for me). Try holding it down.