aboutsummaryrefslogtreecommitdiffstats
path: root/src/macros.c
diff options
context:
space:
mode:
authorKim F. Storm2005-05-02 10:32:40 +0000
committerKim F. Storm2005-05-02 10:32:40 +0000
commit649d952dcc561fedf076e46acc8fb2d1e222b2fa (patch)
treecfff3f2a492bd82884d394b4b3f4d5d43de440d3 /src/macros.c
parent8736f4c222c4be2064d562f2d02e3694a36e9c0e (diff)
downloademacs-649d952dcc561fedf076e46acc8fb2d1e222b2fa.tar.gz
emacs-649d952dcc561fedf076e46acc8fb2d1e222b2fa.zip
(executing_kbd_macro_index): Rename from executing_macro_index.
(executing_kbd_macro_iterations): Rename from executing_macro_iterations. (executing_kbd_macro): Rename from executing_macro. * macro.c (syms_of_macros): Rename Lisp var executing-macro-index to executing-kbd-macro-index.
Diffstat (limited to 'src/macros.c')
-rw-r--r--src/macros.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/macros.c b/src/macros.c
index 04c8e1cd61f..8b17c9fb261 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -35,21 +35,21 @@ Lisp_Object Vexecuting_kbd_macro;
35 35
36/* Index of next character to fetch from that macro. */ 36/* Index of next character to fetch from that macro. */
37 37
38EMACS_INT executing_macro_index; 38EMACS_INT executing_kbd_macro_index;
39 39
40/* Number of successful iterations so far 40/* Number of successful iterations so far
41 for innermost keyboard macro. 41 for innermost keyboard macro.
42 This is not bound at each level, 42 This is not bound at each level,
43 so after an error, it describes the innermost interrupted macro. */ 43 so after an error, it describes the innermost interrupted macro. */
44 44
45int executing_macro_iterations; 45int executing_kbd_macro_iterations;
46 46
47/* This is the macro that was executing. 47/* This is the macro that was executing.
48 This is not bound at each level, 48 This is not bound at each level,
49 so after an error, it describes the innermost interrupted macro. 49 so after an error, it describes the innermost interrupted macro.
50 We use it only as a kind of flag, so no need to protect it. */ 50 We use it only as a kind of flag, so no need to protect it. */
51 51
52Lisp_Object executing_macro; 52Lisp_Object executing_kbd_macro;
53 53
54extern Lisp_Object real_this_command; 54extern Lisp_Object real_this_command;
55 55
@@ -114,7 +114,7 @@ macro before appending to it. */)
114 } 114 }
115 115
116 /* Must convert meta modifier when copying string to vector. */ 116 /* Must convert meta modifier when copying string to vector. */
117 cvt = STRINGP (current_kboard->Vlast_kbd_macro); 117 cvt = STRINGP (current_kboard->Vlast_kbd_macro);
118 for (i = 0; i < len; i++) 118 for (i = 0; i < len; i++)
119 { 119 {
120 Lisp_Object c; 120 Lisp_Object c;
@@ -285,8 +285,8 @@ each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */)
285 return Qnil; 285 return Qnil;
286} 286}
287 287
288/* Restore Vexecuting_kbd_macro and executing_macro_index - called when 288/* Restore Vexecuting_kbd_macro and executing_kbd_macro_index.
289 the unwind-protect in Fexecute_kbd_macro gets invoked. */ 289 Called when the unwind-protect in Fexecute_kbd_macro gets invoked. */
290 290
291static Lisp_Object 291static Lisp_Object
292pop_kbd_macro (info) 292pop_kbd_macro (info)
@@ -295,7 +295,7 @@ pop_kbd_macro (info)
295 Lisp_Object tem; 295 Lisp_Object tem;
296 Vexecuting_kbd_macro = XCAR (info); 296 Vexecuting_kbd_macro = XCAR (info);
297 tem = XCDR (info); 297 tem = XCDR (info);
298 executing_macro_index = XINT (XCAR (tem)); 298 executing_kbd_macro_index = XINT (XCAR (tem));
299 real_this_command = XCDR (tem); 299 real_this_command = XCDR (tem);
300 Frun_hooks (1, &Qkbd_macro_termination_hook); 300 Frun_hooks (1, &Qkbd_macro_termination_hook);
301 return Qnil; 301 return Qnil;
@@ -318,7 +318,7 @@ each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */)
318 struct gcpro gcpro1, gcpro2; 318 struct gcpro gcpro1, gcpro2;
319 int success_count = 0; 319 int success_count = 0;
320 320
321 executing_macro_iterations = 0; 321 executing_kbd_macro_iterations = 0;
322 322
323 if (!NILP (count)) 323 if (!NILP (count))
324 { 324 {
@@ -331,7 +331,7 @@ each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */)
331 error ("Keyboard macros must be strings or vectors"); 331 error ("Keyboard macros must be strings or vectors");
332 332
333 tem = Fcons (Vexecuting_kbd_macro, 333 tem = Fcons (Vexecuting_kbd_macro,
334 Fcons (make_number (executing_macro_index), 334 Fcons (make_number (executing_kbd_macro_index),
335 real_this_command)); 335 real_this_command));
336 record_unwind_protect (pop_kbd_macro, tem); 336 record_unwind_protect (pop_kbd_macro, tem);
337 337
@@ -339,8 +339,8 @@ each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */)
339 do 339 do
340 { 340 {
341 Vexecuting_kbd_macro = final; 341 Vexecuting_kbd_macro = final;
342 executing_macro = final; 342 executing_kbd_macro = final;
343 executing_macro_index = 0; 343 executing_kbd_macro_index = 0;
344 344
345 current_kboard->Vprefix_arg = Qnil; 345 current_kboard->Vprefix_arg = Qnil;
346 346
@@ -354,14 +354,14 @@ each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */)
354 354
355 command_loop_1 (); 355 command_loop_1 ();
356 356
357 executing_macro_iterations = ++success_count; 357 executing_kbd_macro_iterations = ++success_count;
358 358
359 QUIT; 359 QUIT;
360 } 360 }
361 while (--repeat 361 while (--repeat
362 && (STRINGP (Vexecuting_kbd_macro) || VECTORP (Vexecuting_kbd_macro))); 362 && (STRINGP (Vexecuting_kbd_macro) || VECTORP (Vexecuting_kbd_macro)));
363 363
364 executing_macro = Qnil; 364 executing_kbd_macro = Qnil;
365 365
366 real_this_command = Vexecuting_kbd_macro; 366 real_this_command = Vexecuting_kbd_macro;
367 367
@@ -373,7 +373,7 @@ void
373init_macros () 373init_macros ()
374{ 374{
375 Vexecuting_kbd_macro = Qnil; 375 Vexecuting_kbd_macro = Qnil;
376 executing_macro = Qnil; 376 executing_kbd_macro = Qnil;
377} 377}
378 378
379void 379void
@@ -400,7 +400,7 @@ an existing macro. */);
400 doc: /* Currently executing keyboard macro (string or vector). 400 doc: /* Currently executing keyboard macro (string or vector).
401This is nil when not executing a keyboard macro. */); 401This is nil when not executing a keyboard macro. */);
402 402
403 DEFVAR_INT ("executing-macro-index", &executing_macro_index, 403 DEFVAR_INT ("executing-kbd-macro-index", &executing_kbd_macro_index,
404 doc: /* Index in currently executing keyboard macro; undefined if none executing. */); 404 doc: /* Index in currently executing keyboard macro; undefined if none executing. */);
405 405
406 DEFVAR_KBOARD ("last-kbd-macro", Vlast_kbd_macro, 406 DEFVAR_KBOARD ("last-kbd-macro", Vlast_kbd_macro,