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.
/* 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.
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
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);
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);
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);