diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2012-07-31 16:36:19 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2012-07-31 16:36:19 +0400 |
commit | e34f7f79833a23586d32fe522b547a0d9a696c13 (patch) | |
tree | 4a2d3927202cb91b474bc9648ca9dee2bffaa54a /src/xmenu.c | |
parent | c09bfb2f140b2885af17185634451e2abfd6e91c (diff) | |
download | emacs-e34f7f79833a23586d32fe522b547a0d9a696c13.tar.gz |
Generalize INTERNAL_FIELD between buffers, keyboards and frames.
* src/lisp.h (INTERNAL_FIELD): New macro.
* src/buffer.h (BUFFER_INTERNAL_FIELD): Removed.
(BVAR): Change to use INTERNAL_FIELD.
* src/keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
(KVAR): Change to use INTERNAL_FIELD.
* src/frame.h (FVAR): New macro.
(struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
* src/alloc.c, src/buffer.c, src/data.c, src/dispnew.c, src/dosfns.c
* src/eval.c, src/frame.c, src/fringe.c, src/gtkutil.c, src/minibuf.c
* src/nsfns.m, src/nsterm.m, src/print.c, src/term.c, src/w32fns.c
* src/w32menu.c, src/w32term.c, src/window.c, src/window.h, src/xdisp.c
* src/xfaces.c, src/xfns.c, src/xmenu.c, src/xterm.c: Users changed.
* admin/coccinelle/frame.cocci: Semantic patch to replace direct
access to Lisp_Object members of struct frame to FVAR.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r-- | src/xmenu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index c7ec3dc3171..d1b3198cc80 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -835,7 +835,7 @@ menubar_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data) if (!f) return; find_and_call_menu_selection (f, f->menu_bar_items_used, - f->menu_bar_vector, client_data); + FVAR (f, menu_bar_vector), client_data); } #endif /* not USE_GTK */ @@ -1014,14 +1014,14 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) /* Save the frame's previous menu bar contents data. */ if (previous_menu_items_used) - memcpy (previous_items, XVECTOR (f->menu_bar_vector)->contents, + memcpy (previous_items, XVECTOR (FVAR (f, menu_bar_vector))->contents, previous_menu_items_used * sizeof (Lisp_Object)); /* Fill in menu_items with the current menu bar contents. This can evaluate Lisp code. */ save_menu_items (); - menu_items = f->menu_bar_vector; + menu_items = FVAR (f, menu_bar_vector); menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0; subitems = ASIZE (items) / 4; submenu_start = alloca ((subitems + 1) * sizeof *submenu_start); @@ -1100,7 +1100,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) } /* The menu items are different, so store them in the frame. */ - f->menu_bar_vector = menu_items; + FVAR (f, menu_bar_vector) = menu_items; f->menu_bar_items_used = menu_items_used; /* This undoes save_menu_items. */ |