changeset 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 b55c133a59f9
children 97a25a5ed8a9
files src/xmenu.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
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);