changeset 10935:73b02c08f17d

(Fstart_kbd_macro): Access Vlast_kbd_macro via perdisplay. (Fend_kbd_macro, Fcall_last_kbd_macro): Likewise. (init_macros): Delete initialization. (syms_of_macros): Use DEFVAR_DISPLAY for Vlast_kbd_macro. Doc fix for executing-macro, executing-kbd-macro, last-kbd-macro.
author Karl Heuer <kwzh@gnu.org>
date Wed, 08 Mar 1995 01:25:04 +0000
parents c9a5894d8a92
children 7b2e18d65fed
files src/macros.c
diffstat 1 files changed, 11 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/macros.c	Wed Mar 08 01:24:14 1995 +0000
+++ b/src/macros.c	Wed Mar 08 01:25:04 1995 +0000
@@ -27,8 +27,6 @@
 
 Lisp_Object Qexecute_kbd_macro;
 
-Lisp_Object Vlast_kbd_macro;
-
 Lisp_Object Vexecuting_macro;
 int executing_macro_index;
 
@@ -64,7 +62,8 @@
     {
       message("Appending to kbd macro...");
       current_perdisplay->kbd_macro_ptr = current_perdisplay->kbd_macro_end;
-      Fexecute_kbd_macro (Vlast_kbd_macro, make_number (1));
+      Fexecute_kbd_macro (current_perdisplay->Vlast_kbd_macro,
+			  make_number (1));
     }
   current_perdisplay->defining_kbd_macro = Qt;
   
@@ -96,7 +95,7 @@
     {
       current_perdisplay->defining_kbd_macro = Qnil;
       update_mode_lines++;
-      Vlast_kbd_macro
+      current_perdisplay->Vlast_kbd_macro
 	= make_event_array ((current_perdisplay->kbd_macro_end
 			     - current_perdisplay->kbd_macro_buffer),
 			    current_perdisplay->kbd_macro_buffer);
@@ -104,12 +103,12 @@
     }
 
   if (XFASTINT (arg) == 0)
-    Fexecute_kbd_macro (Vlast_kbd_macro, arg);
+    Fexecute_kbd_macro (current_perdisplay->Vlast_kbd_macro, arg);
   else
     {
       XSETINT (arg, XINT (arg)-1);
       if (XINT (arg) > 0)
-	Fexecute_kbd_macro (Vlast_kbd_macro, arg);
+	Fexecute_kbd_macro (current_perdisplay->Vlast_kbd_macro, arg);
     }
   return Qnil;
 }
@@ -161,10 +160,10 @@
 {
   if (! NILP (current_perdisplay->defining_kbd_macro))
     error ("Can't execute anonymous macro while defining one");
-  else if (NILP (Vlast_kbd_macro))
+  else if (NILP (current_perdisplay->Vlast_kbd_macro))
     error ("No kbd macro has been defined");
   else
-    Fexecute_kbd_macro (Vlast_kbd_macro, prefix);
+    Fexecute_kbd_macro (current_perdisplay->Vlast_kbd_macro, prefix);
   return Qnil;
 }
 
@@ -228,7 +227,6 @@
 
 init_macros ()
 {
-  Vlast_kbd_macro = Qnil;
   Vexecuting_macro = Qnil;
 }
 
@@ -246,13 +244,13 @@
     "Non-nil while a keyboard macro is being defined.  Don't set this!");
 
   DEFVAR_LISP ("executing-macro", &Vexecuting_macro,
-    "Currently executing keyboard macro (a string); nil if none executing.");
+    "Currently executing keyboard macro (string or vector); nil if none executing.");
 
   DEFVAR_LISP_NOPRO ("executing-kbd-macro", &Vexecuting_macro,
-    "Currently executing keyboard macro (a string); nil if none executing.");
+    "Currently executing keyboard macro (string or vector); nil if none executing.");
 
-  DEFVAR_LISP ("last-kbd-macro", &Vlast_kbd_macro,
-    "Last kbd macro defined, as a string; nil if none defined.");
+  DEFVAR_DISPLAY ("last-kbd-macro", Vlast_kbd_macro,
+    "Last kbd macro defined, as a string or vector; nil if none defined.");
 }
 
 keys_of_macros ()