]> code.delx.au - gnu-emacs/commitdiff
(Fmenu_or_popup_active_p): New function.
authorEli Zaretskii <eliz@gnu.org>
Sun, 5 Nov 2006 12:18:47 +0000 (12:18 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sun, 5 Nov 2006 12:18:47 +0000 (12:18 +0000)
(syms_of_xmenu): Defsubr it.

src/xmenu.c

index 7c397fbd6e1218eb7374d8951ad976240d224d84..4882f8d0d6f27ad2c786cc33af1b74e1f92e5046 100644 (file)
@@ -1493,6 +1493,15 @@ popup_activated ()
   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 @@ syms_of_xmenu ()
 #endif
 
   defsubr (&Sx_popup_menu);
+  defsubr (&Smenu_or_popup_active_p);
 
 #if defined (USE_GTK) || defined (USE_X_TOOLKIT)
   defsubr (&Smenu_bar_open);