start-kbd-macro - Start/stop recording keyboard macro end-kbd-macro - Stop recording keyboard macro
start-kbd-macro (C-x ()
end-kbd-macro (C-x ))
A keyboard macro is a short hand way to repeat a series of characters. In effect, a recording is made of the sequence of keys that you hit while defining a keyboard macro. The recording is started with start-kbd-macro and ended with end-kbd-macro. The recording is then repeated whenever you execute the keyboard macro using execute-kbd-macro(2).
Since it is key-strokes that are being saved, you can freely intermix commands and text to be inserted into the buffer.
You can save a keyboard macro for later using the name-kbd-macro(2) command, which saves the keyboard macro as a named macro. Otherwise if you start another keyboard macro recording session, the previously defined macro is lost. So make sure that you are done with the current keyboard macro before defining another one. If you have a series of commands that you would like to record for later use, insert-macro(2) can be used to insert the macro into a text file and can be reloaded using the execute-file(2) or execute-buffer(2) commands.
Recording commences with start-kbd-macro (C-x () and terminates when an end-kbd-macro (C-x ) is encountered.
Once start-kbd-macro has been executed, the mouse is disabled until end-kbd-macro is executed. This is because the mouse events cannot be successfully recorded in macros. The main menu can still be used, but only via the keyboard bindings and hot-keys (note that the layout of the menu may change).
(c) Copyright JASSPA 1999
Last Modified: 1999/11/12
Generated On: 1999/12/01