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 /admin/coccinelle | |
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 'admin/coccinelle')
-rw-r--r-- | admin/coccinelle/frame.cocci | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/admin/coccinelle/frame.cocci b/admin/coccinelle/frame.cocci new file mode 100644 index 00000000000..a817382120a --- /dev/null +++ b/admin/coccinelle/frame.cocci @@ -0,0 +1,133 @@ +// Change direct access to Lisp_Object fields of struct frame to FVAR. +@@ +expression F; +@@ +( +- F->icon_name ++ FVAR (F, icon_name) +| +- F->title ++ FVAR (F, title) +| +- F->focus_frame ++ FVAR (F, focus_frame) +| +- F->root_window ++ FVAR (F, root_window) +| +- F->selected_window ++ FVAR (F, selected_window) +| +- F->minibuffer_window ++ FVAR (F, minibuffer_window) +| +- F->param_alist ++ FVAR (F, param_alist) +| +- F->scroll_bars ++ FVAR (F, scroll_bars) +| +- F->condemned_scroll_bars ++ FVAR (F, condemned_scroll_bars) +| +- F->menu_bar_items ++ FVAR (F, menu_bar_items) +| +- F->face_alist ++ FVAR (F, face_alist) +| +- F->menu_bar_vector ++ FVAR (F, menu_bar_vector) +| +- F->buffer_predicate ++ FVAR (F, buffer_predicate) +| +- F->buffer_list ++ FVAR (F, buffer_list) +| +- F->buried_buffer_list ++ FVAR (F, buried_buffer_list) +| +- F->menu_bar_window ++ FVAR (F, menu_bar_window) +| +- F->tool_bar_window ++ FVAR (F, tool_bar_window) +| +- F->tool_bar_items ++ FVAR (F, tool_bar_items) +| +- F->tool_bar_position ++ FVAR (F, tool_bar_position) +| +- F->desired_tool_bar_string ++ FVAR (F, desired_tool_bar_string) +| +- F->current_tool_bar_string ++ FVAR (F, current_tool_bar_string) + +| + +- XFRAME (F)->icon_name ++ FVAR (XFRAME (F), icon_name) +| +- XFRAME (F)->title ++ FVAR (XFRAME (F), title) +| +- XFRAME (F)->focus_frame ++ FVAR (XFRAME (F), focus_frame) +| +- XFRAME (F)->root_window ++ FVAR (XFRAME (F), root_window) +| +- XFRAME (F)->selected_window ++ FVAR (XFRAME (F), selected_window) +| +- XFRAME (F)->minibuffer_window ++ FVAR (XFRAME (F), minibuffer_window) +| +- XFRAME (F)->param_alist ++ FVAR (XFRAME (F), param_alist) +| +- XFRAME (F)->scroll_bars ++ FVAR (XFRAME (F), scroll_bars) +| +- XFRAME (F)->condemned_scroll_bars ++ FVAR (XFRAME (F), condemned_scroll_bars) +| +- XFRAME (F)->menu_bar_items ++ FVAR (XFRAME (F), menu_bar_items) +| +- XFRAME (F)->face_alist ++ FVAR (XFRAME (F), face_alist) +| +- XFRAME (F)->menu_bar_vector ++ FVAR (XFRAME (F), menu_bar_vector) +| +- XFRAME (F)->buffer_predicate ++ FVAR (XFRAME (F), buffer_predicate) +| +- XFRAME (F)->buffer_list ++ FVAR (XFRAME (F), buffer_list) +| +- XFRAME (F)->buried_buffer_list ++ FVAR (XFRAME (F), buried_buffer_list) +| +- XFRAME (F)->menu_bar_window ++ FVAR (XFRAME (F), menu_bar_window) +| +- XFRAME (F)->tool_bar_window ++ FVAR (XFRAME (F), tool_bar_window) +| +- XFRAME (F)->tool_bar_items ++ FVAR (XFRAME (F), tool_bar_items) +| +- XFRAME (F)->tool_bar_position ++ FVAR (XFRAME (F), tool_bar_position) +| +- XFRAME (F)->desired_tool_bar_string ++ FVAR (XFRAME (F), desired_tool_bar_string) +| +- XFRAME (F)->current_tool_bar_string ++ FVAR (XFRAME (F), current_tool_bar_string) +) |