aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1993-05-10 00:10:08 +0000
committerJim Blandy1993-05-10 00:10:08 +0000
commit663258f2ffbd0f5c7fc6f774e20445b7e76112f0 (patch)
tree88d10b7eeffeaee3fa2bc3893c68db523d770753 /src
parentffe1dd7ac1d406d2099f0cec753f9aa223610111 (diff)
downloademacs-663258f2ffbd0f5c7fc6f774e20445b7e76112f0.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c21
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;
332 dequeuing functions? Such a flag could be screwed up by interrupts 332 dequeuing functions? Such a flag could be screwed up by interrupts
333 at inopportune times. */ 333 at inopportune times. */
334 334
335/* If this flag is non-zero, we will check mouse_moved to see when the 335/* If this flag is non-zero, we check mouse_moved to see when the
336 mouse moves, and motion events will appear in the input stream. If 336 mouse moves, and motion events will appear in the input stream. If
337 it is zero, mouse motion will be ignored. */ 337 it is zero, mouse motion is ignored. */
338int do_mouse_tracking; 338static int do_mouse_tracking;
339 339
340/* The window system handling code should set this if the mouse has 340/* The window system handling code should set this if the mouse has
341 moved since the last call to the mouse_position_hook. Calling that 341 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)
1299 Vlast_event_frame = internal_last_event_frame = Qmacro; 1299 Vlast_event_frame = internal_last_event_frame = Qmacro;
1300#endif 1300#endif
1301 1301
1302 if (executing_macro_index >= XFASTINT (Flength (Vexecuting_macro))) 1302 /* Exit the macro if we are at the end.
1303 Also, some things replace the macro with t
1304 to force an early exit. */
1305 if (EQ (Vexecuting_macro, Qt)
1306 || executing_macro_index >= XFASTINT (Flength (Vexecuting_macro)))
1303 { 1307 {
1304 XSET (c, Lisp_Int, -1); 1308 XSET (c, Lisp_Int, -1);
1305 return c; 1309 return c;
@@ -3154,6 +3158,15 @@ read_char_menu_prompt (nmaps, maps, prev_event, used_mouse_menu)
3154 realmaps[nmaps1++] = maps[mapno]; 3158 realmaps[nmaps1++] = maps[mapno];
3155 3159
3156 value = Fx_popup_menu (prev_event, Flist (nmaps1, realmaps)); 3160 value = Fx_popup_menu (prev_event, Flist (nmaps1, realmaps));
3161 if (CONSP (value))
3162 {
3163 /* If we got more than one event, put all but the first
3164 onto this list to be read later.
3165 Return just the first event now. */
3166 unread_command_events
3167 = nconc2 (XCONS (value)->cdr, unread_command_events);
3168 value = XCONS (value)->car;
3169 }
3157 if (NILP (value)) 3170 if (NILP (value))
3158 XSET (value, Lisp_Int, quit_char); 3171 XSET (value, Lisp_Int, quit_char);
3159 if (used_mouse_menu) 3172 if (used_mouse_menu)