Mercurial > emacs
comparison src/keyboard.c @ 16834:ec390b34ddc0
(command_loop_1, read_char):
Run Qecho_area_clear_hook when clearing echo area.
(Qecho_area_clear_hook): New variable.
(syms_of_keyboard): Initialize it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 05 Jan 1997 23:05:46 +0000 |
parents | 06001fb1a820 |
children | 205ec6c5d8f3 |
comparison
equal
deleted
inserted
replaced
16833:052a9f2e21e5 | 16834:ec390b34ddc0 |
---|---|
337 /* Menu bar specified in Lucid Emacs fashion. */ | 337 /* Menu bar specified in Lucid Emacs fashion. */ |
338 | 338 |
339 Lisp_Object Vlucid_menu_bar_dirty_flag; | 339 Lisp_Object Vlucid_menu_bar_dirty_flag; |
340 Lisp_Object Qrecompute_lucid_menubar, Qactivate_menubar_hook; | 340 Lisp_Object Qrecompute_lucid_menubar, Qactivate_menubar_hook; |
341 | 341 |
342 Lisp_Object Qecho_area_clear_hook; | |
343 | |
342 /* Hooks to run before and after each command. */ | 344 /* Hooks to run before and after each command. */ |
343 Lisp_Object Qpre_command_hook, Vpre_command_hook; | 345 Lisp_Object Qpre_command_hook, Vpre_command_hook; |
344 Lisp_Object Qpost_command_hook, Vpost_command_hook; | 346 Lisp_Object Qpost_command_hook, Vpost_command_hook; |
345 Lisp_Object Qcommand_hook_internal, Vcommand_hook_internal; | 347 Lisp_Object Qcommand_hook_internal, Vcommand_hook_internal; |
346 /* Hook run after a command if there's no more input soon. */ | 348 /* Hook run after a command if there's no more input soon. */ |
1139 specbind (Qinhibit_quit, Qt); | 1141 specbind (Qinhibit_quit, Qt); |
1140 | 1142 |
1141 Fsit_for (make_number (2), Qnil, Qnil); | 1143 Fsit_for (make_number (2), Qnil, Qnil); |
1142 /* Clear the echo area. */ | 1144 /* Clear the echo area. */ |
1143 message2 (0); | 1145 message2 (0); |
1146 safe_run_hooks (Qecho_area_clear_hook); | |
1144 | 1147 |
1145 unbind_to (count, Qnil); | 1148 unbind_to (count, Qnil); |
1146 | 1149 |
1147 /* If a C-g came in before, treat it as input now. */ | 1150 /* If a C-g came in before, treat it as input now. */ |
1148 if (!NILP (Vquit_flag)) | 1151 if (!NILP (Vquit_flag)) |
2107 | 2110 |
2108 goto retry; | 2111 goto retry; |
2109 } | 2112 } |
2110 | 2113 |
2111 /* Wipe the echo area. */ | 2114 /* Wipe the echo area. */ |
2115 if (echo_area_glyphs) | |
2116 safe_run_hooks (Qecho_area_clear_hook); | |
2112 echo_area_glyphs = 0; | 2117 echo_area_glyphs = 0; |
2113 | 2118 |
2114 /* Handle things that only apply to characters. */ | 2119 /* Handle things that only apply to characters. */ |
2115 if (INTEGERP (c)) | 2120 if (INTEGERP (c)) |
2116 { | 2121 { |
8197 DEFVAR_INT ("post-command-idle-delay", &post_command_idle_delay, | 8202 DEFVAR_INT ("post-command-idle-delay", &post_command_idle_delay, |
8198 "Delay time before running `post-command-idle-hook'.\n\ | 8203 "Delay time before running `post-command-idle-hook'.\n\ |
8199 This is measured in microseconds."); | 8204 This is measured in microseconds."); |
8200 post_command_idle_delay = 100000; | 8205 post_command_idle_delay = 100000; |
8201 | 8206 |
8207 #if 0 | |
8208 DEFVAR_LISP ("echo-area-clear-hook", ..., | |
8209 "Normal hook run when clearing the echo area."); | |
8210 #endif | |
8211 Qecho_area_clear_hook = intern ("echo-area-clear-hook"); | |
8212 XSYMBOL (Qecho_area_clear_hook)->value = Qnil; | |
8213 | |
8202 DEFVAR_LISP ("lucid-menu-bar-dirty-flag", &Vlucid_menu_bar_dirty_flag, | 8214 DEFVAR_LISP ("lucid-menu-bar-dirty-flag", &Vlucid_menu_bar_dirty_flag, |
8203 "t means menu bar, specified Lucid style, needs to be recomputed."); | 8215 "t means menu bar, specified Lucid style, needs to be recomputed."); |
8204 Vlucid_menu_bar_dirty_flag = Qnil; | 8216 Vlucid_menu_bar_dirty_flag = Qnil; |
8205 | 8217 |
8206 DEFVAR_LISP ("menu-bar-final-items", &Vmenu_bar_final_items, | 8218 DEFVAR_LISP ("menu-bar-final-items", &Vmenu_bar_final_items, |