diff options
author | Jim Blandy <jimb@redhat.com> | 1993-05-10 00:10:08 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1993-05-10 00:10:08 +0000 |
commit | 663258f2ffbd0f5c7fc6f774e20445b7e76112f0 (patch) | |
tree | 88d10b7eeffeaee3fa2bc3893c68db523d770753 | |
parent | ffe1dd7ac1d406d2099f0cec753f9aa223610111 (diff) | |
download | emacs-663258f2ffbd0f5c7fc6f774e20445b7e76112f0.tar.gz emacs-663258f2ffbd0f5c7fc6f774e20445b7e76112f0.tar.bz2 emacs-663258f2ffbd0f5c7fc6f774e20445b7e76112f0.zip |
* keyboard.c (read_char): Exit kbd macro if Vexecuting_macro is t.
* keyboard.c (do_mouse_tracking): Now static.
* keyboard.c (read_char_menu_prompt): Expect Fx_popup_menu
to return a list of events. Don't lose any of them.
-rw-r--r-- | src/keyboard.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index eb0af725962..8083c066b22 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -332,10 +332,10 @@ static struct input_event *kbd_store_ptr; dequeuing functions? Such a flag could be screwed up by interrupts at inopportune times. */ -/* If this flag is non-zero, we will check mouse_moved to see when the +/* If this flag is non-zero, we check mouse_moved to see when the mouse moves, and motion events will appear in the input stream. If - it is zero, mouse motion will be ignored. */ -int do_mouse_tracking; + it is zero, mouse motion is ignored. */ +static int do_mouse_tracking; /* The window system handling code should set this if the mouse has moved since the last call to the mouse_position_hook. Calling that @@ -1299,7 +1299,11 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) Vlast_event_frame = internal_last_event_frame = Qmacro; #endif - if (executing_macro_index >= XFASTINT (Flength (Vexecuting_macro))) + /* Exit the macro if we are at the end. + Also, some things replace the macro with t + to force an early exit. */ + if (EQ (Vexecuting_macro, Qt) + || executing_macro_index >= XFASTINT (Flength (Vexecuting_macro))) { XSET (c, Lisp_Int, -1); return c; @@ -3154,6 +3158,15 @@ read_char_menu_prompt (nmaps, maps, prev_event, used_mouse_menu) realmaps[nmaps1++] = maps[mapno]; value = Fx_popup_menu (prev_event, Flist (nmaps1, realmaps)); + if (CONSP (value)) + { + /* If we got more than one event, put all but the first + onto this list to be read later. + Return just the first event now. */ + unread_command_events + = nconc2 (XCONS (value)->cdr, unread_command_events); + value = XCONS (value)->car; + } if (NILP (value)) XSET (value, Lisp_Int, quit_char); if (used_mouse_menu) |