comparison src/keyboard.c @ 71761:1055c0769159

* 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.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 10 Jul 2006 18:51:31 +0000
parents 3cd05625d982
children c4b76264d4ec
comparison
equal deleted inserted replaced
71760:68765d892dce 71761:1055c0769159
1486 && NUMBERP (Vminibuffer_message_timeout)) 1486 && NUMBERP (Vminibuffer_message_timeout))
1487 { 1487 {
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);
1497 1499
1498 unbind_to (count, Qnil); 1500 unbind_to (count, Qnil);
9878 if (!NILP (bindings) 9880 if (!NILP (bindings)
9879 && ! (VECTORP (bindings) && EQ (Faref (bindings, make_number (0)), 9881 && ! (VECTORP (bindings) && EQ (Faref (bindings, make_number (0)),
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. */ 9903
9892 delay_time = 0; 9904 if (!NILP (waited) && ! CONSP (Vunread_command_events))
9893
9894 if (!NILP (Fsit_for (make_number (delay_time), Qnil, Qnil))
9895 && ! CONSP (Vunread_command_events))
9896 { 9905 {
9897 Lisp_Object binding; 9906 Lisp_Object binding;
9898 char *newmessage; 9907 char *newmessage;
9899 int message_p = push_message (); 9908 int message_p = push_message ();
9900 int count = SPECPDL_INDEX (); 9909 int count = SPECPDL_INDEX ();
9910 SDATA (SYMBOL_NAME (function)), 9919 SDATA (SYMBOL_NAME (function)),
9911 SDATA (binding)); 9920 SDATA (binding));
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);
9922 } 9938 }
9923 } 9939 }