summaryrefslogtreecommitdiff
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2006-07-10 18:51:31 +0000
committerChong Yidong <cyd@stupidchicken.com>2006-07-10 18:51:31 +0000
commit7ba07a1a03765521da615a59ce7ee2c596f8341d (patch)
tree16249c92bdcf0244e59e778644737131d3cbba9e /src/keyboard.c
parent2946191dee63d8cbc6c025bb0c658c77241df76a (diff)
downloademacs-7ba07a1a03765521da615a59ce7ee2c596f8341d.tar.gz
* puresize.h (BASE_PURESIZE): Increment to 1211000.
* dispnew.c (Fredisplay): New function, equivalent to (sit-for 0). (Fsit_for): Function deleted. * keyboard.c (command_loop_1, Fexecute_extended_command): Call sit_for instead of Fsit_for. * minibuf.c (temp_echo_area_glyphs): Likewise.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c46
1 files changed, 31 insertions, 15 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 07388428451..b955daa41d9 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1488,9 +1488,11 @@ command_loop_1 ()
/* Bind inhibit-quit to t so that C-g gets read in
rather than quitting back to the minibuffer. */
int count = SPECPDL_INDEX ();
+ double duration = extract_float (Vminibuffer_message_timeout);
specbind (Qinhibit_quit, Qt);
- Fsit_for (Vminibuffer_message_timeout, Qnil, Qnil);
+ sit_for ((int) duration, (duration - (int) duration) * 1000000,
+ 0, Qt, Qt);
/* Clear the echo area. */
message2 (0, 0, 0);
safe_run_hooks (Qecho_area_clear_hook);
@@ -9880,19 +9882,26 @@ give to the command you invoke, if it asks for an argument. */)
Qmouse_movement)))
{
/* But first wait, and skip the message if there is input. */
- int delay_time;
+ Lisp_Object waited;
+
if (!NILP (echo_area_buffer[0]))
- /* This command displayed something in the echo area;
- so wait a few seconds, then display our suggestion message. */
- delay_time = (NUMBERP (Vsuggest_key_bindings)
- ? XINT (Vsuggest_key_bindings) : 2);
+ {
+ /* This command displayed something in the echo area;
+ so wait a few seconds, then display our suggestion message. */
+ if (NUMBERP (Vsuggest_key_bindings))
+ {
+ double duration = extract_float (Vminibuffer_message_timeout);
+ waited = sit_for ((int) duration,
+ (duration - (int) duration) * 1000000,
+ 0, Qt, Qt);
+ }
+ else
+ waited = sit_for (2, 0, 0, Qt, Qt);
+ }
else
- /* This command left the echo area empty,
- so display our message immediately. */
- delay_time = 0;
+ waited = sit_for (0, 0, 0, Qt, Qt);
- if (!NILP (Fsit_for (make_number (delay_time), Qnil, Qnil))
- && ! CONSP (Vunread_command_events))
+ if (!NILP (waited) && ! CONSP (Vunread_command_events))
{
Lisp_Object binding;
char *newmessage;
@@ -9912,10 +9921,17 @@ give to the command you invoke, if it asks for an argument. */)
message2_nolog (newmessage,
strlen (newmessage),
STRING_MULTIBYTE (binding));
- if (!NILP (Fsit_for ((NUMBERP (Vsuggest_key_bindings)
- ? Vsuggest_key_bindings : make_number (2)),
- Qnil, Qnil))
- && message_p)
+ if (NUMBERP (Vsuggest_key_bindings))
+ {
+ double duration = extract_float (Vsuggest_key_bindings);
+ waited = sit_for ((int) duration,
+ (duration - (int) duration) * 1000000,
+ 0, Qt, Qt);
+ }
+ else
+ waited = sit_for (2, 0, 0, Qt, Qt);
+
+ if (!NILP (waited) && message_p)
restore_message ();
unbind_to (count, Qnil);