# HG changeset patch # User Eli Zaretskii # Date 1162729127 0 # Node ID 54a6e7ed953c74b7d5ce8205c68dd30c54be0320 # Parent b55c133a59f97e032486c204e8799dcfdfbb5d19 (Fmenu_or_popup_active_p): New function. (syms_of_xmenu): Defsubr it. diff -r b55c133a59f9 -r 54a6e7ed953c src/xmenu.c --- a/src/xmenu.c Sun Nov 05 12:18:21 2006 +0000 +++ b/src/xmenu.c Sun Nov 05 12:18:47 2006 +0000 @@ -1493,6 +1493,15 @@ return popup_activated_flag; } +/* The following is used by delayed window autoselection. */ + +DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0, + doc: /* Return t if a menu or popup dialog is active. */) + () +{ + return (popup_activated ()) ? Qt : Qnil; +} + /* This callback is invoked when the user selects a menubar cascade pushbutton, but before the pulldown menu is posted. */ @@ -3775,6 +3784,7 @@ #endif defsubr (&Sx_popup_menu); + defsubr (&Smenu_or_popup_active_p); #if defined (USE_GTK) || defined (USE_X_TOOLKIT) defsubr (&Smenu_bar_open);