/[emacs]/emacs/man/kmacro.texi
ViewVC logotype

Diff of /emacs/man/kmacro.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3.2.2 by miles, Sat Sep 4 09:22:57 2004 UTC revision 1.3.2.3 by miles, Sat Sep 4 09:26:23 2004 UTC
# Line 1  Line 1 
1  @c This is part of the Emacs manual.  @c This is part of the Emacs manual.
2  @c Copyright (C) 1985,86,87,93,94,95,97,2000,2001,2002,2003  @c Copyright (C) 1985,86,87,93,94,95,97,2000,2001,2002,2003,2004
3  @c  Free Software Foundation, Inc.  @c  Free Software Foundation, Inc.
4  @c See file emacs.texi for copying conditions.  @c See file emacs.texi for copying conditions.
5  @node Keyboard Macros, Files, Fixit, Top  @node Keyboard Macros, Files, Fixit, Top
# Line 179  the current region.  It does this line b Line 179  the current region.  It does this line b
179  beginning of the line and then executing the macro.  beginning of the line and then executing the macro.
180    
181  @node Keyboard Macro Ring  @node Keyboard Macro Ring
182  @section Where previous keyboard macros are saved  @section The Keyboard Macro Ring
183    
184    All defined keyboard macros are recorded in the ``keyboard macro ring'',    All defined keyboard macros are recorded in the ``keyboard macro ring'',
185  a list of sequences of keys.  There is only one keyboard macro ring,  a list of sequences of keys.  There is only one keyboard macro ring,
# Line 220  immediately by repeating just @kbd{C-n} Line 220  immediately by repeating just @kbd{C-n}
220  desired macro is at the head of the ring.  To execute the new macro  desired macro is at the head of the ring.  To execute the new macro
221  ring head immediately, just type @kbd{C-k}.  ring head immediately, just type @kbd{C-k}.
222    
223      Note that Emacs treats the head of the macro ring as the ``last
224    defined keyboard macro''.  For instance, it is the keyboard macro that
225    @kbd{C-x e} will execute.
226    
227  @findex kmacro-view-macro-repeat  @findex kmacro-view-macro-repeat
228  @kindex C-x C-k C-v  @kindex C-x C-k C-v
229    
# Line 257  the macro ring. Line 261  the macro ring.
261  executes the previous (rather than the head) element on the macro ring.  executes the previous (rather than the head) element on the macro ring.
262    
263  @node Keyboard Macro Counter  @node Keyboard Macro Counter
264  @section Inserting incrementing numbers in macros  @section The Keyboard Macro Counter
265    
266    Each keyboard macro has an associated counter which is automatically    Each keyboard macro has an associated counter which is automatically
267  incremented on every repetition of the keyboard macro.  Normally, the  incremented on every repetition of the keyboard macro.  Normally, the
268  macro counter is initialized to 0 when you start defining the macro,  macro counter is initialized to 0 when you start defining the macro,
269  and incremented by 1 after each insertion of the counter value;  and incremented by 1 after each insertion of the counter value;
270  that is, if you insert the macro counter twice while defining the  that is, if you insert the macro counter twice while defining the
271  macro, it will be incremented by 2 time for each repetition of the  macro, the counter will increase by 2 on each repetition of the macro.
 macro.  
272    
273  @findex kmacro-insert-counter  @findex kmacro-insert-counter
274  @kindex C-x C-k C-i  @kindex C-x C-k C-i
# Line 362  register as a counter, incrementing it o Line 365  register as a counter, incrementing it o
365  @kindex C-x C-k n  @kindex C-x C-k n
366    If you wish to save a keyboard macro for later use, you can give it    If you wish to save a keyboard macro for later use, you can give it
367  a name using @kbd{C-x C-k n} (@code{name-last-kbd-macro}).  a name using @kbd{C-x C-k n} (@code{name-last-kbd-macro}).
368  This reads a name as an argument using the minibuffer and defines that name  This reads a name as an argument using the minibuffer and defines that
369  to execute the macro.  The macro name is a Lisp symbol, and defining it in  name to execute the last keyboard macro, in its current form.  (If you
370  this way makes it a valid command name for calling with @kbd{M-x} or for  later add to the definition of this macro, that does not alter the
371  binding a key to with @code{global-set-key} (@pxref{Keymaps}).  If you  name's definition as a macro.)  The macro name is a Lisp symbol, and
372  specify a name that has a prior definition other than another keyboard  defining it in this way makes it a valid command name for calling with
373  macro, an error message is shown and nothing is changed.  @kbd{M-x} or for binding a key to with @code{global-set-key}
374    (@pxref{Keymaps}).  If you specify a name that has a prior definition
375    other than a keyboard macro, an error message is shown and nothing is
376    changed.
377    
378  @cindex binding keyboard macros  @cindex binding keyboard macros
379  @findex kmacro-bind-to-key  @findex kmacro-bind-to-key
380  @kindex C-x C-k b  @kindex C-x C-k b
381    Rather than giving a keyboard macro a name, you can bind it to a    You can also bind the last keyboard macro to a key, using
382  key using @kbd{C-x C-k b} (@code{kmacro-bind-to-key}) followed by the  @kbd{C-x C-k b} (@code{kmacro-bind-to-key}) followed by the
383  key sequence you want the keyboard macro to be bound to.  You can  key sequence you want the keyboard macro to be bound to.  You can
384  bind to any key sequence in the global keymap, but since most key  bind to any key sequence in the global keymap, but since most key
385  sequences already have other bindings, you should select the key  sequences already have other bindings, you should select the key
# Line 414  save in is your init file @file{~/.emacs Line 420  save in is your init file @file{~/.emacs
420  macro will be defined each time you run Emacs.  macro will be defined each time you run Emacs.
421    
422    If you give @code{insert-kbd-macro} a numeric argument, it makes    If you give @code{insert-kbd-macro} a numeric argument, it makes
423  additional Lisp code to record the keys (if any) that you have bound to the  additional Lisp code to record the keys (if any) that you have bound
424  keyboard macro, so that the macro will be reassigned the same keys when you  to @var{macroname}, so that the macro will be reassigned the same keys
425  load the file.  when you load the file.
426    
427  @node Edit Keyboard Macro  @node Edit Keyboard Macro
428  @section Interactively executing and editing a keyboard macro  @section Editing a Keyboard Macro
429    
430  @findex kmacro-edit-macro  @findex kmacro-edit-macro
431  @kindex C-x C-k C-e  @kindex C-x C-k C-e
# Line 443  keyboard input that you would use to inv Line 449  keyboard input that you would use to inv
449  @kbd{C-x C-k l} (@code{kmacro-edit-lossage}).  @kbd{C-x C-k l} (@code{kmacro-edit-lossage}).
450    
451  @node Keyboard Macro Step-Edit  @node Keyboard Macro Step-Edit
452  @section Interactively executing and editing a keyboard macro  @section Stepwise Editing a Keyboard Macro
453    
454  @findex kmacro-step-edit-macro  @findex kmacro-step-edit-macro
455  @kindex C-x C-k SPC  @kindex C-x C-k SPC

Legend:
Removed from v.1.3.2.2  
changed lines
  Added in v.1.3.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26