next up previous contents
Next: Customizing keys Up: The Woodnotes Guide to Previous: Spell Checking   Contents


Macros

Macros are a great way to take the burden out of repetitive, annoying tasks. As mentioned above, the "mac" in emacs stands for "macros" and it's something emacs does very well. Simply hit C-x ( to begin recording a macro, and C-x ) when you're done. The status bar at the bottom of the screen will read "defining keyboard macro" as you type. Once the keyboard macro has been defined, it's an easy matter to invoke that macro throughout your typing session by typing C-x e and to re-invoke it by just striking e again as necessary. Or you can select a region and use M-x apply-macro-to-region-lines to edit only a certain portion of your text with the macro (C-x C-k r).

If you want to keep the macro available to you, save it and give it a name: Type M-x name-last-kbd-macro or by hitting C-x C-k n. You can edit that same macro by typing M-x edit-kbd-macro. A new buffer will open with the commands that make up your macro, and you can fine-tune them if you wish.


next up previous contents
Next: Customizing keys Up: The Woodnotes Guide to Previous: Spell Checking   Contents
Randall Wood 2007-07-04