comparison src/xmenu.c @ 15428:55a2ea0e640c

(Qmenu_alias): New variable. (syms_of_xmenu): Initialize it. (menu_item_equiv_key): Check this property on the definition.
author Richard M. Stallman <rms@gnu.org>
date Thu, 13 Jun 1996 21:04:29 +0000
parents a9ed91ec0700
children f74c79dcaf8d
comparison
equal deleted inserted replaced
15427:97557b39e3b7 15428:55a2ea0e640c
85 #define TRUE 1 85 #define TRUE 1
86 #define FALSE 0 86 #define FALSE 0
87 #endif /* no TRUE */ 87 #endif /* no TRUE */
88 88
89 Lisp_Object Qdebug_on_next_call; 89 Lisp_Object Qdebug_on_next_call;
90
91 Lisp_Object Qmenu_alias;
90 92
91 extern Lisp_Object Qmenu_enable; 93 extern Lisp_Object Qmenu_enable;
92 extern Lisp_Object Qmenu_bar; 94 extern Lisp_Object Qmenu_bar;
93 extern Lisp_Object Qmouse_click, Qevent_kind; 95 extern Lisp_Object Qmouse_click, Qevent_kind;
94 96
394 changed = 1; 396 changed = 1;
395 descrip = Qnil; 397 descrip = Qnil;
396 /* If the command is an alias for another 398 /* If the command is an alias for another
397 (such as easymenu.el and lmenu.el set it up), 399 (such as easymenu.el and lmenu.el set it up),
398 see if the original command name has equivalent keys. */ 400 see if the original command name has equivalent keys. */
399 if (SYMBOLP (def) && SYMBOLP (XSYMBOL (def)->function)) 401 if (SYMBOLP (def) && SYMBOLP (XSYMBOL (def)->function)
402 && ! NILP (Fget (def, Qmenu_alias)))
400 savedkey = Fwhere_is_internal (XSYMBOL (def)->function, 403 savedkey = Fwhere_is_internal (XSYMBOL (def)->function,
401 Qnil, Qt, Qnil); 404 Qnil, Qt, Qnil);
402 else 405 else
403 /* Otherwise look up the specified command itself. 406 /* Otherwise look up the specified command itself.
404 We don't try both, because that makes easymenu menus slow. */ 407 We don't try both, because that makes easymenu menus slow. */
2647 syms_of_xmenu () 2650 syms_of_xmenu ()
2648 { 2651 {
2649 staticpro (&menu_items); 2652 staticpro (&menu_items);
2650 menu_items = Qnil; 2653 menu_items = Qnil;
2651 2654
2655 Qmenu_alias = intern ("menu-alias");
2656 staticpro (&Qmenu_alias);
2657
2652 Qdebug_on_next_call = intern ("debug-on-next-call"); 2658 Qdebug_on_next_call = intern ("debug-on-next-call");
2653 staticpro (&Qdebug_on_next_call); 2659 staticpro (&Qdebug_on_next_call);
2654 2660
2655 #ifdef USE_X_TOOLKIT 2661 #ifdef USE_X_TOOLKIT
2656 widget_id_tick = (1<<16); 2662 widget_id_tick = (1<<16);