From 0ec2e29e9b11ca2959b6d338a6f548292bfe08d4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 5 Nov 2006 12:16:51 +0000 Subject: [PATCH] (Fmenu_or_popup_active_p): New function. (syms_of_macmenu): Defsubr it. --- src/macmenu.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/macmenu.c b/src/macmenu.c index 02fae600cdf..ce0bc6eea54 100644 --- a/src/macmenu.c +++ b/src/macmenu.c @@ -1052,6 +1052,17 @@ x_activate_menubar (f) UNBLOCK_INPUT; } +/* 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. */) + () +{ + /* Always return Qnil since menu selection functions do not return + until a selection has been made or cancelled. */ + return Qnil; +} + /* Find the menu selection and store it in the keyboard buffer. F is the frame the menu is on. MENU_BAR_ITEMS_USED is the length of VECTOR. @@ -2653,6 +2664,7 @@ syms_of_macmenu () staticpro (&Qdebug_on_next_call); defsubr (&Sx_popup_menu); + defsubr (&Smenu_or_popup_active_p); #ifdef HAVE_MENUS defsubr (&Sx_popup_dialog); #endif -- 2.39.2