diff options
| author | Dmitry Antipov | 2013-01-17 10:29:40 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-01-17 10:29:40 +0400 |
| commit | 468afbaceaeb045f69b1a47aa1550a2556cd7dfd (patch) | |
| tree | ff5bd77d87a3f52802196d04ef4c6ca493c47fe7 /src/xmenu.c | |
| parent | 0e70695aa48cb34d8c3df6e4d4173b6adb474b23 (diff) | |
| download | emacs-468afbaceaeb045f69b1a47aa1550a2556cd7dfd.tar.gz emacs-468afbaceaeb045f69b1a47aa1550a2556cd7dfd.zip | |
* lisp.h (toplevel): Add comment about using Lisp_Save_Value
objects, related functions and macros.
(make_save_value): Adjust prototype.
(make_save_pointer): New prototype.
(SAFE_NALLOCA): Fix indentation. Use make_save_pointer.
(SAFE_ALLOCA_LISP): Adjust make_save_value usage.
* alloc.c (format_save_value): Rename to make_save_value.
(make_save_pointer): New function.
(record_xmalloc): Use make_save_pointer.
* dired.c, editfns.c, fileio.c, font.c, gtkutil.c, lread.c:
* nsmenu.m, nsterm.m, xfns.c, xmenu.c, xselect.c, keymap.c:
Change users of make_save_value to make_save_pointer.
Likewise for format_save_value and make_save_value.
Diffstat (limited to 'src/xmenu.c')
| -rw-r--r-- | src/xmenu.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index 7f6914d26ac..958cd220393 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -1477,7 +1477,7 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, | |||
| 1477 | gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i, | 1477 | gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i, |
| 1478 | timestamp ? timestamp : gtk_get_current_event_time ()); | 1478 | timestamp ? timestamp : gtk_get_current_event_time ()); |
| 1479 | 1479 | ||
| 1480 | record_unwind_protect (pop_down_menu, make_save_value (menu, 0)); | 1480 | record_unwind_protect (pop_down_menu, make_save_pointer (menu)); |
| 1481 | 1481 | ||
| 1482 | if (gtk_widget_get_mapped (menu)) | 1482 | if (gtk_widget_get_mapped (menu)) |
| 1483 | { | 1483 | { |
| @@ -1826,7 +1826,7 @@ xmenu_show (FRAME_PTR f, int x, int y, bool for_click, bool keymaps, | |||
| 1826 | /* Make sure to free the widget_value objects we used to specify the | 1826 | /* Make sure to free the widget_value objects we used to specify the |
| 1827 | contents even with longjmp. */ | 1827 | contents even with longjmp. */ |
| 1828 | record_unwind_protect (cleanup_widget_value_tree, | 1828 | record_unwind_protect (cleanup_widget_value_tree, |
| 1829 | make_save_value (first_wv, 0)); | 1829 | make_save_pointer (first_wv)); |
| 1830 | 1830 | ||
| 1831 | /* Actually create and show the menu until popped down. */ | 1831 | /* Actually create and show the menu until popped down. */ |
| 1832 | create_and_show_popup_menu (f, first_wv, x, y, for_click, timestamp); | 1832 | 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) | |||
| 1925 | if (menu) | 1925 | if (menu) |
| 1926 | { | 1926 | { |
| 1927 | ptrdiff_t specpdl_count = SPECPDL_INDEX (); | 1927 | ptrdiff_t specpdl_count = SPECPDL_INDEX (); |
| 1928 | record_unwind_protect (pop_down_menu, make_save_value (menu, 0)); | 1928 | record_unwind_protect (pop_down_menu, make_save_pointer (menu)); |
| 1929 | 1929 | ||
| 1930 | /* Display the menu. */ | 1930 | /* Display the menu. */ |
| 1931 | gtk_widget_show_all (menu); | 1931 | gtk_widget_show_all (menu); |
| @@ -2136,7 +2136,7 @@ xdialog_show (FRAME_PTR f, | |||
| 2136 | /* Make sure to free the widget_value objects we used to specify the | 2136 | /* Make sure to free the widget_value objects we used to specify the |
| 2137 | contents even with longjmp. */ | 2137 | contents even with longjmp. */ |
| 2138 | record_unwind_protect (cleanup_widget_value_tree, | 2138 | record_unwind_protect (cleanup_widget_value_tree, |
| 2139 | make_save_value (first_wv, 0)); | 2139 | make_save_pointer (first_wv)); |
| 2140 | 2140 | ||
| 2141 | /* Actually create and show the dialog. */ | 2141 | /* Actually create and show the dialog. */ |
| 2142 | create_and_show_dialog (f, first_wv); | 2142 | create_and_show_dialog (f, first_wv); |
| @@ -2479,7 +2479,7 @@ xmenu_show (FRAME_PTR f, int x, int y, bool for_click, bool keymaps, | |||
| 2479 | #endif | 2479 | #endif |
| 2480 | 2480 | ||
| 2481 | record_unwind_protect (pop_down_menu, | 2481 | record_unwind_protect (pop_down_menu, |
| 2482 | format_save_value ("pp", f, menu)); | 2482 | make_save_value ("pp", f, menu)); |
| 2483 | 2483 | ||
| 2484 | /* Help display under X won't work because XMenuActivate contains | 2484 | /* Help display under X won't work because XMenuActivate contains |
| 2485 | a loop that doesn't give Emacs a chance to process it. */ | 2485 | a loop that doesn't give Emacs a chance to process it. */ |