# HG changeset patch # User Miles Bader # Date 974856893 0 # Node ID b04964da2e33b4fd255d825f3eb03aadf30e1c53 # Parent 374860c6624185ec8537a56d7a47421bdce7b386 (Vminibuffer_message_timeout): New variable. (command_loop_1): Use it to determine message timeout. (syms_of_keyboard): Initialize it. diff -r 374860c66241 -r b04964da2e33 src/keyboard.c --- a/src/keyboard.c Wed Nov 22 01:20:31 2000 +0000 +++ b/src/keyboard.c Wed Nov 22 01:34:53 2000 +0000 @@ -251,6 +251,10 @@ If the value is non-nil and not a number, we wait 2 seconds. */ Lisp_Object Vsuggest_key_bindings; +/* How long to display an echo-area message when the minibuffer is active. + If the value is not a number, such messages don't time out. */ +Lisp_Object Vminibuffer_message_timeout; + /* Character that causes a quit. Normally C-g. If we are running on an ordinary terminal, this must be an ordinary @@ -1333,18 +1337,19 @@ Vdeactivate_mark = Qnil; /* If minibuffer on and echo area in use, - wait 2 sec and redraw minibuffer. */ + wait a short time and redraw minibuffer. */ if (minibuf_level && !NILP (echo_area_buffer[0]) - && EQ (minibuf_window, echo_area_window)) + && EQ (minibuf_window, echo_area_window) + && NUMBERP (Vminibuffer_message_timeout)) { /* Bind inhibit-quit to t so that C-g gets read in rather than quitting back to the minibuffer. */ int count = specpdl_ptr - specpdl; specbind (Qinhibit_quit, Qt); - Fsit_for (make_number (2), Qnil, Qnil); + Fsit_for (Vminibuffer_message_timeout, Qnil, Qnil); /* Clear the echo area. */ message2 (0, 0, 0); safe_run_hooks (Qecho_area_clear_hook); @@ -10591,6 +10596,11 @@ A value of nil means menu bindings should not be updated.\n\ Used during Emacs' startup."); update_menu_bindings = 1; + + DEFVAR_LISP ("minibuffer-message-timeout", &Vminibuffer_message_timeout, + "*How long to display an echo-area message when the minibuffer is active.\n\ +If the value is not a number, such messages don't time out."); + Vminibuffer_message_timeout = make_number (2); } void