Mercurial > emacs
changeset 73318:e876a1f62fec
* 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.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Tue, 10 Oct 2006 01:20:20 +0000 |
parents | a8f3a59e04e0 |
children | 0294d21b8f02 |
files | src/ChangeLog src/dispnew.c src/keyboard.c src/minibuf.c |
diffstat | 4 files changed, 22 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Tue Oct 10 00:33:16 2006 +0000 +++ b/src/ChangeLog Tue Oct 10 01:20:20 2006 +0000 @@ -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.
--- a/src/dispnew.c Tue Oct 10 00:33:16 2006 +0000 +++ b/src/dispnew.c Tue Oct 10 01:20:20 2006 +0000 @@ -6502,7 +6502,8 @@ /* 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 @@ 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
--- a/src/keyboard.c Tue Oct 10 00:33:16 2006 +0000 +++ b/src/keyboard.c Tue Oct 10 01:20:20 2006 +0000 @@ -1546,15 +1546,17 @@ 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 @@ 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);
--- a/src/minibuf.c Tue Oct 10 00:33:16 2006 +0000 +++ b/src/minibuf.c Tue Oct 10 01:20:20 2006 +0000 @@ -2714,12 +2714,9 @@ 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);