changeset 101000:ee5456efd63c

(last_command_char): For clarity, rename to... (last_command-event): ... and update all users. (last_input_char): For clarity, rename to... (last_input_event): ... and update all users. (last-command-char, last-input-char): Move to subr.el as aliases.
author Glenn Morris <rgm@gnu.org>
date Fri, 09 Jan 2009 03:30:02 +0000
parents 58dada904f85
children 14b421290b2f
files src/ChangeLog src/keyboard.c
diffstat 2 files changed, 26 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Jan 09 03:29:39 2009 +0000
+++ b/src/ChangeLog	Fri Jan 09 03:30:02 2009 +0000
@@ -1,3 +1,12 @@
+2009-01-09  Glenn Morris  <rgm@gnu.org>
+
+	* keyboard.c (last_command_char): For clarity, rename to...
+	(last_command-event): ... and update all users.
+	(last_input_char): For clarity, rename to...
+	(last_input_event): ... and update all users.
+	(last-command-char, last-input-char): Move to subr.el as aliases.
+	* cmds.c, commands.h: Update for last_command_char rename.
+
 2009-01-08  Chong Yidong  <cyd@stupidchicken.com>
 
 	* font.c (font_open_for_lface): Handle unspecified height
--- a/src/keyboard.c	Fri Jan 09 03:29:39 2009 +0000
+++ b/src/keyboard.c	Fri Jan 09 03:30:02 2009 +0000
@@ -259,15 +259,15 @@
 /* Total number of times command_loop has read a key sequence.  */
 EMACS_INT num_input_keys;
 
-/* Last input character read as a command.  */
-Lisp_Object last_command_char;
+/* Last input event read as a command.  */
+Lisp_Object last_command_event;
 
 /* Last input character read as a command, not counting menus
    reached by the mouse.  */
 Lisp_Object last_nonmenu_event;
 
-/* Last input character read for any purpose.  */
-Lisp_Object last_input_char;
+/* Last input event read for any purpose.  */
+Lisp_Object last_input_event;
 
 /* If not Qnil, a list of objects to be read as subsequent command input.  */
 Lisp_Object Vunread_command_events;
@@ -1556,7 +1556,7 @@
   /* Do this after running Vpost_command_hook, for consistency.  */
   current_kboard->Vlast_command = Vthis_command;
   current_kboard->Vreal_last_command = real_this_command;
-  if (!CONSP (last_command_char))
+  if (!CONSP (last_command_event))
     current_kboard->Vlast_repeatable_command = real_this_command;
 
   while (1)
@@ -1656,7 +1656,7 @@
 	  goto finalize;
 	}
 
-      last_command_char = keybuf[i - 1];
+      last_command_event = keybuf[i - 1];
 
       /* If the previous command tried to force a specific window-start,
 	 forget about that, in case this command moves point far away
@@ -1821,12 +1821,12 @@
 		}
 	      else if (EQ (Vthis_command, Qself_insert_command)
 		       /* Try this optimization only on char keystrokes.  */
-		       && NATNUMP (last_command_char)
-		       && CHAR_VALID_P (XFASTINT (last_command_char), 0))
+		       && NATNUMP (last_command_event)
+		       && CHAR_VALID_P (XFASTINT (last_command_event), 0))
 		{
 		  unsigned int c
 		    = translate_char (Vtranslation_table_for_input,
-				      XFASTINT (last_command_char));
+				      XFASTINT (last_command_event));
 		  int value;
 		  if (NILP (Vexecuting_kbd_macro)
 		      && !EQ (minibuf_window, selected_window))
@@ -1930,11 +1930,11 @@
 	 If the command didn't actually create a prefix arg,
 	 but is merely a frame event that is transparent to prefix args,
 	 then the above doesn't apply.  */
-      if (NILP (current_kboard->Vprefix_arg) || CONSP (last_command_char))
+      if (NILP (current_kboard->Vprefix_arg) || CONSP (last_command_event))
 	{
 	  current_kboard->Vlast_command = Vthis_command;
 	  current_kboard->Vreal_last_command = real_this_command;
-	  if (!CONSP (last_command_char))
+	  if (!CONSP (last_command_event))
 	    current_kboard->Vlast_repeatable_command = real_this_command;
 	  cancel_echoing ();
 	  this_command_key_count = 0;
@@ -3094,8 +3094,8 @@
       record_single_kboard_state ();
 #endif
 
-      last_input_char = c;
-      Fcommand_execute (tem, Qnil, Fvector (1, &last_input_char), Qt);
+      last_input_event = c;
+      Fcommand_execute (tem, Qnil, Fvector (1, &last_input_event), Qt);
 
       if (CONSP (c) && EQ (XCAR (c), Qselect_window) && !end_time)
 	/* We stopped being idle for this event; undo that.  This
@@ -3336,7 +3336,7 @@
 	add_command_key (also_record);
     }
 
-  last_input_char = c;
+  last_input_event = c;
   num_input_events++;
 
   /* Process the help character specially if enabled */
@@ -3413,7 +3413,7 @@
   add_command_key (c);
 
   /* Re-reading in the middle of a command */
-  last_input_char = c;
+  last_input_event = c;
   num_input_events++;
 }
 
@@ -11870,10 +11870,7 @@
   defsubr (&Sposn_at_point);
   defsubr (&Sposn_at_x_y);
 
-  DEFVAR_LISP ("last-command-char", &last_command_char,
-	       doc: /* Last input event that was part of a command.  */);
-
-  DEFVAR_LISP_NOPRO ("last-command-event", &last_command_char,
+  DEFVAR_LISP ("last-command-event", &last_command_event,
 		     doc: /* Last input event that was part of a command.  */);
 
   DEFVAR_LISP ("last-nonmenu-event", &last_nonmenu_event,
@@ -11882,12 +11879,9 @@
 this variable holds the actual mouse event that led to the menu,
 so that you can determine whether the command was run by mouse or not.  */);
 
-  DEFVAR_LISP ("last-input-char", &last_input_char,
+  DEFVAR_LISP ("last-input-event", &last_input_event,
 	       doc: /* Last input event.  */);
 
-  DEFVAR_LISP_NOPRO ("last-input-event", &last_input_char,
-		     doc: /* Last input event.  */);
-
   DEFVAR_LISP ("unread-command-events", &Vunread_command_events,
 	       doc: /* List of events to be read as the command input.
 These events are processed first, before actual keyboard input.