aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2000-11-22 01:34:53 +0000
committerMiles Bader2000-11-22 01:34:53 +0000
commit00392ce6723a10c95d18f09deb45876a1c6da488 (patch)
treec1070b970cd680999964bf58363fc5797a3e3d9b /src
parente672fdcea2f1dbdb2d01e0fb6fdd97e9795c0475 (diff)
downloademacs-00392ce6723a10c95d18f09deb45876a1c6da488.tar.gz
emacs-00392ce6723a10c95d18f09deb45876a1c6da488.zip
(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.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index a8472f2318b..51f2e3b9968 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -251,6 +251,10 @@ Lisp_Object Vmenu_bar_final_items;
251 If the value is non-nil and not a number, we wait 2 seconds. */ 251 If the value is non-nil and not a number, we wait 2 seconds. */
252Lisp_Object Vsuggest_key_bindings; 252Lisp_Object Vsuggest_key_bindings;
253 253
254/* How long to display an echo-area message when the minibuffer is active.
255 If the value is not a number, such messages don't time out. */
256Lisp_Object Vminibuffer_message_timeout;
257
254/* Character that causes a quit. Normally C-g. 258/* Character that causes a quit. Normally C-g.
255 259
256 If we are running on an ordinary terminal, this must be an ordinary 260 If we are running on an ordinary terminal, this must be an ordinary
@@ -1333,18 +1337,19 @@ command_loop_1 ()
1333 Vdeactivate_mark = Qnil; 1337 Vdeactivate_mark = Qnil;
1334 1338
1335 /* If minibuffer on and echo area in use, 1339 /* If minibuffer on and echo area in use,
1336 wait 2 sec and redraw minibuffer. */ 1340 wait a short time and redraw minibuffer. */
1337 1341
1338 if (minibuf_level 1342 if (minibuf_level
1339 && !NILP (echo_area_buffer[0]) 1343 && !NILP (echo_area_buffer[0])
1340 && EQ (minibuf_window, echo_area_window)) 1344 && EQ (minibuf_window, echo_area_window)
1345 && NUMBERP (Vminibuffer_message_timeout))
1341 { 1346 {
1342 /* Bind inhibit-quit to t so that C-g gets read in 1347 /* Bind inhibit-quit to t so that C-g gets read in
1343 rather than quitting back to the minibuffer. */ 1348 rather than quitting back to the minibuffer. */
1344 int count = specpdl_ptr - specpdl; 1349 int count = specpdl_ptr - specpdl;
1345 specbind (Qinhibit_quit, Qt); 1350 specbind (Qinhibit_quit, Qt);
1346 1351
1347 Fsit_for (make_number (2), Qnil, Qnil); 1352 Fsit_for (Vminibuffer_message_timeout, Qnil, Qnil);
1348 /* Clear the echo area. */ 1353 /* Clear the echo area. */
1349 message2 (0, 0, 0); 1354 message2 (0, 0, 0);
1350 safe_run_hooks (Qecho_area_clear_hook); 1355 safe_run_hooks (Qecho_area_clear_hook);
@@ -10591,6 +10596,11 @@ suppressed only after special commands that set\n\
10591A value of nil means menu bindings should not be updated.\n\ 10596A value of nil means menu bindings should not be updated.\n\
10592Used during Emacs' startup."); 10597Used during Emacs' startup.");
10593 update_menu_bindings = 1; 10598 update_menu_bindings = 1;
10599
10600 DEFVAR_LISP ("minibuffer-message-timeout", &Vminibuffer_message_timeout,
10601 "*How long to display an echo-area message when the minibuffer is active.\n\
10602If the value is not a number, such messages don't time out.");
10603 Vminibuffer_message_timeout = make_number (2);
10594} 10604}
10595 10605
10596void 10606void