diff options
| author | Richard M. Stallman | 1994-10-08 04:30:15 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-10-08 04:30:15 +0000 |
| commit | 03361bcc452a9e6861cc748229844debcc073cba (patch) | |
| tree | d5b13f2b8c830bc99dd4770fb351cf13e5c2a9f7 /src | |
| parent | 525b8232781d8fa5a6ef9854b5709b9f01343bf4 (diff) | |
| download | emacs-03361bcc452a9e6861cc748229844debcc073cba.tar.gz emacs-03361bcc452a9e6861cc748229844debcc073cba.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index bbd823b2ede..7ddb01741aa 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -130,6 +130,9 @@ int waiting_for_input; | |||
| 130 | /* True while displaying for echoing. Delays C-g throwing. */ | 130 | /* True while displaying for echoing. Delays C-g throwing. */ |
| 131 | static int echoing; | 131 | static int echoing; |
| 132 | 132 | ||
| 133 | /* Nonzero means disregard local maps for the menu bar. */ | ||
| 134 | static int inhibit_local_menu_bar_menus; | ||
| 135 | |||
| 133 | /* Nonzero means C-g should cause immediate error-signal. */ | 136 | /* Nonzero means C-g should cause immediate error-signal. */ |
| 134 | int immediate_quit; | 137 | int immediate_quit; |
| 135 | 138 | ||
| @@ -4036,6 +4039,13 @@ read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu) | |||
| 4036 | if (! menu_prompting) | 4039 | if (! menu_prompting) |
| 4037 | return Qnil; | 4040 | return Qnil; |
| 4038 | 4041 | ||
| 4042 | /* Optionally disregard all but the global map. */ | ||
| 4043 | if (inhibit_local_menu_bar_menus) | ||
| 4044 | { | ||
| 4045 | maps += (nmaps - 1); | ||
| 4046 | nmaps = 1; | ||
| 4047 | } | ||
| 4048 | |||
| 4039 | /* Get the menu name from the first map that has one (a prompt string). */ | 4049 | /* Get the menu name from the first map that has one (a prompt string). */ |
| 4040 | for (mapno = 0; mapno < nmaps; mapno++) | 4050 | for (mapno = 0; mapno < nmaps; mapno++) |
| 4041 | { | 4051 | { |
| @@ -6133,6 +6143,10 @@ t means double-clicks have no time limit and are detected\n\ | |||
| 6133 | by position only."); | 6143 | by position only."); |
| 6134 | Vdouble_click_time = make_number (500); | 6144 | Vdouble_click_time = make_number (500); |
| 6135 | 6145 | ||
| 6146 | DEFVAR_BOOL ("inhibit-local-menu-bar-menus", &inhibit_local_menu_bar_menus, | ||
| 6147 | "*Non-nil means inhibit local map menu bar menus."); | ||
| 6148 | inhibit_local_menu_bar_menus = 0; | ||
| 6149 | |||
| 6136 | DEFVAR_INT ("num-input-keys", &num_input_keys, | 6150 | DEFVAR_INT ("num-input-keys", &num_input_keys, |
| 6137 | "*Number of complete keys read from the keyboard so far."); | 6151 | "*Number of complete keys read from the keyboard so far."); |
| 6138 | num_input_keys = 0; | 6152 | num_input_keys = 0; |