diff options
Diffstat (limited to 'src/menu.c')
| -rw-r--r-- | src/menu.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/src/menu.c b/src/menu.c index 58558d5aedd..6b4a22d3052 100644 --- a/src/menu.c +++ b/src/menu.c @@ -102,10 +102,10 @@ finish_menu_items (void) { } -Lisp_Object -unuse_menu_items (Lisp_Object dummy) +void +unuse_menu_items (void) { - return menu_items_inuse = Qnil; + menu_items_inuse = Qnil; } /* Call when finished using the data for the current menu @@ -124,19 +124,10 @@ discard_menu_items (void) eassert (NILP (menu_items_inuse)); } -#ifdef HAVE_NS -static Lisp_Object -cleanup_popup_menu (Lisp_Object arg) -{ - discard_menu_items (); - return Qnil; -} -#endif - /* This undoes save_menu_items, and it is called by the specpdl unwind mechanism. */ -static Lisp_Object +static void restore_menu_items (Lisp_Object saved) { menu_items = XCAR (saved); @@ -148,7 +139,6 @@ restore_menu_items (Lisp_Object saved) menu_items_n_panes = XINT (XCAR (saved)); saved = XCDR (saved); menu_items_submenu_depth = XINT (XCAR (saved)); - return Qnil; } /* Push the whole state of menu_items processing onto the specpdl. @@ -1004,7 +994,7 @@ find_and_return_menu_selection (FRAME_PTR f, bool keymaps, void *client_data) { int j; - entry = Fcons (entry, Qnil); + entry = list1 (entry); if (!NILP (prefix)) entry = Fcons (prefix, entry); for (j = submenu_depth - 1; j >= 0; j--) @@ -1213,7 +1203,7 @@ no quit occurs and `x-popup-menu' returns nil. */) #endif /* HAVE_MENUS */ /* Now parse the lisp menus. */ - record_unwind_protect (unuse_menu_items, Qnil); + record_unwind_protect_void (unuse_menu_items); title = Qnil; GCPRO1 (title); @@ -1315,7 +1305,7 @@ no quit occurs and `x-popup-menu' returns nil. */) #endif #ifdef HAVE_NS /* FIXME: ns-specific, why? --Stef */ - record_unwind_protect (cleanup_popup_menu, Qnil); + record_unwind_protect_void (discard_menu_items); #endif /* Display them in a menu. */ |
