diff src/xmenu.c @ 73697:54a6e7ed953c

(Fmenu_or_popup_active_p): New function. (syms_of_xmenu): Defsubr it.
author Eli Zaretskii <eliz@gnu.org>
date Sun, 05 Nov 2006 12:18:47 +0000
parents ea2e12adb144
children fbb020e31484
line wrap: on
line diff
--- 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);