aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2001-08-12 21:22:26 +0000
committerRichard M. Stallman2001-08-12 21:22:26 +0000
commitd6f207b78d970d968bd5505873cf197161a26d25 (patch)
tree014f1020957a34197d24bd8df7945943e9908216
parentea626e87bb7f3c6969e25ae5236e4ab28bf30c8c (diff)
downloademacs-d6f207b78d970d968bd5505873cf197161a26d25.tar.gz
emacs-d6f207b78d970d968bd5505873cf197161a26d25.zip
Show a keyboard macro with minibuffer arguments in it.
-rw-r--r--man/custom.texi21
1 files changed, 17 insertions, 4 deletions
diff --git a/man/custom.texi b/man/custom.texi
index 617bf6c6538..b64413548a8 100644
--- a/man/custom.texi
+++ b/man/custom.texi
@@ -1116,10 +1116,18 @@ each line, you should position point at the start of a line, and define a
1116macro to change that line and leave point at the start of the next line. 1116macro to change that line and leave point at the start of the next line.
1117Then repeating the macro will operate on successive lines. 1117Then repeating the macro will operate on successive lines.
1118 1118
1119 After you have terminated the definition of a keyboard macro, you can add 1119 When a command reads an argument with the minibuffer, your
1120to the end of its definition by typing @kbd{C-u C-x (}. This is equivalent 1120minibuffer input becomes part of the macro along with the command. So
1121to plain @kbd{C-x (} followed by retyping the whole definition so far. As 1121when you replay the macro, the command gets the same argument as
1122a consequence it re-executes the macro as previously defined. 1122when you entered the macro. For example,
1123
1124@example
1125C-x ( C-a C-@key{SPC} C-n M-w C-x b f o o @key{RET} C-y C-x b @key{RET} C-x )
1126@end example
1127
1128@noindent
1129defines a macro that copies the current line into the buffer
1130@samp{foo}, then returns to the original buffer.
1123 1131
1124 You can use function keys in a keyboard macro, just like keyboard 1132 You can use function keys in a keyboard macro, just like keyboard
1125keys. You can even use mouse events, but be careful about that: when 1133keys. You can even use mouse events, but be careful about that: when
@@ -1135,6 +1143,11 @@ expect. But if it exits a recursive edit that started before you
1135invoked the keyboard macro, it also necessarily exits the keyboard macro 1143invoked the keyboard macro, it also necessarily exits the keyboard macro
1136as part of the process. 1144as part of the process.
1137 1145
1146 After you have terminated the definition of a keyboard macro, you can add
1147to the end of its definition by typing @kbd{C-u C-x (}. This is equivalent
1148to plain @kbd{C-x (} followed by retyping the whole definition so far. As
1149a consequence it re-executes the macro as previously defined.
1150
1138@findex edit-kbd-macro 1151@findex edit-kbd-macro
1139@kindex C-x C-k 1152@kindex C-x C-k
1140 You can edit a keyboard macro already defined by typing @kbd{C-x C-k} 1153 You can edit a keyboard macro already defined by typing @kbd{C-x C-k}