comparison man/kmacro.texi @ 83548:c71725faff1a

Merged from emacs@sv.gnu.org. Last-minute emacsclient rewrites be damned! Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-490 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-491 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-492 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-493 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-494 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-495 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-496 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-497 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-498 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-499 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-500 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-501 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-502 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-503 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-504 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-505 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-506 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-507 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-508 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-509 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-510 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-511 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-512 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-513 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-514 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-515 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-516 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-517 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-518 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-519 Update from CVS: etc/TUTORIAL.cn: Updated. * emacs@sv.gnu.org/emacs--devo--0--patch-520 Merge from erc--emacs--22 * emacs@sv.gnu.org/emacs--devo--0--patch-521 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-522 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-523 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-524 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-525 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-526 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-527 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-528 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-529 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-530 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-531 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-532 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-533 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-534 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-535 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-161 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-162 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-163 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-164 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-165 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-166 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-167 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-168 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-169 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-170 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-588
author Karoly Lorentey <lorentey@elte.hu>
date Sun, 03 Dec 2006 15:03:30 +0000
parents 02e39decdc84 a6d2e4685692
children b8d9a391daf3
comparison
equal deleted inserted replaced
83547:0912b745fc75 83548:c71725faff1a
44 44
45 @node Basic Keyboard Macro 45 @node Basic Keyboard Macro
46 @section Basic Use 46 @section Basic Use
47 47
48 @table @kbd 48 @table @kbd
49 @item C-x ( 49 @item @key{F3}
50 @itemx @key{F3} 50 @itemx C-x (
51 Start defining a keyboard macro (@code{kmacro-start-macro}). 51 Start defining a keyboard macro (@code{kmacro-start-macro}).
52 @item @key{F4}
53 If a keyboard macro is being defined, end the definition; otherwise,
54 execute the most recent keyboard macro
55 (@code{kmacro-end-or-call-macro}).
52 @item C-x ) 56 @item C-x )
53 End the definition of a keyboard macro (@code{kmacro-end-macro}). 57 End the definition of a keyboard macro (@code{kmacro-end-macro}).
54 @item C-x e 58 @item C-x e
55 Execute the most recent keyboard macro (@code{kmacro-end-and-call-macro}). 59 Execute the most recent keyboard macro (@code{kmacro-end-and-call-macro}).
56 First end the definition of the keyboard macro, if currently defining it. 60 First end the definition of the keyboard macro, if currently defining it.
57 To immediately execute the keyboard macro again, just repeat the @kbd{e}. 61 To immediately execute the keyboard macro again, just repeat the @kbd{e}.
58 @item @key{F4}
59 If a keyboard macro is being defined, end the definition; otherwise,
60 execute the most recent keyboard macro
61 (@code{kmacro-end-or-call-macro}).
62 @item C-u C-x ( 62 @item C-u C-x (
63 Re-execute last keyboard macro, then add more keys to its definition. 63 Re-execute last keyboard macro, then add more keys to its definition.
64 @item C-u C-u C-x ( 64 @item C-u C-u C-x (
65 Add more keys to the last keyboard macro without re-executing it. 65 Add more keys to the last keyboard macro without re-executing it.
66 @item C-x C-k r 66 @item C-x C-k r
67 Run the last keyboard macro on each line that begins in the region 67 Run the last keyboard macro on each line that begins in the region
68 (@code{apply-macro-to-region-lines}). 68 (@code{apply-macro-to-region-lines}).
69 @end table 69 @end table
70 70
71 @kindex F3
72 @kindex F4
71 @kindex C-x ( 73 @kindex C-x (
72 @kindex C-x ) 74 @kindex C-x )
73 @kindex C-x e 75 @kindex C-x e
74 @findex kmacro-start-macro 76 @findex kmacro-start-macro
75 @findex kmacro-end-macro 77 @findex kmacro-end-macro
76 @findex kmacro-end-and-call-macro 78 @findex kmacro-end-and-call-macro
77 To start defining a keyboard macro, type the @kbd{C-x (} command 79 To start defining a keyboard macro, type the @kbd{F3} or @kbd{C-x (} command
78 (@code{kmacro-start-macro}). From then on, your keys continue to be 80 (@code{kmacro-start-macro}). From then on, your keys continue to be
79 executed, but also become part of the definition of the macro. @samp{Def} 81 executed, but also become part of the definition of the macro. @samp{Def}
80 appears in the mode line to remind you of what is going on. When you are 82 appears in the mode line to remind you of what is going on. When you are
81 finished, the @kbd{C-x )} command (@code{kmacro-end-macro}) terminates the 83 finished, the @kbd{F4} or @kbd{C-x )} command (@code{kmacro-end-macro}) terminates the
82 definition (without becoming part of it!). For example, 84 definition (without becoming part of it!). For example,
83 85
84 @example 86 @example
85 C-x ( M-f foo C-x ) 87 C-x ( M-f foo C-x )
86 @end example 88 @end example
113 indefinitely (until it gets an error or you type @kbd{C-g} or, on 115 indefinitely (until it gets an error or you type @kbd{C-g} or, on
114 MS-DOS, @kbd{C-@key{BREAK}}). 116 MS-DOS, @kbd{C-@key{BREAK}}).
115 117
116 The key @key{F4} is like a combination of @kbd{C-x )} and @kbd{C-x 118 The key @key{F4} is like a combination of @kbd{C-x )} and @kbd{C-x
117 e}. If you're defining a macro, @key{F4} ends the definition. 119 e}. If you're defining a macro, @key{F4} ends the definition.
118 Otherwise it executes the last macro. 120 Otherwise it executes the last macro. For example,
121
122 @example
123 F3 xyz F4 F4 F4
124 @end example
125
126 @noindent
127 inserts @samp{xyzxyzxyz} in the current buffer.
119 128
120 If you wish to repeat an operation at regularly spaced places in the 129 If you wish to repeat an operation at regularly spaced places in the
121 text, define a macro and include as part of the macro the commands to move 130 text, define a macro and include as part of the macro the commands to move
122 to the next place you want to use it. For example, if you want to change 131 to the next place you want to use it. For example, if you want to change
123 each line, you should position point at the start of a line, and define a 132 each line, you should position point at the start of a line, and define a
150 you'd expect. But if it exits a recursive edit that started before 159 you'd expect. But if it exits a recursive edit that started before
151 you invoked the keyboard macro, it also necessarily exits the keyboard 160 you invoked the keyboard macro, it also necessarily exits the keyboard
152 macro as part of the process. 161 macro as part of the process.
153 162
154 After you have terminated the definition of a keyboard macro, you can add 163 After you have terminated the definition of a keyboard macro, you can add
155 to the end of its definition by typing @kbd{C-u C-x (}. This is equivalent 164 to the end of its definition by typing @kbd{C-u F3} or @kbd{C-u C-x (}.
165 This is equivalent
156 to plain @kbd{C-x (} followed by retyping the whole definition so far. As 166 to plain @kbd{C-x (} followed by retyping the whole definition so far. As
157 a consequence it re-executes the macro as previously defined. 167 a consequence it re-executes the macro as previously defined.
158 168
159 You can also add to the end of the definition of the last keyboard 169 You can also add to the end of the definition of the last keyboard
160 macro without re-executing it by typing @kbd{C-u C-u C-x (}. 170 macro without re-executing it by typing @kbd{C-u C-u C-x (}.