C-X ( Start a keystroke macre definition
C-X ) End a keystroke macro definition
C-X e Execute a keystroke macro
Only one keystroke macro may be defined at a time. Complex operations should probably be programmed in elisp rather than captured as a macro.
Note: We are recording keystrokes here, not commands. If a key is rebound after capturing a macro, playing back the macro will use the new definition.