comparison src/macros.c @ 41940:63819c5d6049

Change doc-string comments to `new style' [w/`doc:' keyword].
author Pavel Janík <Pavel@Janik.cz>
date Tue, 11 Dec 2001 06:22:43 +0000
parents cdfd4d09b79a
children b77ef572e1c9
comparison
equal deleted inserted replaced
41939:e9a4c1f03019 41940:63819c5d6049
54 extern Lisp_Object real_this_command; 54 extern Lisp_Object real_this_command;
55 55
56 Lisp_Object Fexecute_kbd_macro (); 56 Lisp_Object Fexecute_kbd_macro ();
57 57
58 DEFUN ("start-kbd-macro", Fstart_kbd_macro, Sstart_kbd_macro, 1, 1, "P", 58 DEFUN ("start-kbd-macro", Fstart_kbd_macro, Sstart_kbd_macro, 1, 1, "P",
59 "Record subsequent keyboard input, defining a keyboard macro.\n\ 59 doc: /* Record subsequent keyboard input, defining a keyboard macro.
60 The commands are recorded even as they are executed.\n\ 60 The commands are recorded even as they are executed.
61 Use \\[end-kbd-macro] to finish recording and make the macro available.\n\ 61 Use \\[end-kbd-macro] to finish recording and make the macro available.
62 Use \\[name-last-kbd-macro] to give it a permanent name.\n\ 62 Use \\[name-last-kbd-macro] to give it a permanent name.
63 Non-nil arg (prefix arg) means append to last macro defined;\n\ 63 Non-nil arg (prefix arg) means append to last macro defined;
64 this begins by re-executing that macro as if you typed it again.") 64 this begins by re-executing that macro as if you typed it again. */)
65 (append) 65 (append)
66 Lisp_Object append; 66 Lisp_Object append;
67 { 67 {
68 if (!NILP (current_kboard->defining_kbd_macro)) 68 if (!NILP (current_kboard->defining_kbd_macro))
69 error ("Already defining kbd macro"); 69 error ("Already defining kbd macro");
70 70
127 127
128 return Qnil; 128 return Qnil;
129 } 129 }
130 130
131 DEFUN ("end-kbd-macro", Fend_kbd_macro, Send_kbd_macro, 0, 1, "p", 131 DEFUN ("end-kbd-macro", Fend_kbd_macro, Send_kbd_macro, 0, 1, "p",
132 "Finish defining a keyboard macro.\n\ 132 doc: /* Finish defining a keyboard macro.
133 The definition was started by \\[start-kbd-macro].\n\ 133 The definition was started by \\[start-kbd-macro].
134 The macro is now available for use via \\[call-last-kbd-macro],\n\ 134 The macro is now available for use via \\[call-last-kbd-macro],
135 or it can be given a name with \\[name-last-kbd-macro] and then invoked\n\ 135 or it can be given a name with \\[name-last-kbd-macro] and then invoked
136 under that name.\n\ 136 under that name.
137 \n\ 137
138 With numeric arg, repeat macro now that many times,\n\ 138 With numeric arg, repeat macro now that many times,
139 counting the definition just completed as the first repetition.\n\ 139 counting the definition just completed as the first repetition.
140 An argument of zero means repeat until error.") 140 An argument of zero means repeat until error. */)
141 (repeat) 141 (repeat)
142 Lisp_Object repeat; 142 Lisp_Object repeat;
143 { 143 {
144 if (NILP (current_kboard->defining_kbd_macro)) 144 if (NILP (current_kboard->defining_kbd_macro))
145 error ("Not defining kbd macro"); 145 error ("Not defining kbd macro");
146 146
208 current_kboard->kbd_macro_end = current_kboard->kbd_macro_ptr; 208 current_kboard->kbd_macro_end = current_kboard->kbd_macro_ptr;
209 } 209 }
210 210
211 DEFUN ("cancel-kbd-macro-events", Fcancel_kbd_macro_events, 211 DEFUN ("cancel-kbd-macro-events", Fcancel_kbd_macro_events,
212 Scancel_kbd_macro_events, 0, 0, 0, 212 Scancel_kbd_macro_events, 0, 0, 0,
213 "Cancel the events added to a keyboard macro for this command.") 213 doc: /* Cancel the events added to a keyboard macro for this command. */)
214 () 214 ()
215 { 215 {
216 current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_end; 216 current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_end;
217 return Qnil; 217 return Qnil;
218 } 218 }
219 219
220 DEFUN ("store-kbd-macro-event", Fstore_kbd_macro_event, 220 DEFUN ("store-kbd-macro-event", Fstore_kbd_macro_event,
221 Sstore_kbd_macro_event, 1, 1, 0, 221 Sstore_kbd_macro_event, 1, 1, 0,
222 "Store EVENT into the keyboard macro being defined.") 222 doc: /* Store EVENT into the keyboard macro being defined. */)
223 (event) 223 (event)
224 Lisp_Object event; 224 Lisp_Object event;
225 { 225 {
226 store_kbd_macro_char (event); 226 store_kbd_macro_char (event);
227 return Qnil; 227 return Qnil;
228 } 228 }
229 229
230 DEFUN ("call-last-kbd-macro", Fcall_last_kbd_macro, Scall_last_kbd_macro, 230 DEFUN ("call-last-kbd-macro", Fcall_last_kbd_macro, Scall_last_kbd_macro,
231 0, 1, "p", 231 0, 1, "p",
232 "Call the last keyboard macro that you defined with \\[start-kbd-macro].\n\ 232 doc: /* Call the last keyboard macro that you defined with \\[start-kbd-macro].
233 \n\ 233
234 A prefix argument serves as a repeat count. Zero means repeat until error.\n\ 234 A prefix argument serves as a repeat count. Zero means repeat until error.
235 \n\ 235
236 To make a macro permanent so you can call it even after\n\ 236 To make a macro permanent so you can call it even after
237 defining others, use \\[name-last-kbd-macro].") 237 defining others, use \\[name-last-kbd-macro]. */)
238 (prefix) 238 (prefix)
239 Lisp_Object prefix; 239 Lisp_Object prefix;
240 { 240 {
241 /* Don't interfere with recognition of the previous command 241 /* Don't interfere with recognition of the previous command
242 from before this macro started. */ 242 from before this macro started. */
243 Vthis_command = current_kboard->Vlast_command; 243 Vthis_command = current_kboard->Vlast_command;
274 Frun_hooks (1, &Qkbd_macro_termination_hook); 274 Frun_hooks (1, &Qkbd_macro_termination_hook);
275 return Qnil; 275 return Qnil;
276 } 276 }
277 277
278 DEFUN ("execute-kbd-macro", Fexecute_kbd_macro, Sexecute_kbd_macro, 1, 2, 0, 278 DEFUN ("execute-kbd-macro", Fexecute_kbd_macro, Sexecute_kbd_macro, 1, 2, 0,
279 "Execute MACRO as string of editor command characters.\n\ 279 doc: /* Execute MACRO as string of editor command characters.
280 If MACRO is a symbol, its function definition is used.\n\ 280 If MACRO is a symbol, its function definition is used.
281 COUNT is a repeat count, or nil for once, or 0 for infinite loop.") 281 COUNT is a repeat count, or nil for once, or 0 for infinite loop. */)
282 (macro, count) 282 (macro, count)
283 Lisp_Object macro, count; 283 Lisp_Object macro, count;
284 { 284 {
285 Lisp_Object final; 285 Lisp_Object final;
286 Lisp_Object tem; 286 Lisp_Object tem;
287 int pdlcount = specpdl_ptr - specpdl; 287 int pdlcount = specpdl_ptr - specpdl;
352 defsubr (&Sexecute_kbd_macro); 352 defsubr (&Sexecute_kbd_macro);
353 defsubr (&Scancel_kbd_macro_events); 353 defsubr (&Scancel_kbd_macro_events);
354 defsubr (&Sstore_kbd_macro_event); 354 defsubr (&Sstore_kbd_macro_event);
355 355
356 DEFVAR_KBOARD ("defining-kbd-macro", defining_kbd_macro, 356 DEFVAR_KBOARD ("defining-kbd-macro", defining_kbd_macro,
357 "Non-nil while a keyboard macro is being defined. Don't set this!"); 357 doc: /* Non-nil while a keyboard macro is being defined. Don't set this! */);
358 358
359 DEFVAR_LISP ("executing-macro", &Vexecuting_macro, 359 DEFVAR_LISP ("executing-macro", &Vexecuting_macro,
360 "Currently executing keyboard macro (string or vector); nil if none executing."); 360 doc: /* Currently executing keyboard macro (string or vector); nil if none executing. */);
361 361
362 DEFVAR_LISP_NOPRO ("executing-kbd-macro", &Vexecuting_macro, 362 DEFVAR_LISP_NOPRO ("executing-kbd-macro", &Vexecuting_macro,
363 "Currently executing keyboard macro (string or vector); nil if none executing."); 363 doc: /* Currently executing keyboard macro (string or vector); nil if none executing. */);
364 364
365 DEFVAR_KBOARD ("last-kbd-macro", Vlast_kbd_macro, 365 DEFVAR_KBOARD ("last-kbd-macro", Vlast_kbd_macro,
366 "Last kbd macro defined, as a string or vector; nil if none defined."); 366 doc: /* Last kbd macro defined, as a string or vector; nil if none defined. */);
367 } 367 }