aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris2009-01-09 03:30:02 +0000
committerGlenn Morris2009-01-09 03:30:02 +0000
commit4b09796d423bb241d597f147ce0d53567ce10b3f (patch)
tree633f04054914da6094f0d5ef03ca0a5f077663b7 /src
parenta31e445edbbc9e629fbc62a11e1a7fc0fd9fe6c7 (diff)
downloademacs-4b09796d423bb241d597f147ce0d53567ce10b3f.tar.gz
emacs-4b09796d423bb241d597f147ce0d53567ce10b3f.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/keyboard.c40
2 files changed, 26 insertions, 23 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ed3f736b096..22d944a48b2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12009-01-09 Glenn Morris <rgm@gnu.org>
2
3 * keyboard.c (last_command_char): For clarity, rename to...
4 (last_command-event): ... and update all users.
5 (last_input_char): For clarity, rename to...
6 (last_input_event): ... and update all users.
7 (last-command-char, last-input-char): Move to subr.el as aliases.
8 * cmds.c, commands.h: Update for last_command_char rename.
9
12009-01-08 Chong Yidong <cyd@stupidchicken.com> 102009-01-08 Chong Yidong <cyd@stupidchicken.com>
2 11
3 * font.c (font_open_for_lface): Handle unspecified height 12 * font.c (font_open_for_lface): Handle unspecified height
diff --git a/src/keyboard.c b/src/keyboard.c
index d9173f7f95a..7fb035929dc 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -259,15 +259,15 @@ int command_loop_level;
259/* Total number of times command_loop has read a key sequence. */ 259/* Total number of times command_loop has read a key sequence. */
260EMACS_INT num_input_keys; 260EMACS_INT num_input_keys;
261 261
262/* Last input character read as a command. */ 262/* Last input event read as a command. */
263Lisp_Object last_command_char; 263Lisp_Object last_command_event;
264 264
265/* Last input character read as a command, not counting menus 265/* Last input character read as a command, not counting menus
266 reached by the mouse. */ 266 reached by the mouse. */
267Lisp_Object last_nonmenu_event; 267Lisp_Object last_nonmenu_event;
268 268
269/* Last input character read for any purpose. */ 269/* Last input event read for any purpose. */
270Lisp_Object last_input_char; 270Lisp_Object last_input_event;
271 271
272/* If not Qnil, a list of objects to be read as subsequent command input. */ 272/* If not Qnil, a list of objects to be read as subsequent command input. */
273Lisp_Object Vunread_command_events; 273Lisp_Object Vunread_command_events;
@@ -1556,7 +1556,7 @@ command_loop_1 ()
1556 /* Do this after running Vpost_command_hook, for consistency. */ 1556 /* Do this after running Vpost_command_hook, for consistency. */
1557 current_kboard->Vlast_command = Vthis_command; 1557 current_kboard->Vlast_command = Vthis_command;
1558 current_kboard->Vreal_last_command = real_this_command; 1558 current_kboard->Vreal_last_command = real_this_command;
1559 if (!CONSP (last_command_char)) 1559 if (!CONSP (last_command_event))
1560 current_kboard->Vlast_repeatable_command = real_this_command; 1560 current_kboard->Vlast_repeatable_command = real_this_command;
1561 1561
1562 while (1) 1562 while (1)
@@ -1656,7 +1656,7 @@ command_loop_1 ()
1656 goto finalize; 1656 goto finalize;
1657 } 1657 }
1658 1658
1659 last_command_char = keybuf[i - 1]; 1659 last_command_event = keybuf[i - 1];
1660 1660
1661 /* If the previous command tried to force a specific window-start, 1661 /* If the previous command tried to force a specific window-start,
1662 forget about that, in case this command moves point far away 1662 forget about that, in case this command moves point far away
@@ -1821,12 +1821,12 @@ command_loop_1 ()
1821 } 1821 }
1822 else if (EQ (Vthis_command, Qself_insert_command) 1822 else if (EQ (Vthis_command, Qself_insert_command)
1823 /* Try this optimization only on char keystrokes. */ 1823 /* Try this optimization only on char keystrokes. */
1824 && NATNUMP (last_command_char) 1824 && NATNUMP (last_command_event)
1825 && CHAR_VALID_P (XFASTINT (last_command_char), 0)) 1825 && CHAR_VALID_P (XFASTINT (last_command_event), 0))
1826 { 1826 {
1827 unsigned int c 1827 unsigned int c
1828 = translate_char (Vtranslation_table_for_input, 1828 = translate_char (Vtranslation_table_for_input,
1829 XFASTINT (last_command_char)); 1829 XFASTINT (last_command_event));
1830 int value; 1830 int value;
1831 if (NILP (Vexecuting_kbd_macro) 1831 if (NILP (Vexecuting_kbd_macro)
1832 && !EQ (minibuf_window, selected_window)) 1832 && !EQ (minibuf_window, selected_window))
@@ -1930,11 +1930,11 @@ command_loop_1 ()
1930 If the command didn't actually create a prefix arg, 1930 If the command didn't actually create a prefix arg,
1931 but is merely a frame event that is transparent to prefix args, 1931 but is merely a frame event that is transparent to prefix args,
1932 then the above doesn't apply. */ 1932 then the above doesn't apply. */
1933 if (NILP (current_kboard->Vprefix_arg) || CONSP (last_command_char)) 1933 if (NILP (current_kboard->Vprefix_arg) || CONSP (last_command_event))
1934 { 1934 {
1935 current_kboard->Vlast_command = Vthis_command; 1935 current_kboard->Vlast_command = Vthis_command;
1936 current_kboard->Vreal_last_command = real_this_command; 1936 current_kboard->Vreal_last_command = real_this_command;
1937 if (!CONSP (last_command_char)) 1937 if (!CONSP (last_command_event))
1938 current_kboard->Vlast_repeatable_command = real_this_command; 1938 current_kboard->Vlast_repeatable_command = real_this_command;
1939 cancel_echoing (); 1939 cancel_echoing ();
1940 this_command_key_count = 0; 1940 this_command_key_count = 0;
@@ -3094,8 +3094,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time)
3094 record_single_kboard_state (); 3094 record_single_kboard_state ();
3095#endif 3095#endif
3096 3096
3097 last_input_char = c; 3097 last_input_event = c;
3098 Fcommand_execute (tem, Qnil, Fvector (1, &last_input_char), Qt); 3098 Fcommand_execute (tem, Qnil, Fvector (1, &last_input_event), Qt);
3099 3099
3100 if (CONSP (c) && EQ (XCAR (c), Qselect_window) && !end_time) 3100 if (CONSP (c) && EQ (XCAR (c), Qselect_window) && !end_time)
3101 /* We stopped being idle for this event; undo that. This 3101 /* We stopped being idle for this event; undo that. This
@@ -3336,7 +3336,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time)
3336 add_command_key (also_record); 3336 add_command_key (also_record);
3337 } 3337 }
3338 3338
3339 last_input_char = c; 3339 last_input_event = c;
3340 num_input_events++; 3340 num_input_events++;
3341 3341
3342 /* Process the help character specially if enabled */ 3342 /* Process the help character specially if enabled */
@@ -3413,7 +3413,7 @@ record_menu_key (c)
3413 add_command_key (c); 3413 add_command_key (c);
3414 3414
3415 /* Re-reading in the middle of a command */ 3415 /* Re-reading in the middle of a command */
3416 last_input_char = c; 3416 last_input_event = c;
3417 num_input_events++; 3417 num_input_events++;
3418} 3418}
3419 3419
@@ -11870,10 +11870,7 @@ syms_of_keyboard ()
11870 defsubr (&Sposn_at_point); 11870 defsubr (&Sposn_at_point);
11871 defsubr (&Sposn_at_x_y); 11871 defsubr (&Sposn_at_x_y);
11872 11872
11873 DEFVAR_LISP ("last-command-char", &last_command_char, 11873 DEFVAR_LISP ("last-command-event", &last_command_event,
11874 doc: /* Last input event that was part of a command. */);
11875
11876 DEFVAR_LISP_NOPRO ("last-command-event", &last_command_char,
11877 doc: /* Last input event that was part of a command. */); 11874 doc: /* Last input event that was part of a command. */);
11878 11875
11879 DEFVAR_LISP ("last-nonmenu-event", &last_nonmenu_event, 11876 DEFVAR_LISP ("last-nonmenu-event", &last_nonmenu_event,
@@ -11882,12 +11879,9 @@ Mouse menus give back keys that don't look like mouse events;
11882this variable holds the actual mouse event that led to the menu, 11879this variable holds the actual mouse event that led to the menu,
11883so that you can determine whether the command was run by mouse or not. */); 11880so that you can determine whether the command was run by mouse or not. */);
11884 11881
11885 DEFVAR_LISP ("last-input-char", &last_input_char, 11882 DEFVAR_LISP ("last-input-event", &last_input_event,
11886 doc: /* Last input event. */); 11883 doc: /* Last input event. */);
11887 11884
11888 DEFVAR_LISP_NOPRO ("last-input-event", &last_input_char,
11889 doc: /* Last input event. */);
11890
11891 DEFVAR_LISP ("unread-command-events", &Vunread_command_events, 11885 DEFVAR_LISP ("unread-command-events", &Vunread_command_events,
11892 doc: /* List of events to be read as the command input. 11886 doc: /* List of events to be read as the command input.
11893These events are processed first, before actual keyboard input. 11887These events are processed first, before actual keyboard input.