]> git.eshelyaron.com Git - emacs.git/commitdiff
(kbd_buffer_get_event): Don't handle SELECT_WINDOW_EVENT
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 11 Apr 2003 23:19:50 +0000 (23:19 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 11 Apr 2003 23:19:50 +0000 (23:19 +0000)
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.

src/keyboard.c

index 4c7aaa0385926d041ac14c1e2501c25f1be898f5..28d93be2678e627ac8c9844102c77a3f066b3eb8 100644 (file)
@@ -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");
 }