It has been around 4 years now that I am using Emacs and it feels awesome. You are an RTL engineer, probably you are no good to me without Emacs. Recently a friend of mine Anil Godasi (I call him the walking encyclopedia of HDL, you name the language he knows it and knows it __right__), asked me about an emacs query on how do we have nested macros on it. The answer was quite short, rename your last keyboard macro and you could call the macro as is. I am assuming he could not find it when he Google’d it and here is how we do it.
- Define the first macro
- Start your macro operations and finish defining the macro
- The macro is now defined, but then it is stored as the last-kbd-macro in emacs.
- So we rename the last-kbd-macro
- Gives you a prompt to define the name for the macro as my-macro1
Name last kbd macro : my-macro1
- Now get to defining the second macro and start your second macro.
- Call the first macro by
- Finish defining the second macro with a
- Execute the second macro with a
- This still calls the last macro and the last macro being defined was your second macro. You could still rename the second macro and call the nested macro in another third macro.