changeset 50556:34fbfb59283f

(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.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 11 Apr 2003 23:19:50 +0000
parents 37d227b879ad
children c940538354f7
files src/keyboard.c
diffstat 1 files changed, 12 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Fri Apr 11 23:17:42 2003 +0000
+++ b/src/keyboard.c	Fri Apr 11 23:19:50 2003 +0000
@@ -4002,14 +4002,6 @@
 	  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
 	{
 	  /* If this event is on a different frame, return a switch-frame this
@@ -5658,6 +5650,12 @@
       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 @@
 			    "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");
 }