In my ~/.emacs, there are several keyboard macros stored. They appear as (fset 'dhteu-macro-name ...
entries. BTW, dhteu
is just a random alphabet combination prefixed to avoid collision with any existing commands.
I can C-x C-k e M-x
supply a macro name and a buffer opens allowing me to edit the macro. I can edit it and save it with C-c C-c
. Now if I C-x C-k e M-x
same macro name, I see the modified version. I tried executing the modified macro on a buffer. The madified macro executes successfully.
After all this, I naturally, want to store the macro. So, I visit ~/.emacs
and M-x insert-kbd-macro
. I expect the name of the macro I just edited to be available at this prompt. It isn't.
Entering the entire name produces a no match error.
I tried C-x C-k n
to give it another name. That produces a No keyboard macro defined
error.
So, the question is: How do I edit a stored keyboard macro and save it again?