# HG changeset patch # User Richard M. Stallman # Date 781590615 0 # Node ID c5d9742c47b309546a127ca8e830a7e29829e705 # Parent d954daf0a21307170e90581d84b2c3618464c757 (inhibit_local_menu_bar_menus): New variable. (read_char_x_menu_prompt): Optionally don't use local maps. (syms_of_keyboard): Set up Lisp variable. diff -r d954daf0a213 -r c5d9742c47b3 src/keyboard.c --- a/src/keyboard.c Sat Oct 08 04:16:17 1994 +0000 +++ b/src/keyboard.c Sat Oct 08 04:30:15 1994 +0000 @@ -130,6 +130,9 @@ /* True while displaying for echoing. Delays C-g throwing. */ static int echoing; +/* Nonzero means disregard local maps for the menu bar. */ +static int inhibit_local_menu_bar_menus; + /* Nonzero means C-g should cause immediate error-signal. */ int immediate_quit; @@ -4036,6 +4039,13 @@ if (! menu_prompting) return Qnil; + /* Optionally disregard all but the global map. */ + if (inhibit_local_menu_bar_menus) + { + maps += (nmaps - 1); + nmaps = 1; + } + /* Get the menu name from the first map that has one (a prompt string). */ for (mapno = 0; mapno < nmaps; mapno++) { @@ -6133,6 +6143,10 @@ by position only."); Vdouble_click_time = make_number (500); + DEFVAR_BOOL ("inhibit-local-menu-bar-menus", &inhibit_local_menu_bar_menus, + "*Non-nil means inhibit local map menu bar menus."); + inhibit_local_menu_bar_menus = 0; + DEFVAR_INT ("num-input-keys", &num_input_keys, "*Number of complete keys read from the keyboard so far."); num_input_keys = 0;