annotate doc/emacs/kmacro.texi @ 112397:a7191495c39c

Include entries from yesterdays checkins that were in an unsaved buffer.
author Ken Manheimer <ken.manheimer@gmail.com>
date Fri, 21 Jan 2011 11:36:24 -0500
parents ef719132ddfa
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
1 @c This is part of the Emacs manual.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
2 @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001,
112218
376148b31b5e Add 2011 to FSF/AIST copyright years.
Glenn Morris <rgm@gnu.org>
parents: 106815
diff changeset
3 @c 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
4 @c See file emacs.texi for copying conditions.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
5 @node Keyboard Macros, Files, Fixit, Top
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
6 @chapter Keyboard Macros
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
7 @cindex defining keyboard macros
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
8 @cindex keyboard macro
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
9
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
10 In this chapter we describe how to record a sequence of editing
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
11 commands so you can repeat it conveniently later.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
12
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
13 A @dfn{keyboard macro} is a command defined by an Emacs user to stand for
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
14 another sequence of keys. For example, if you discover that you are
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
15 about to type @kbd{C-n M-d C-d} forty times, you can speed your work by
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
16 defining a keyboard macro to do @kbd{C-n M-d C-d}, and then executing
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
17 it 39 more times.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
18
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
19 You define a keyboard macro by executing and recording the commands
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
20 which are its definition. Put differently, as you define a keyboard
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
21 macro, the definition is being executed for the first time. This way,
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
22 you can see the effects of your commands, so that you don't have to
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
23 figure them out in your head. When you close the definition, the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
24 keyboard macro is defined and also has been, in effect, executed once.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
25 You can then do the whole thing over again by invoking the macro.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
26
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
27 Keyboard macros differ from ordinary Emacs commands in that they are
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
28 written in the Emacs command language rather than in Lisp. This makes it
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
29 easier for the novice to write them, and makes them more convenient as
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
30 temporary hacks. However, the Emacs command language is not powerful
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
31 enough as a programming language to be useful for writing anything
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
32 intelligent or general. For such things, Lisp must be used.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
33
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
34 @menu
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
35 * Basic Keyboard Macro:: Defining and running keyboard macros.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
36 * Keyboard Macro Ring:: Where previous keyboard macros are saved.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
37 * Keyboard Macro Counter:: Inserting incrementing numbers in macros.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
38 * Keyboard Macro Query:: Making keyboard macros do different things each time.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
39 * Save Keyboard Macro:: Giving keyboard macros names; saving them in files.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
40 * Edit Keyboard Macro:: Editing keyboard macros.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
41 * Keyboard Macro Step-Edit:: Interactively executing and editing a keyboard
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
42 macro.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
43 @end menu
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
44
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
45 @node Basic Keyboard Macro
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
46 @section Basic Use
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
47
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
48 @table @kbd
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
49 @item @key{F3}
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
50 Start defining a keyboard macro
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
51 (@code{kmacro-start-macro-or-insert-counter}).
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
52 @item @key{F4}
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
53 If a keyboard macro is being defined, end the definition; otherwise,
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
54 execute the most recent keyboard macro
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
55 (@code{kmacro-end-or-call-macro}).
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
56 @item C-u @key{F3}
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
57 Re-execute last keyboard macro, then append keys to its definition.
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
58 @item C-u C-u @key{F3}
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
59 Append keys to the last keyboard macro without re-executing it.
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
60 @item C-x C-k r
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
61 Run the last keyboard macro on each line that begins in the region
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
62 (@code{apply-macro-to-region-lines}).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
63 @end table
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
64
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
65 @kindex F3
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
66 @kindex F4
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
67 @findex kmacro-start-macro-or-insert-counter
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
68 @findex kmacro-end-or-call-macro
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
69 @findex kmacro-end-and-call-macro
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
70 To start defining a keyboard macro, type @key{F3}. From then on,
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
71 your keys continue to be executed, but also become part of the
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
72 definition of the macro. @samp{Def} appears in the mode line to
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
73 remind you of what is going on. When you are finished, type @key{F4}
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
74 (@code{kmacro-end-or-call-macro}) to terminate the definition. For
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
75 example,
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
76
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
77 @example
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
78 @key{F3} M-f foo @key{F4}
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
79 @end example
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
80
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
81 @noindent
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
82 defines a macro to move forward a word and then insert @samp{foo}.
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
83 Note that @key{F3} and @key{F4} do not become part of the macro.
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
84
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
85 After defining the macro, you can call it with @key{F4}. For the
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
86 above example, this has the same effect as typing @kbd{M-f foo} again.
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
87 (Note the two roles of the @key{F4} command: it ends the macro if you
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
88 are in the process of defining one, or calls the last macro
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
89 otherwise.) You can also supply @key{F4} with a numeric prefix
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
90 argument @samp{n}, which means to invoke the macro @samp{n} times. An
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
91 argument of zero repeats the macro indefinitely, until it gets an
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
92 error or you type @kbd{C-g} (or, on MS-DOS, @kbd{C-@key{BREAK}}).
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
93
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
94 The above example demonstrates a handy trick that you can employ
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
95 with keyboard macros: if you wish to repeat an operation at regularly
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
96 spaced places in the text, include a motion command as part of the
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
97 macro. In this case, repeating the macro inserts the string
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
98 @samp{foo} after each successive word.
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
99
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
100 After terminating the definition of a keyboard macro, you can append
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
101 more keystrokes to its definition by typing @kbd{C-u @key{F3}}. This
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
102 is equivalent to plain @key{F3} followed by retyping the whole
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
103 definition so far. As a consequence, it re-executes the macro as
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
104 previously defined. If you change the variable
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
105 @code{kmacro-execute-before-append} to @code{nil}, the existing macro
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
106 will not be re-executed before appending to it (the default is
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
107 @code{t}). You can also add to the end of the definition of the last
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
108 keyboard macro without re-executing it by typing @kbd{C-u C-u
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
109 @key{F3}}.
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
110
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
111 When a command reads an argument with the minibuffer, your
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
112 minibuffer input becomes part of the macro along with the command. So
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
113 when you replay the macro, the command gets the same argument as when
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
114 you entered the macro. For example,
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
115
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
116 @example
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
117 @key{F3} C-a C-k C-x b foo @key{RET} C-y C-x b @key{RET} @key{F4}
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
118 @end example
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
119
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
120 @noindent
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
121 defines a macro that kills the current line, yanks it into the buffer
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
122 @samp{foo}, then returns to the original buffer.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
123
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
124 Most keyboard commands work as usual in a keyboard macro definition,
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
125 with some exceptions. Typing @kbd{C-g} (@code{keyboard-quit}) quits
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
126 the keyboard macro definition. Typing @kbd{C-M-c}
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
127 (@code{exit-recursive-edit}) can be unreliable: it works as you'd
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
128 expect if exiting a recursive edit that started within the macro, but
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
129 if it exits a recursive edit that started before you invoked the
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
130 keyboard macro, it also necessarily exits the keyboard macro too.
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
131 Mouse events are also unreliable, even though you can use them in a
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
132 keyboard macro: when the macro replays the mouse event, it uses the
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
133 original mouse position of that event, the position that the mouse had
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
134 while you were defining the macro. The effect of this may be hard to
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
135 predict.
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
136
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
137 @findex apply-macro-to-region-lines
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
138 @kindex C-x C-k r
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
139 The command @kbd{C-x C-k r} (@code{apply-macro-to-region-lines})
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
140 repeats the last defined keyboard macro on each line that begins in
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
141 the region. It does this line by line, by moving point to the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
142 beginning of the line and then executing the macro.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
143
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
144 @kindex C-x (
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
145 @kindex C-x )
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
146 @kindex C-x e
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
147 @findex kmacro-start-macro
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
148 @findex kmacro-end-macro
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
149 In addition to the @key{F3} and @key{F4} commands described above,
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
150 Emacs also supports an older set of keybindings for defining and
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
151 executing keyboard macros. To begin a macro definition, type @kbd{C-x
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
152 (} (@code{kmacro-start-macro}); as with @key{F3}, a prefix argument
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
153 appends this definition to the last keyboard macro. To end a macro
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
154 definition, type @kbd{C-x )} (@code{kmacro-end-macro}). To execute
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
155 the most recent macro, type @kbd{C-x e}
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
156 (@code{kmacro-end-and-call-macro}). If you enter @kbd{C-x e} while
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
157 defining a macro, the macro is terminated and executed immediately.
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
158 Immediately after typing @kbd{C-x e}, you can type @key{e} repeatedly
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
159 to immediately repeat the macro one or more times. You can also give
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
160 @kbd{C-x e} a repeat argument, just like @key{F4}.
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
161
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
162 @kbd{C-x )} can be given a repeat count as an argument. This means
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
163 to repeat the macro right after defining it. The macro definition
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
164 itself counts as the first repetition, since it is executed as you
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
165 define it, so @kbd{C-u 4 C-x )} executes the macro immediately 3
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
166 additional times.
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
167
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
168 @node Keyboard Macro Ring
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
169 @section The Keyboard Macro Ring
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
170
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
171 All defined keyboard macros are recorded in the @dfn{keyboard macro
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
172 ring}. There is only one keyboard macro ring, shared by all buffers.
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
173
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
174 @table @kbd
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
175 @item C-x C-k C-k
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
176 Execute the keyboard macro at the head of the ring (@code{kmacro-end-or-call-macro-repeat}).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
177 @item C-x C-k C-n
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
178 Rotate the keyboard macro ring to the next macro (defined earlier)
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
179 (@code{kmacro-cycle-ring-next}).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
180 @item C-x C-k C-p
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
181 Rotate the keyboard macro ring to the previous macro (defined later)
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
182 (@code{kmacro-cycle-ring-previous}).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
183 @end table
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
184
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
185 All commands which operate on the keyboard macro ring use the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
186 same @kbd{C-x C-k} prefix. Most of these commands can be executed and
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
187 repeated immediately after each other without repeating the @kbd{C-x
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
188 C-k} prefix. For example,
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
189
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
190 @example
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
191 C-x C-k C-p C-p C-k C-k C-k C-n C-n C-k C-p C-k C-d
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
192 @end example
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
193
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
194 @noindent
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
195 will rotate the keyboard macro ring to the ``second previous'' macro,
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
196 execute the resulting head macro three times, rotate back to the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
197 original head macro, execute that once, rotate to the ``previous''
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
198 macro, execute that, and finally delete it from the macro ring.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
199
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
200 @findex kmacro-end-or-call-macro-repeat
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
201 @kindex C-x C-k C-k
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
202 The command @kbd{C-x C-k C-k} (@code{kmacro-end-or-call-macro-repeat})
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
203 executes the keyboard macro at the head of the macro ring. You can
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
204 repeat the macro immediately by typing another @kbd{C-k}, or you can
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
205 rotate the macro ring immediately by typing @kbd{C-n} or @kbd{C-p}.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
206
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
207 When a keyboard macro is being defined, @kbd{C-x C-k C-k} behaves
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
208 like @key{F4} except that, immediately afterward, you can use most key
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
209 bindings of this section without the @kbd{C-x C-k} prefix. For
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
210 instance, another @kbd{C-k} will re-execute the macro.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
211
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
212 @findex kmacro-cycle-ring-next
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
213 @kindex C-x C-k C-n
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
214 @findex kmacro-cycle-ring-previous
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
215 @kindex C-x C-k C-p
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
216 The commands @kbd{C-x C-k C-n} (@code{kmacro-cycle-ring-next}) and
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
217 @kbd{C-x C-k C-p} (@code{kmacro-cycle-ring-previous}) rotate the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
218 macro ring, bringing the next or previous keyboard macro to the head
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
219 of the macro ring. The definition of the new head macro is displayed
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
220 in the echo area. You can continue to rotate the macro ring
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
221 immediately by repeating just @kbd{C-n} and @kbd{C-p} until the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
222 desired macro is at the head of the ring. To execute the new macro
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
223 ring head immediately, just type @kbd{C-k}.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
224
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
225 Note that Emacs treats the head of the macro ring as the ``last
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
226 defined keyboard macro.'' For instance, @key{F4} will execute that
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
227 macro, and @kbd{C-x C-k n} will give it a name.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
228
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
229 @vindex kmacro-ring-max
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
230 The maximum number of macros stored in the keyboard macro ring is
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
231 determined by the customizable variable @code{kmacro-ring-max}.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
232
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
233 @node Keyboard Macro Counter
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
234 @section The Keyboard Macro Counter
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
235
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
236 Each keyboard macro has an associated counter, which is initialized
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
237 to 0 when you start defining the macro. This counter allows you to
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
238 insert a number into the buffer that depends on the number of times
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
239 the macro has been called. The counter is incremented each time its
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
240 value is inserted into the buffer.
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
241
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
242 @table @kbd
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
243 @item @key{F3}
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
244 In a keyboard macro definition, insert the keyboard macro counter
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
245 value in the buffer (@code{kmacro-start-macro-or-insert-counter}).
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
246 @item C-x C-k C-i
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
247 Insert the keyboard macro counter value in the buffer
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
248 (@code{kmacro-insert-counter}).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
249 @item C-x C-k C-c
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
250 Set the keyboard macro counter (@code{kmacro-set-counter}).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
251 @item C-x C-k C-a
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
252 Add the prefix arg to the keyboard macro counter (@code{kmacro-add-counter}).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
253 @item C-x C-k C-f
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
254 Specify the format for inserting the keyboard macro counter
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
255 (@code{kmacro-set-format}).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
256 @end table
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
257
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
258 @findex kmacro-insert-counter
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
259 @kindex C-x C-k C-i
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
260 When you are defining a keyboard macro, the command @key{F3}
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
261 (@code{kmacro-start-macro-or-insert-counter}) inserts the current
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
262 value of the keyboard macro's counter into the buffer, and increments
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
263 the counter by 1. (If you are not defining a macro, @key{F3} begins a
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
264 macro definition instead. @xref{Basic Keyboard Macro}.) You can use
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
265 a numeric prefix argument to specify a different increment. If you
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
266 just specify a @kbd{C-u} prefix, that is the same as an increment of
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
267 zero: it inserts the current counter value without changing it.
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
268
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
269 As an example, let us show how the keyboard macro counter can be
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
270 used to build a numbered list. Consider the following key sequence:
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
271
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
272 @example
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
273 @key{F3} C-a @key{F3} . @key{SPC} @key{F4}
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
274 @end example
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
275
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
276 @noindent
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
277 As part of this keyboard macro definition, the string @samp{0. } was
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
278 inserted into the beginning of the current line. If you now move
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
279 somewhere else in the buffer and type @key{F4} to invoke the macro,
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
280 the string @samp{1. } is inserted at the beginning of that line.
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
281 Subsequent invocations insert @samp{2. }, @samp{3. }, and so forth.
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
282
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
283 The command @kbd{C-x C-k C-i} (@code{kmacro-insert-counter}) does
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
284 the same thing as @key{F3}, but it can be used outside a keyboard
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
285 macro definition. When no keyboard macro is being defined or
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
286 executed, it inserts and increments the counter of the macro at the
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
287 head of the keyboard macro ring.
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
288
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
289 @findex kmacro-set-counter
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
290 @kindex C-x C-k C-c
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
291 The command @kbd{C-x C-k C-c} (@code{kmacro-set-counter}) sets the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
292 current macro counter to the value of the numeric argument. If you use
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
293 it inside the macro, it operates on each repetition of the macro. If
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
294 you specify just @kbd{C-u} as the prefix, while executing the macro,
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
295 that resets the counter to the value it had at the beginning of the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
296 current repetition of the macro (undoing any increments so far in this
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
297 repetition).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
298
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
299 @findex kmacro-add-counter
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
300 @kindex C-x C-k C-a
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
301 The command @kbd{C-x C-k C-a} (@code{kmacro-add-counter}) adds the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
302 prefix argument to the current macro counter. With just @kbd{C-u} as
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
303 argument, it resets the counter to the last value inserted by any
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
304 keyboard macro. (Normally, when you use this, the last insertion
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
305 will be in the same macro and it will be the same counter.)
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
306
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
307 @findex kmacro-set-format
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
308 @kindex C-x C-k C-f
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
309 The command @kbd{C-x C-k C-f} (@code{kmacro-set-format}) prompts for
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
310 the format to use when inserting the macro counter. The default
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
311 format is @samp{%d}, which means to insert the number in decimal
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
312 without any padding. You can exit with empty minibuffer to reset the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
313 format to this default. You can specify any format string that the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
314 @code{format} function accepts and that makes sense with a single
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
315 integer extra argument (@pxref{Formatting Strings,,, elisp, The Emacs
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
316 Lisp Reference Manual}). Do not put the format string inside double
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
317 quotes when you insert it in the minibuffer.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
318
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
319 If you use this command while no keyboard macro is being defined or
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
320 executed, the new format affects all subsequent macro definitions.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
321 Existing macros continue to use the format in effect when they were
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
322 defined. If you set the format while defining a keyboard macro, this
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
323 affects the macro being defined from that point on, but it does not
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
324 affect subsequent macros. Execution of the macro will, at each step,
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
325 use the format in effect at that step during its definition. Changes
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
326 to the macro format during execution of a macro, like the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
327 corresponding changes during its definition, have no effect on
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
328 subsequent macros.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
329
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
330 The format set by @kbd{C-x C-k C-f} does not affect insertion of
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
331 numbers stored in registers.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
332
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
333 If you use a register as a counter, incrementing it on each
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
334 repetition of the macro, that accomplishes the same thing as a
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
335 keyboard macro counter. @xref{RegNumbers}. For most purposes, it is
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
336 simpler to use a keyboard macro counter.
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
337
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
338 @node Keyboard Macro Query
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
339 @section Executing Macros with Variations
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
340
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
341 In a keyboard macro, you can create an effect similar to that of
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
342 @code{query-replace}, in that the macro asks you each time around
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
343 whether to make a change.
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
344
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
345 @table @kbd
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
346 @item C-x q
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
347 When this point is reached during macro execution, ask for confirmation
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
348 (@code{kbd-macro-query}).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
349 @end table
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
350
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
351 @kindex C-x q
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
352 @findex kbd-macro-query
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
353 While defining the macro, type @kbd{C-x q} at the point where you
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
354 want the query to occur. During macro definition, the @kbd{C-x q}
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
355 does nothing, but when you run the macro later, @kbd{C-x q} asks you
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
356 interactively whether to continue.
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
357
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
358 The valid responses when @kbd{C-x q} asks are:
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
359
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
360 @table @asis
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
361 @item @key{SPC} (or @kbd{y})
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
362 Continue executing the keyboard macro.
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
363
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
364 @item @key{DEL} (or @kbd{n})
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
365 Skip the remainder of this repetition of the macro, and start right
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
366 away with the next repetition.
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
367
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
368 @item @key{RET} (or @kbd{q})
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
369 Skip the remainder of this repetition and cancel further repetitions.
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
370
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
371 @item @kbd{C-r}
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
372 Enter a recursive editing level, in which you can perform editing
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
373 which is not part of the macro. When you exit the recursive edit
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
374 using @kbd{C-M-c}, you are asked again how to continue with the
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
375 keyboard macro. If you type a @key{SPC} at this time, the rest of the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
376 macro definition is executed. It is up to you to leave point and the
98304
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
377 text in a state such that the rest of the macro will do what you want.
6a43f4608b29 (Basic Keyboard Macro): Make F3 and F4 the preferred
Chong Yidong <cyd@stupidchicken.com>
parents: 87903
diff changeset
378 @end table
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
379
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
380 @kbd{C-u C-x q}, which is @kbd{C-x q} with a numeric argument,
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
381 performs a completely different function. It enters a recursive edit
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
382 reading input from the keyboard, both when you type it during the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
383 definition of the macro, and when it is executed from the macro. During
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
384 definition, the editing you do inside the recursive edit does not become
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
385 part of the macro. During macro execution, the recursive edit gives you
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
386 a chance to do some particularized editing on each repetition.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
387 @xref{Recursive Edit}.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
388
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
389 @node Save Keyboard Macro
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
390 @section Naming and Saving Keyboard Macros
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
391
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
392 @table @kbd
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
393 @item C-x C-k n
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
394 Give a command name (for the duration of the Emacs session) to the most
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
395 recently defined keyboard macro (@code{kmacro-name-last-macro}).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
396 @item C-x C-k b
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
397 Bind the most recently defined keyboard macro to a key sequence (for
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
398 the duration of the session) (@code{kmacro-bind-to-key}).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
399 @item M-x insert-kbd-macro
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
400 Insert in the buffer a keyboard macro's definition, as Lisp code.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
401 @end table
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
402
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
403 @cindex saving keyboard macros
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
404 @findex kmacro-name-last-macro
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
405 @kindex C-x C-k n
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
406 If you wish to save a keyboard macro for later use, you can give it
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
407 a name using @kbd{C-x C-k n} (@code{kmacro-name-last-macro}).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
408 This reads a name as an argument using the minibuffer and defines that
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
409 name to execute the last keyboard macro, in its current form. (If you
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
410 later add to the definition of this macro, that does not alter the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
411 name's definition as a macro.) The macro name is a Lisp symbol, and
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
412 defining it in this way makes it a valid command name for calling with
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
413 @kbd{M-x} or for binding a key to with @code{global-set-key}
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
414 (@pxref{Keymaps}). If you specify a name that has a prior definition
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
415 other than a keyboard macro, an error message is shown and nothing is
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
416 changed.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
417
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
418 @cindex binding keyboard macros
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
419 @findex kmacro-bind-to-key
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
420 @kindex C-x C-k b
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
421 You can also bind the last keyboard macro (in its current form) to a
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
422 key, using @kbd{C-x C-k b} (@code{kmacro-bind-to-key}) followed by the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
423 key sequence you want to bind. You can bind to any key sequence in
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
424 the global keymap, but since most key sequences already have other
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
425 bindings, you should select the key sequence carefully. If you try to
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
426 bind to a key sequence with an existing binding (in any keymap), this
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
427 command asks you for confirmation before replacing the existing binding.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
428
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
429 To avoid problems caused by overriding existing bindings, the key
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
430 sequences @kbd{C-x C-k 0} through @kbd{C-x C-k 9} and @kbd{C-x C-k A}
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
431 through @kbd{C-x C-k Z} are reserved for your own keyboard macro
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
432 bindings. In fact, to bind to one of these key sequences, you only
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
433 need to type the digit or letter rather than the whole key sequences.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
434 For example,
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
435
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
436 @example
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
437 C-x C-k b 4
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
438 @end example
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
439
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
440 @noindent
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
441 will bind the last keyboard macro to the key sequence @kbd{C-x C-k 4}.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
442
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
443 @findex insert-kbd-macro
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
444 Once a macro has a command name, you can save its definition in a file.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
445 Then it can be used in another editing session. First, visit the file
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
446 you want to save the definition in. Then use this command:
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
447
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
448 @example
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
449 M-x insert-kbd-macro @key{RET} @var{macroname} @key{RET}
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
450 @end example
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
451
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
452 @noindent
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
453 This inserts some Lisp code that, when executed later, will define the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
454 same macro with the same definition it has now. (You need not
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
455 understand Lisp code to do this, because @code{insert-kbd-macro} writes
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
456 the Lisp code for you.) Then save the file. You can load the file
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
457 later with @code{load-file} (@pxref{Lisp Libraries}). If the file you
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
458 save in is your init file @file{~/.emacs} (@pxref{Init File}) then the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
459 macro will be defined each time you run Emacs.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
460
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
461 If you give @code{insert-kbd-macro} a numeric argument, it makes
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
462 additional Lisp code to record the keys (if any) that you have bound
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
463 to @var{macroname}, so that the macro will be reassigned the same keys
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
464 when you load the file.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
465
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
466 @node Edit Keyboard Macro
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
467 @section Editing a Keyboard Macro
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
468
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
469 @table @kbd
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
470 @item C-x C-k C-e
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
471 Edit the last defined keyboard macro (@code{kmacro-edit-macro}).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
472 @item C-x C-k e @var{name} @key{RET}
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
473 Edit a previously defined keyboard macro @var{name} (@code{edit-kbd-macro}).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
474 @item C-x C-k l
98622
99b9163e937f (Edit Keyboard Macro): Lossage is now 300 keys.
Romain Francoise <romain@orebokech.com>
parents: 98304
diff changeset
475 Edit the last 300 keystrokes as a keyboard macro
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
476 (@code{kmacro-edit-lossage}).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
477 @end table
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
478
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
479 @findex kmacro-edit-macro
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
480 @kindex C-x C-k C-e
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
481 @kindex C-x C-k RET
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
482 You can edit the last keyboard macro by typing @kbd{C-x C-k C-e} or
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
483 @kbd{C-x C-k RET} (@code{kmacro-edit-macro}). This formats the macro
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
484 definition in a buffer and enters a specialized major mode for editing
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
485 it. Type @kbd{C-h m} once in that buffer to display details of how to
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
486 edit the macro. When you are finished editing, type @kbd{C-c C-c}.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
487
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
488 @findex edit-kbd-macro
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
489 @kindex C-x C-k e
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
490 You can edit a named keyboard macro or a macro bound to a key by typing
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
491 @kbd{C-x C-k e} (@code{edit-kbd-macro}). Follow that with the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
492 keyboard input that you would use to invoke the macro---@kbd{C-x e} or
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
493 @kbd{M-x @var{name}} or some other key sequence.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
494
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
495 @findex kmacro-edit-lossage
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
496 @kindex C-x C-k l
98622
99b9163e937f (Edit Keyboard Macro): Lossage is now 300 keys.
Romain Francoise <romain@orebokech.com>
parents: 98304
diff changeset
497 You can edit the last 300 keystrokes as a macro by typing
84249
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
498 @kbd{C-x C-k l} (@code{kmacro-edit-lossage}).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
499
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
500 @node Keyboard Macro Step-Edit
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
501 @section Stepwise Editing a Keyboard Macro
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
502
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
503 @findex kmacro-step-edit-macro
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
504 @kindex C-x C-k SPC
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
505 You can interactively replay and edit the last keyboard
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
506 macro, one command at a time, by typing @kbd{C-x C-k SPC}
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
507 (@code{kmacro-step-edit-macro}). Unless you quit the macro using
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
508 @kbd{q} or @kbd{C-g}, the edited macro replaces the last macro on the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
509 macro ring.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
510
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
511 This macro editing feature shows the last macro in the minibuffer
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
512 together with the first (or next) command to be executed, and prompts
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
513 you for an action. You can enter @kbd{?} to get a summary of your
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
514 options. These actions are available:
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
515
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
516 @itemize @bullet{}
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
517 @item
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
518 @kbd{SPC} and @kbd{y} execute the current command, and advance to the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
519 next command in the keyboard macro.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
520 @item
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
521 @kbd{n}, @kbd{d}, and @kbd{DEL} skip and delete the current command.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
522 @item
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
523 @kbd{f} skips the current command in this execution of the keyboard
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
524 macro, but doesn't delete it from the macro.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
525 @item
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
526 @kbd{@key{TAB}} executes the current command, as well as all similar
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
527 commands immediately following the current command; for example, @key{TAB}
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
528 may be used to insert a sequence of characters (corresponding to a
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
529 sequence of @code{self-insert-command} commands).
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
530 @item
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
531 @kbd{c} continues execution (without further editing) until the end of
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
532 the keyboard macro. If execution terminates normally, the edited
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
533 macro replaces the original keyboard macro.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
534 @item
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
535 @kbd{C-k} skips and deletes the rest of the keyboard macro,
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
536 terminates step-editing, and replaces the original keyboard macro
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
537 with the edited macro.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
538 @item
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
539 @kbd{q} and @kbd{C-g} cancels the step-editing of the keyboard macro;
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
540 discarding any changes made to the keyboard macro.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
541 @item
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
542 @kbd{i KEY... C-j} reads and executes a series of key sequences (not
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
543 including the final @kbd{C-j}), and inserts them before the current
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
544 command in the keyboard macro, without advancing over the current
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
545 command.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
546 @item
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
547 @kbd{I KEY...} reads one key sequence, executes it, and inserts it
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
548 before the current command in the keyboard macro, without advancing
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
549 over the current command.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
550 @item
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
551 @kbd{r KEY... C-j} reads and executes a series of key sequences (not
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
552 including the final @kbd{C-j}), and replaces the current command in
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
553 the keyboard macro with them, advancing over the inserted key
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
554 sequences.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
555 @item
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
556 @kbd{R KEY...} reads one key sequence, executes it, and replaces the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
557 current command in the keyboard macro with that key sequence,
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
558 advancing over the inserted key sequence.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
559 @item
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
560 @kbd{a KEY... C-j} executes the current command, then reads and
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
561 executes a series of key sequences (not including the final
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
562 @kbd{C-j}), and inserts them after the current command in the keyboard
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
563 macro; it then advances over the current command and the inserted key
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
564 sequences.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
565 @item
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
566 @kbd{A KEY... C-j} executes the rest of the commands in the keyboard
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
567 macro, then reads and executes a series of key sequences (not
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
568 including the final @kbd{C-j}), and appends them at the end of the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
569 keyboard macro; it then terminates the step-editing and replaces the
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
570 original keyboard macro with the edited macro.
f5ca761533bc Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
571 @end itemize