]> code.delx.au - gnu-emacs/commitdiff
* dispnew.c (sit_for): Sit forever if TIMEOUT is t.
authorChong Yidong <cyd@stupidchicken.com>
Tue, 10 Oct 2006 01:20:20 +0000 (01:20 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Tue, 10 Oct 2006 01:20:20 +0000 (01:20 +0000)
* keyboard.c (command_loop_1): Handle non-number values of
`minibuffer-message-timeout'.
(Fexecute_extended_command): Fix typo.

* minibuf.c (temp_echo_area_glyphs): Sit for
`minibuffer-message-timeout' seconds.

src/ChangeLog
src/dispnew.c
src/keyboard.c
src/minibuf.c

index 1a6c151b4b1e6c599e4266a37fa04bebe770de9e..646fb43984398329fcc8b8385948162ebf990040 100644 (file)
@@ -1,5 +1,11 @@
 2006-10-09  Chong Yidong  <cyd@stupidchicken.com>
 
+       * dispnew.c (sit_for): Sit forever if TIMEOUT is t.
+
+       * keyboard.c (command_loop_1): Handle non-number values of
+       `minibuffer-message-timeout'.
+       (Fexecute_extended_command): Fix typo.
+
        * minibuf.c (temp_echo_area_glyphs): Sit for
        `minibuffer-message-timeout' seconds.
 
index 02a3aedaf113df69d115f1febffb0143a2cfdebd..59f109df45b575ef5b1cf8104967a626a5cb121a 100644 (file)
@@ -6502,7 +6502,8 @@ Emacs was built without floating point support.
 /* This is just like wait_reading_process_output, except that
    it does redisplay.
 
-   TIMEOUT is number of seconds to wait (float or integer).
+   TIMEOUT is number of seconds to wait (float or integer),
+   or t to wait forever.
    READING is 1 if reading input.
    If DO_DISPLAY is >0 display process output while waiting.
    If DO_DISPLAY is >1 perform an initial redisplay before waiting.
@@ -6535,10 +6536,15 @@ sit_for (timeout, reading, do_display)
       sec = (int) seconds;
       usec = (int) ((seconds - sec) * 1000000);
     }
+  else if (EQ (timeout, Qt))
+    {
+      sec = 0;
+      usec = 0;
+    }
   else
     wrong_type_argument (Qnumberp, timeout);
 
-  if (sec == 0 && usec == 0)
+  if (sec == 0 && usec == 0 && !EQ (timeout, Qt))
     return Qt;
 
 #ifdef SIGIO
index 8518bcb98c1e1cfc9c7835ec6f6162a728425bdb..eb46f99d668437bc22bfd9d6777534814be37122 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);
@@ -9982,7 +9984,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);
 
index 19b06acc471421d0004efe0ef0494fa8d49d9c98..bb9c80b4e7dbf4dcb04e7f65a0877d5de58c9268 100644 (file)
@@ -2714,12 +2714,9 @@ temp_echo_area_glyphs (string)
   Vinhibit_quit = Qt;
 
   if (NUMBERP (Vminibuffer_message_timeout))
-    {
-      if (Fgtr (Vminibuffer_message_timeout, make_number (0)))
-       sit_for (Vminibuffer_message_timeout, 0, 2);
-    }
+    sit_for (Vminibuffer_message_timeout, 0, 2);
   else
-    sit_for (make_number (-1), 0, 2);
+    sit_for (Qt, 0, 2);
 
   del_range_both (osize, osize_byte, ZV, ZV_BYTE, 1);
   SET_PT_BOTH (opoint, opoint_byte);