aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2006-11-05 12:18:47 +0000
committerEli Zaretskii2006-11-05 12:18:47 +0000
commit508fb067d7fe7ee20be0dd7ca3232a3017e383f9 (patch)
tree86d3b77b5a6572528abad8151135da5ded0420d2 /src
parent5221ea0b4cc0ab4f026fa4eb230e3976ac2ab9d4 (diff)
downloademacs-508fb067d7fe7ee20be0dd7ca3232a3017e383f9.tar.gz
emacs-508fb067d7fe7ee20be0dd7ca3232a3017e383f9.zip
(Fmenu_or_popup_active_p): New function.
(syms_of_xmenu): Defsubr it.
Diffstat (limited to 'src')
-rw-r--r--src/xmenu.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 7c397fbd6e1..4882f8d0d6f 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1493,6 +1493,15 @@ popup_activated ()
1493 return popup_activated_flag; 1493 return popup_activated_flag;
1494} 1494}
1495 1495
1496/* The following is used by delayed window autoselection. */
1497
1498DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0,
1499 doc: /* Return t if a menu or popup dialog is active. */)
1500 ()
1501{
1502 return (popup_activated ()) ? Qt : Qnil;
1503}
1504
1496/* This callback is invoked when the user selects a menubar cascade 1505/* This callback is invoked when the user selects a menubar cascade
1497 pushbutton, but before the pulldown menu is posted. */ 1506 pushbutton, but before the pulldown menu is posted. */
1498 1507
@@ -3775,6 +3784,7 @@ syms_of_xmenu ()
3775#endif 3784#endif
3776 3785
3777 defsubr (&Sx_popup_menu); 3786 defsubr (&Sx_popup_menu);
3787 defsubr (&Smenu_or_popup_active_p);
3778 3788
3779#if defined (USE_GTK) || defined (USE_X_TOOLKIT) 3789#if defined (USE_GTK) || defined (USE_X_TOOLKIT)
3780 defsubr (&Smenu_bar_open); 3790 defsubr (&Smenu_bar_open);