[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/keyboard.c,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/src/keyboard.c,v |
Date: |
Mon, 10 Jul 2006 18:51:33 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 06/07/10 18:51:32
Index: keyboard.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/keyboard.c,v
retrieving revision 1.855
retrieving revision 1.856
diff -u -b -r1.855 -r1.856
--- keyboard.c 7 Jul 2006 15:48:57 -0000 1.855
+++ keyboard.c 10 Jul 2006 18:51:31 -0000 1.856
@@ -1488,9 +1488,11 @@
/* 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 @@
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);
+ 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 @@
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);
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, Eli Zaretskii, 2006/07/07
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v,
Chong Yidong <=
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, Kim F. Storm, 2006/07/11
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, Kim F. Storm, 2006/07/12
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, Richard M. Stallman, 2006/07/17
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, Kim F. Storm, 2006/07/18
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, Chong Yidong, 2006/07/26
- [Emacs-diffs] Changes to emacs/src/keyboard.c,v, Richard M. Stallman, 2006/07/28