/[emacs]/emacs/src/macros.c
ViewVC logotype

Diff of /emacs/src/macros.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.55 by teirllm, Fri Nov 5 22:46:28 2004 UTC revision 1.56 by rms, Sun May 1 18:48:26 2005 UTC
# Line 31  Lisp_Object Qexecute_kbd_macro, Qkbd_mac Line 31  Lisp_Object Qexecute_kbd_macro, Qkbd_mac
31    
32  /* Kbd macro currently being executed (a string or vector).  */  /* Kbd macro currently being executed (a string or vector).  */
33    
34  Lisp_Object Vexecuting_macro;  Lisp_Object Vexecuting_kbd_macro;
35    
36  /* Index of next character to fetch from that macro.  */  /* Index of next character to fetch from that macro.  */
37    
# Line 285  each iteration of the macro.  Iteration Line 285  each iteration of the macro.  Iteration
285    return Qnil;    return Qnil;
286  }  }
287    
288  /* Restore Vexecuting_macro and executing_macro_index - called when  /* Restore Vexecuting_kbd_macro and executing_macro_index - called when
289     the unwind-protect in Fexecute_kbd_macro gets invoked.  */     the unwind-protect in Fexecute_kbd_macro gets invoked.  */
290    
291  static Lisp_Object  static Lisp_Object
# Line 293  pop_kbd_macro (info) Line 293  pop_kbd_macro (info)
293       Lisp_Object info;       Lisp_Object info;
294  {  {
295    Lisp_Object tem;    Lisp_Object tem;
296    Vexecuting_macro = XCAR (info);    Vexecuting_kbd_macro = XCAR (info);
297    tem = XCDR (info);    tem = XCDR (info);
298    executing_macro_index = XINT (XCAR (tem));    executing_macro_index = XINT (XCAR (tem));
299    real_this_command = XCDR (tem);    real_this_command = XCDR (tem);
# Line 330  each iteration of the macro.  Iteration Line 330  each iteration of the macro.  Iteration
330    if (!STRINGP (final) && !VECTORP (final))    if (!STRINGP (final) && !VECTORP (final))
331      error ("Keyboard macros must be strings or vectors");      error ("Keyboard macros must be strings or vectors");
332    
333    tem = Fcons (Vexecuting_macro,    tem = Fcons (Vexecuting_kbd_macro,
334                 Fcons (make_number (executing_macro_index),                 Fcons (make_number (executing_macro_index),
335                        real_this_command));                        real_this_command));
336    record_unwind_protect (pop_kbd_macro, tem);    record_unwind_protect (pop_kbd_macro, tem);
# Line 338  each iteration of the macro.  Iteration Line 338  each iteration of the macro.  Iteration
338    GCPRO2 (final, loopfunc);    GCPRO2 (final, loopfunc);
339    do    do
340      {      {
341        Vexecuting_macro = final;        Vexecuting_kbd_macro = final;
342        executing_macro = final;        executing_macro = final;
343        executing_macro_index = 0;        executing_macro_index = 0;
344    
# Line 359  each iteration of the macro.  Iteration Line 359  each iteration of the macro.  Iteration
359        QUIT;        QUIT;
360      }      }
361    while (--repeat    while (--repeat
362           && (STRINGP (Vexecuting_macro) || VECTORP (Vexecuting_macro)));           && (STRINGP (Vexecuting_kbd_macro) || VECTORP (Vexecuting_kbd_macro)));
363    
364    executing_macro = Qnil;    executing_macro = Qnil;
365    
366    real_this_command = Vexecuting_macro;    real_this_command = Vexecuting_kbd_macro;
367    
368    UNGCPRO;    UNGCPRO;
369    return unbind_to (pdlcount, Qnil);    return unbind_to (pdlcount, Qnil);
# Line 372  each iteration of the macro.  Iteration Line 372  each iteration of the macro.  Iteration
372  void  void
373  init_macros ()  init_macros ()
374  {  {
375    Vexecuting_macro = Qnil;    Vexecuting_kbd_macro = Qnil;
376    executing_macro = Qnil;    executing_macro = Qnil;
377  }  }
378    
# Line 396  syms_of_macros () Line 396  syms_of_macros ()
396  The value is the symbol `append' while appending to the definition of  The value is the symbol `append' while appending to the definition of
397  an existing macro.  */);  an existing macro.  */);
398    
399    DEFVAR_LISP ("executing-macro", &Vexecuting_macro,    DEFVAR_LISP ("executing-kbd-macro", &Vexecuting_kbd_macro,
400                 doc: /* Currently executing keyboard macro (string or vector); nil if none executing.  */);                 doc: /* Currently executing keyboard macro (string or vector).
401    This is nil when not executing a keyboard macro.  */);
402    
403    DEFVAR_INT ("executing-macro-index", &executing_macro_index,    DEFVAR_INT ("executing-macro-index", &executing_macro_index,
404                doc: /* Index in currently executing keyboard macro; undefined if none executing.  */);                doc: /* Index in currently executing keyboard macro; undefined if none executing.  */);
405    
   DEFVAR_LISP_NOPRO ("executing-kbd-macro", &Vexecuting_macro,  
                      doc: /* Currently executing keyboard macro (string or vector); nil if none executing.  */);  
   
406    DEFVAR_KBOARD ("last-kbd-macro", Vlast_kbd_macro,    DEFVAR_KBOARD ("last-kbd-macro", Vlast_kbd_macro,
407                   doc: /* Last kbd macro defined, as a string or vector; nil if none defined.  */);                   doc: /* Last kbd macro defined, as a string or vector; nil if none defined.  */);
408  }  }

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26