changeset 9396:c5d9742c47b3

(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.
author Richard M. Stallman <rms@gnu.org>
date Sat, 08 Oct 1994 04:30:15 +0000
parents d954daf0a213
children eba13d81ba0b
files src/keyboard.c
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;