use dynwind_begin and dynwind_end
[bpt/emacs.git] / src / gtkutil.c
index 558b727..fcb4224 100644 (file)
@@ -1637,7 +1637,7 @@ xg_maybe_add_timer (gpointer data)
 static int
 xg_dialog_run (struct frame *f, GtkWidget *w)
 {
-  ptrdiff_t count = SPECPDL_INDEX ();
+  dynwind_begin ();
   struct xg_dialog_data dd;
 
   xg_set_screen (w, f);
@@ -1665,7 +1665,7 @@ xg_dialog_run (struct frame *f, GtkWidget *w)
   g_main_loop_run (dd.loop);
 
   dd.w = 0;
-  unbind_to (count, Qnil);
+  dynwind_end ();
 
   return dd.response;
 }