]> code.delx.au - gnu-emacs/blobdiff - src/xmenu.c
Merge from emacs-24; up to 2012-12-17T11:17:34Z!rgm@gnu.org
[gnu-emacs] / src / xmenu.c
index 6d880993d19b957bc95236e240624ce18653c6af..958cd220393271f200a9e8d4f93b5cb9fd135621 100644 (file)
@@ -1413,7 +1413,7 @@ pop_down_menu (Lisp_Object arg)
 {
   popup_activated_flag = 0;
   block_input ();
-  gtk_widget_destroy (GTK_WIDGET (XSAVE_POINTER (arg)));
+  gtk_widget_destroy (GTK_WIDGET (XSAVE_POINTER (arg, 0)));
   unblock_input ();
   return Qnil;
 }
@@ -1477,7 +1477,7 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y,
   gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i,
                  timestamp ? timestamp : gtk_get_current_event_time ());
 
-  record_unwind_protect (pop_down_menu, make_save_value (menu, 0));
+  record_unwind_protect (pop_down_menu, make_save_pointer (menu));
 
   if (gtk_widget_get_mapped (menu))
     {
@@ -1610,7 +1610,7 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv,
 static Lisp_Object
 cleanup_widget_value_tree (Lisp_Object arg)
 {
-  free_menubar_widget_value_tree (XSAVE_POINTER (arg));
+  free_menubar_widget_value_tree (XSAVE_POINTER (arg, 0));
   return Qnil;
 }
 
@@ -1826,7 +1826,7 @@ xmenu_show (FRAME_PTR f, int x, int y, bool for_click, bool keymaps,
   /* Make sure to free the widget_value objects we used to specify the
      contents even with longjmp.  */
   record_unwind_protect (cleanup_widget_value_tree,
-                        make_save_value (first_wv, 0));
+                        make_save_pointer (first_wv));
 
   /* Actually create and show the menu until popped down.  */
   create_and_show_popup_menu (f, first_wv, x, y, for_click, timestamp);
@@ -1925,7 +1925,7 @@ create_and_show_dialog (FRAME_PTR f, widget_value *first_wv)
   if (menu)
     {
       ptrdiff_t specpdl_count = SPECPDL_INDEX ();
-      record_unwind_protect (pop_down_menu, make_save_value (menu, 0));
+      record_unwind_protect (pop_down_menu, make_save_pointer (menu));
 
       /* Display the menu.  */
       gtk_widget_show_all (menu);
@@ -2136,7 +2136,7 @@ xdialog_show (FRAME_PTR f,
   /* Make sure to free the widget_value objects we used to specify the
      contents even with longjmp.  */
   record_unwind_protect (cleanup_widget_value_tree,
-                        make_save_value (first_wv, 0));
+                        make_save_pointer (first_wv));
 
   /* Actually create and show the dialog.  */
   create_and_show_dialog (f, first_wv);
@@ -2236,8 +2236,8 @@ menu_help_callback (char const *help_string, int pane, int item)
 static Lisp_Object
 pop_down_menu (Lisp_Object arg)
 {
-  FRAME_PTR f = XSAVE_POINTER (Fcar (arg));
-  XMenu *menu = XSAVE_POINTER (Fcdr (arg));
+  FRAME_PTR f = XSAVE_POINTER (arg, 0);
+  XMenu *menu = XSAVE_POINTER (arg, 1);
 
   block_input ();
 #ifndef MSDOS
@@ -2479,8 +2479,7 @@ xmenu_show (FRAME_PTR f, int x, int y, bool for_click, bool keymaps,
 #endif
 
   record_unwind_protect (pop_down_menu,
-                         Fcons (make_save_value (f, 0),
-                                make_save_value (menu, 0)));
+                        make_save_value ("pp", f, menu));
 
   /* Help display under X won't work because XMenuActivate contains
      a loop that doesn't give Emacs a chance to process it.  */