aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorChong Yidong2006-07-10 18:51:31 +0000
committerChong Yidong2006-07-10 18:51:31 +0000
commit7ba07a1a03765521da615a59ce7ee2c596f8341d (patch)
tree16249c92bdcf0244e59e778644737131d3cbba9e /src/keyboard.c
parent2946191dee63d8cbc6c025bb0c658c77241df76a (diff)
downloademacs-7ba07a1a03765521da615a59ce7ee2c596f8341d.tar.gz
emacs-7ba07a1a03765521da615a59ce7ee2c596f8341d.zip
* 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 ()
1488 /* Bind inhibit-quit to t so that C-g gets read in 1488 /* Bind inhibit-quit to t so that C-g gets read in
1489 rather than quitting back to the minibuffer. */ 1489 rather than quitting back to the minibuffer. */
1490 int count = SPECPDL_INDEX (); 1490 int count = SPECPDL_INDEX ();
1491 double duration = extract_float (Vminibuffer_message_timeout);
1491 specbind (Qinhibit_quit, Qt); 1492 specbind (Qinhibit_quit, Qt);
1492 1493
1493 Fsit_for (Vminibuffer_message_timeout, Qnil, Qnil); 1494 sit_for ((int) duration, (duration - (int) duration) * 1000000,
1495 0, Qt, Qt);
1494 /* Clear the echo area. */ 1496 /* Clear the echo area. */
1495 message2 (0, 0, 0); 1497 message2 (0, 0, 0);
1496 safe_run_hooks (Qecho_area_clear_hook); 1498 safe_run_hooks (Qecho_area_clear_hook);
@@ -9880,19 +9882,26 @@ give to the command you invoke, if it asks for an argument. */)
9880 Qmouse_movement))) 9882 Qmouse_movement)))
9881 { 9883 {
9882 /* But first wait, and skip the message if there is input. */ 9884 /* But first wait, and skip the message if there is input. */
9883 int delay_time; 9885 Lisp_Object waited;
9886
9884 if (!NILP (echo_area_buffer[0])) 9887 if (!NILP (echo_area_buffer[0]))
9885 /* This command displayed something in the echo area; 9888 {
9886 so wait a few seconds, then display our suggestion message. */ 9889 /* This command displayed something in the echo area;
9887 delay_time = (NUMBERP (Vsuggest_key_bindings) 9890 so wait a few seconds, then display our suggestion message. */
9888 ? XINT (Vsuggest_key_bindings) : 2); 9891 if (NUMBERP (Vsuggest_key_bindings))
9892 {
9893 double duration = extract_float (Vminibuffer_message_timeout);
9894 waited = sit_for ((int) duration,
9895 (duration - (int) duration) * 1000000,
9896 0, Qt, Qt);
9897 }
9898 else
9899 waited = sit_for (2, 0, 0, Qt, Qt);
9900 }
9889 else 9901 else
9890 /* This command left the echo area empty, 9902 waited = sit_for (0, 0, 0, Qt, Qt);
9891 so display our message immediately. */
9892 delay_time = 0;
9893 9903
9894 if (!NILP (Fsit_for (make_number (delay_time), Qnil, Qnil)) 9904 if (!NILP (waited) && ! CONSP (Vunread_command_events))
9895 && ! CONSP (Vunread_command_events))
9896 { 9905 {
9897 Lisp_Object binding; 9906 Lisp_Object binding;
9898 char *newmessage; 9907 char *newmessage;
@@ -9912,10 +9921,17 @@ give to the command you invoke, if it asks for an argument. */)
9912 message2_nolog (newmessage, 9921 message2_nolog (newmessage,
9913 strlen (newmessage), 9922 strlen (newmessage),
9914 STRING_MULTIBYTE (binding)); 9923 STRING_MULTIBYTE (binding));
9915 if (!NILP (Fsit_for ((NUMBERP (Vsuggest_key_bindings) 9924 if (NUMBERP (Vsuggest_key_bindings))
9916 ? Vsuggest_key_bindings : make_number (2)), 9925 {
9917 Qnil, Qnil)) 9926 double duration = extract_float (Vsuggest_key_bindings);
9918 && message_p) 9927 waited = sit_for ((int) duration,
9928 (duration - (int) duration) * 1000000,
9929 0, Qt, Qt);
9930 }
9931 else
9932 waited = sit_for (2, 0, 0, Qt, Qt);
9933
9934 if (!NILP (waited) && message_p)
9919 restore_message (); 9935 restore_message ();
9920 9936
9921 unbind_to (count, Qnil); 9937 unbind_to (count, Qnil);