diff options
author | Kim F. Storm <storm@cua.dk> | 2006-10-22 22:25:03 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2006-10-22 22:25:03 +0000 |
commit | 96f4f7ecf189de0869289480e5915a6124b61b03 (patch) | |
tree | 66c64349bc9b78355bc38b06cc5a1254d4d986a5 | |
parent | 6b8aed24fe5456035382e6ecdea49e772936ce50 (diff) | |
download | emacs-96f4f7ecf189de0869289480e5915a6124b61b03.tar.gz |
(read_char): Make an element (t . EVENT) in
unread-command-events add EVENT to the current command's key sequence.
(syms_of_keyboard) <unread-command-events>: Update doc.
-rw-r--r-- | src/keyboard.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index eb46f99d668..364fa893539 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2537,6 +2537,18 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) c = XCAR (Vunread_command_events); Vunread_command_events = XCDR (Vunread_command_events); + reread = 1; + + /* Undo what sit-for did when it unread additional keys + inside universal-argument. */ + + if (CONSP (c) + && EQ (XCAR (c), Qt)) + { + reread = 0; + c = XCDR (c); + } + /* Undo what read_char_x_menu_prompt did when it unread additional keys returned by Fx_popup_menu. */ if (CONSP (c) @@ -2550,7 +2562,6 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) && (EQ (c, Qtool_bar) || EQ (c, Qmenu_bar))) *used_mouse_menu = 1; - reread = 1; goto reread_for_input_method; } @@ -11226,7 +11237,10 @@ so that you can determine whether the command was run by mouse or not. */); 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. */); +These events are processed first, before actual keyboard input. +Events read from this list are not normally added to `this-command-keys', +as they will already have been added once as they were read for the first time. +An element of the form (t . EVENT) forces EVENT to be added to that list. */); Vunread_command_events = Qnil; DEFVAR_INT ("unread-command-char", &unread_command_char, |