Mercurial > emacs
comparison src/keyboard.c @ 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 | 25c755416160 |
children | 346f9b4afa15 2d56e13fd23d 8dd8c8286063 |
comparison
equal
deleted
inserted
replaced
73317:a8f3a59e04e0 | 73318:e876a1f62fec |
---|---|
1544 /* If minibuffer on and echo area in use, | 1544 /* If minibuffer on and echo area in use, |
1545 wait a short time and redraw minibuffer. */ | 1545 wait a short time and redraw minibuffer. */ |
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); |
1561 safe_run_hooks (Qecho_area_clear_hook); | 1563 safe_run_hooks (Qecho_area_clear_hook); |
1562 | 1564 |
9980 /* If this command displayed something in the echo area; | 9982 /* If this command displayed something in the echo area; |
9981 wait a few seconds, then display our suggestion message. */ | 9983 wait a few seconds, then display our suggestion message. */ |
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 |
9989 if (!NILP (waited) && ! CONSP (Vunread_command_events)) | 9991 if (!NILP (waited) && ! CONSP (Vunread_command_events)) |
9990 { | 9992 { |