From: Stefan Monnier Date: Fri, 11 Apr 2003 23:19:50 +0000 (+0000) Subject: (kbd_buffer_get_event): Don't handle SELECT_WINDOW_EVENT X-Git-Tag: ttn-vms-21-2-B4~10540 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a4e19f6e869fa365d27b3afd367c86d6f962f136;p=emacs.git (kbd_buffer_get_event): Don't handle SELECT_WINDOW_EVENT specially, so that they can't hide an implicit switch-frame event. (make_lispy_event): Handle SELECT_WINDOW_EVENT. (keys_of_keyboard): Don't bind [select-window] in special-event-map. --- diff --git a/src/keyboard.c b/src/keyboard.c index 4c7aaa03859..28d93be2678 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -4000,14 +4000,6 @@ kbd_buffer_get_event (kbp, used_mouse_menu) && !EQ (frame, selected_frame)) obj = make_lispy_switch_frame (frame); internal_last_event_frame = frame; - kbd_fetch_ptr = event + 1; - } - else if (event->kind == SELECT_WINDOW_EVENT) - { - /* Make an event (select-window (WINDOW)). */ - obj = Fcons (event->frame_or_window, Qnil); - obj = Fcons (Qselect_window, Fcons (obj, Qnil)); - kbd_fetch_ptr = event + 1; } else @@ -5658,6 +5650,12 @@ make_lispy_event (event) return event->arg; #endif + case SELECT_WINDOW_EVENT: + /* Make an event (select-window (WINDOW)). */ + return Fcons (Qselect_window, + Fcons (Fcons (event->frame_or_window, Qnil), + Qnil)); + case TOOL_BAR_EVENT: if (EQ (event->arg, event->frame_or_window)) /* This is the prefix key. We translate this to @@ -11276,8 +11274,12 @@ keys_of_keyboard () "ignore-event"); initial_define_lispy_key (Vspecial_event_map, "make-frame-visible", "ignore-event"); - initial_define_lispy_key (Vspecial_event_map, "select-window", - "handle-select-window"); + /* Handling it at such a low-level causes read_key_sequence to get + * confused because it doesn't realize that the current_buffer was + * changed by read_char. + * + * initial_define_lispy_key (Vspecial_event_map, "select-window", + * "handle-select-window"); */ initial_define_lispy_key (Vspecial_event_map, "save-session", "handle-save-session"); }