aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2003-03-16 00:06:59 +0000
committerStefan Monnier2003-03-16 00:06:59 +0000
commitd378869e0452cfd525b9a6dd4568002236492ca2 (patch)
tree6080e04fde7f6f6a7326d4f66f6730f396ba5584 /src
parentf202a7a25fe924cab046b040052320ebbd016c40 (diff)
downloademacs-d378869e0452cfd525b9a6dd4568002236492ca2.tar.gz
emacs-d378869e0452cfd525b9a6dd4568002236492ca2.zip
(Vmenu_events): New var.
(syms_of_keymap): Initialize it. (where_is_internal): Check more carefully what is a menu event.
Diffstat (limited to 'src')
-rw-r--r--src/keymap.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/keymap.c b/src/keymap.c
index 7362bc81457..4215ec5bd77 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -2240,6 +2240,8 @@ shadow_lookup (shadow, key, flag)
2240 return Qnil; 2240 return Qnil;
2241} 2241}
2242 2242
2243static Lisp_Object Vmenu_events;
2244
2243/* This function can GC if Flookup_key autoloads any keymaps. */ 2245/* This function can GC if Flookup_key autoloads any keymaps. */
2244 2246
2245static Lisp_Object 2247static Lisp_Object
@@ -2278,7 +2280,7 @@ where_is_internal (definition, keymaps, firstonly, noindirect, no_remap)
2278 for (; !NILP (maps); maps = Fcdr (maps)) 2280 for (; !NILP (maps); maps = Fcdr (maps))
2279 { 2281 {
2280 /* Key sequence to reach map, and the map that it reaches */ 2282 /* Key sequence to reach map, and the map that it reaches */
2281 register Lisp_Object this, map; 2283 register Lisp_Object this, map, tem;
2282 2284
2283 /* In order to fold [META-PREFIX-CHAR CHAR] sequences into 2285 /* In order to fold [META-PREFIX-CHAR CHAR] sequences into
2284 [M-CHAR] sequences, check if last character of the sequence 2286 [M-CHAR] sequences, check if last character of the sequence
@@ -2294,7 +2296,8 @@ where_is_internal (definition, keymaps, firstonly, noindirect, no_remap)
2294 2296
2295 /* if (nomenus && !ascii_sequence_p (this)) */ 2297 /* if (nomenus && !ascii_sequence_p (this)) */
2296 if (nomenus && XINT (last) >= 0 2298 if (nomenus && XINT (last) >= 0
2297 && !INTEGERP (Faref (this, make_number (0)))) 2299 && SYMBOLP (tem = Faref (this, make_number (0)))
2300 && !NILP (Fmemq (XCAR (parse_modifiers (tem)), Vmenu_events)))
2298 /* If no menu entries should be returned, skip over the 2301 /* If no menu entries should be returned, skip over the
2299 keymaps bound to `menu-bar' and `tool-bar' and other 2302 keymaps bound to `menu-bar' and `tool-bar' and other
2300 non-ascii prefixes like `C-down-mouse-2'. */ 2303 non-ascii prefixes like `C-down-mouse-2'. */
@@ -3496,7 +3499,6 @@ Return list of symbols found. */)
3496 Lisp_Object regexp, predicate; 3499 Lisp_Object regexp, predicate;
3497{ 3500{
3498 Lisp_Object tem; 3501 Lisp_Object tem;
3499 struct gcpro gcpro1, gcpro2;
3500 CHECK_STRING (regexp); 3502 CHECK_STRING (regexp);
3501 apropos_predicate = predicate; 3503 apropos_predicate = predicate;
3502 apropos_accumulate = Qnil; 3504 apropos_accumulate = Qnil;
@@ -3627,6 +3629,15 @@ This keymap works like `function-key-map', but comes after that,
3627and applies even for keys that have ordinary bindings. */); 3629and applies even for keys that have ordinary bindings. */);
3628 Vkey_translation_map = Qnil; 3630 Vkey_translation_map = Qnil;
3629 3631
3632 staticpro (&Vmenu_events);
3633 Vmenu_events = Fcons (intern ("menu-bar"),
3634 Fcons (intern ("tool-bar"),
3635 Fcons (intern ("mouse-1"),
3636 Fcons (intern ("mouse-2"),
3637 Fcons (intern ("mouse-3"),
3638 Qnil)))));
3639
3640
3630 Qsingle_key_description = intern ("single-key-description"); 3641 Qsingle_key_description = intern ("single-key-description");
3631 staticpro (&Qsingle_key_description); 3642 staticpro (&Qsingle_key_description);
3632 3643