(ftfont_pattern_entity): Check if FC_FONTFORMAT is
[bpt/emacs.git] / src / keyboard.c
index 786b3d9..aca0acd 100644 (file)
@@ -1546,15 +1546,17 @@ command_loop_1 ()
 
       if (minibuf_level
          && !NILP (echo_area_buffer[0])
-         && EQ (minibuf_window, echo_area_window)
-         && NUMBERP (Vminibuffer_message_timeout))
+         && EQ (minibuf_window, echo_area_window))
        {
          /* Bind inhibit-quit to t so that C-g gets read in
             rather than quitting back to the minibuffer.  */
          int count = SPECPDL_INDEX ();
          specbind (Qinhibit_quit, Qt);
 
-         sit_for (Vminibuffer_message_timeout, 0, 2);
+         if (NUMBERP (Vminibuffer_message_timeout))
+           sit_for (Vminibuffer_message_timeout, 0, 2);
+         else
+           sit_for (Qt, 0, 2);
 
          /* Clear the echo area.  */
          message2 (0, 0, 0);
@@ -2535,6 +2537,18 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time)
       c = XCAR (Vunread_command_events);
       Vunread_command_events = XCDR (Vunread_command_events);
 
+      reread = 1;
+
+      /* Undo what sit-for did when it unread additional keys
+        inside universal-argument.  */
+
+      if (CONSP (c)
+         && EQ (XCAR (c), Qt))
+       {
+         reread = 0;
+         c = XCDR (c);
+       }
+
       /* Undo what read_char_x_menu_prompt did when it unread
         additional keys returned by Fx_popup_menu.  */
       if (CONSP (c)
@@ -2548,7 +2562,6 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time)
          && (EQ (c, Qtool_bar) || EQ (c, Qmenu_bar)))
        *used_mouse_menu = 1;
 
-      reread = 1;
       goto reread_for_input_method;
     }
 
@@ -9981,7 +9994,7 @@ give to the command you invoke, if it asks for an argument.  */)
       if (NILP (echo_area_buffer[0]))
        waited = sit_for (make_number (0), 0, 2);
       else if (NUMBERP (Vsuggest_key_bindings))
-       waited = sit_for (Vminibuffer_message_timeout, 0, 2);
+       waited = sit_for (Vsuggest_key_bindings, 0, 2);
       else
        waited = sit_for (make_number (2), 0, 2);
 
@@ -11223,7 +11236,10 @@ so that you can determine whether the command was run by mouse or not.  */);
 
   DEFVAR_LISP ("unread-command-events", &Vunread_command_events,
               doc: /* List of events to be read as the command input.
-These events are processed first, before actual keyboard input.  */);
+These events are processed first, before actual keyboard input.
+Events read from this list are not normally added to `this-command-keys',
+as they will already have been added once as they were read for the first time.
+An element of the form (t . EVENT) forces EVENT to be added to that list.  */);
   Vunread_command_events = Qnil;
 
   DEFVAR_INT ("unread-command-char", &unread_command_char,