diff options
author | Miles Bader <[email protected]> | 2000-11-22 01:34:53 +0000 |
---|---|---|
committer | Miles Bader <[email protected]> | 2000-11-22 01:34:53 +0000 |
commit | 00392ce6723a10c95d18f09deb45876a1c6da488 (patch) | |
tree | c1070b970cd680999964bf58363fc5797a3e3d9b /src | |
parent | e672fdcea2f1dbdb2d01e0fb6fdd97e9795c0475 (diff) |
(Vminibuffer_message_timeout): New variable.
(command_loop_1): Use it to determine message timeout.
(syms_of_keyboard): Initialize it.
Diffstat (limited to 'src')
-rw-r--r-- | src/keyboard.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index a8472f2318..51f2e3b996 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -251,6 +251,10 @@ Lisp_Object Vmenu_bar_final_items; 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 @@ command_loop_1 () 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 @@ suppressed only after special commands that set\n\ 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 |