diff options
| author | Chong Yidong | 2006-10-10 01:20:20 +0000 |
|---|---|---|
| committer | Chong Yidong | 2006-10-10 01:20:20 +0000 |
| commit | 2bcac7667a8d99b3ff897eaa0efe11b79b074c0c (patch) | |
| tree | c7c192ea949955fe1b977fbc185d77addac3182a | |
| parent | e29d96b65f897a3cef09053c6491116de25cade5 (diff) | |
| download | emacs-2bcac7667a8d99b3ff897eaa0efe11b79b074c0c.tar.gz emacs-2bcac7667a8d99b3ff897eaa0efe11b79b074c0c.zip | |
* 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.
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/dispnew.c | 10 | ||||
| -rw-r--r-- | src/keyboard.c | 10 | ||||
| -rw-r--r-- | src/minibuf.c | 7 |
4 files changed, 22 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 1a6c151b4b1..646fb439843 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2006-10-09 Chong Yidong <cyd@stupidchicken.com> | 1 | 2006-10-09 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 2 | ||
| 3 | * dispnew.c (sit_for): Sit forever if TIMEOUT is t. | ||
| 4 | |||
| 5 | * keyboard.c (command_loop_1): Handle non-number values of | ||
| 6 | `minibuffer-message-timeout'. | ||
| 7 | (Fexecute_extended_command): Fix typo. | ||
| 8 | |||
| 3 | * minibuf.c (temp_echo_area_glyphs): Sit for | 9 | * minibuf.c (temp_echo_area_glyphs): Sit for |
| 4 | `minibuffer-message-timeout' seconds. | 10 | `minibuffer-message-timeout' seconds. |
| 5 | 11 | ||
diff --git a/src/dispnew.c b/src/dispnew.c index 02a3aedaf11..59f109df45b 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -6502,7 +6502,8 @@ Emacs was built without floating point support. | |||
| 6502 | /* This is just like wait_reading_process_output, except that | 6502 | /* This is just like wait_reading_process_output, except that |
| 6503 | it does redisplay. | 6503 | it does redisplay. |
| 6504 | 6504 | ||
| 6505 | TIMEOUT is number of seconds to wait (float or integer). | 6505 | TIMEOUT is number of seconds to wait (float or integer), |
| 6506 | or t to wait forever. | ||
| 6506 | READING is 1 if reading input. | 6507 | READING is 1 if reading input. |
| 6507 | If DO_DISPLAY is >0 display process output while waiting. | 6508 | If DO_DISPLAY is >0 display process output while waiting. |
| 6508 | If DO_DISPLAY is >1 perform an initial redisplay before waiting. | 6509 | If DO_DISPLAY is >1 perform an initial redisplay before waiting. |
| @@ -6535,10 +6536,15 @@ sit_for (timeout, reading, do_display) | |||
| 6535 | sec = (int) seconds; | 6536 | sec = (int) seconds; |
| 6536 | usec = (int) ((seconds - sec) * 1000000); | 6537 | usec = (int) ((seconds - sec) * 1000000); |
| 6537 | } | 6538 | } |
| 6539 | else if (EQ (timeout, Qt)) | ||
| 6540 | { | ||
| 6541 | sec = 0; | ||
| 6542 | usec = 0; | ||
| 6543 | } | ||
| 6538 | else | 6544 | else |
| 6539 | wrong_type_argument (Qnumberp, timeout); | 6545 | wrong_type_argument (Qnumberp, timeout); |
| 6540 | 6546 | ||
| 6541 | if (sec == 0 && usec == 0) | 6547 | if (sec == 0 && usec == 0 && !EQ (timeout, Qt)) |
| 6542 | return Qt; | 6548 | return Qt; |
| 6543 | 6549 | ||
| 6544 | #ifdef SIGIO | 6550 | #ifdef SIGIO |
diff --git a/src/keyboard.c b/src/keyboard.c index 8518bcb98c1..eb46f99d668 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1546,15 +1546,17 @@ command_loop_1 () | |||
| 1546 | 1546 | ||
| 1547 | if (minibuf_level | 1547 | if (minibuf_level |
| 1548 | && !NILP (echo_area_buffer[0]) | 1548 | && !NILP (echo_area_buffer[0]) |
| 1549 | && EQ (minibuf_window, echo_area_window) | 1549 | && EQ (minibuf_window, echo_area_window)) |
| 1550 | && NUMBERP (Vminibuffer_message_timeout)) | ||
| 1551 | { | 1550 | { |
| 1552 | /* Bind inhibit-quit to t so that C-g gets read in | 1551 | /* Bind inhibit-quit to t so that C-g gets read in |
| 1553 | rather than quitting back to the minibuffer. */ | 1552 | rather than quitting back to the minibuffer. */ |
| 1554 | int count = SPECPDL_INDEX (); | 1553 | int count = SPECPDL_INDEX (); |
| 1555 | specbind (Qinhibit_quit, Qt); | 1554 | specbind (Qinhibit_quit, Qt); |
| 1556 | 1555 | ||
| 1557 | sit_for (Vminibuffer_message_timeout, 0, 2); | 1556 | if (NUMBERP (Vminibuffer_message_timeout)) |
| 1557 | sit_for (Vminibuffer_message_timeout, 0, 2); | ||
| 1558 | else | ||
| 1559 | sit_for (Qt, 0, 2); | ||
| 1558 | 1560 | ||
| 1559 | /* Clear the echo area. */ | 1561 | /* Clear the echo area. */ |
| 1560 | message2 (0, 0, 0); | 1562 | message2 (0, 0, 0); |
| @@ -9982,7 +9984,7 @@ give to the command you invoke, if it asks for an argument. */) | |||
| 9982 | if (NILP (echo_area_buffer[0])) | 9984 | if (NILP (echo_area_buffer[0])) |
| 9983 | waited = sit_for (make_number (0), 0, 2); | 9985 | waited = sit_for (make_number (0), 0, 2); |
| 9984 | else if (NUMBERP (Vsuggest_key_bindings)) | 9986 | else if (NUMBERP (Vsuggest_key_bindings)) |
| 9985 | waited = sit_for (Vminibuffer_message_timeout, 0, 2); | 9987 | waited = sit_for (Vsuggest_key_bindings, 0, 2); |
| 9986 | else | 9988 | else |
| 9987 | waited = sit_for (make_number (2), 0, 2); | 9989 | waited = sit_for (make_number (2), 0, 2); |
| 9988 | 9990 | ||
diff --git a/src/minibuf.c b/src/minibuf.c index 19b06acc471..bb9c80b4e7d 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -2714,12 +2714,9 @@ temp_echo_area_glyphs (string) | |||
| 2714 | Vinhibit_quit = Qt; | 2714 | Vinhibit_quit = Qt; |
| 2715 | 2715 | ||
| 2716 | if (NUMBERP (Vminibuffer_message_timeout)) | 2716 | if (NUMBERP (Vminibuffer_message_timeout)) |
| 2717 | { | 2717 | sit_for (Vminibuffer_message_timeout, 0, 2); |
| 2718 | if (Fgtr (Vminibuffer_message_timeout, make_number (0))) | ||
| 2719 | sit_for (Vminibuffer_message_timeout, 0, 2); | ||
| 2720 | } | ||
| 2721 | else | 2718 | else |
| 2722 | sit_for (make_number (-1), 0, 2); | 2719 | sit_for (Qt, 0, 2); |
| 2723 | 2720 | ||
| 2724 | del_range_both (osize, osize_byte, ZV, ZV_BYTE, 1); | 2721 | del_range_both (osize, osize_byte, ZV, ZV_BYTE, 1); |
| 2725 | SET_PT_BOTH (opoint, opoint_byte); | 2722 | SET_PT_BOTH (opoint, opoint_byte); |