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/xfaces.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/xfaces.c')
-rw-r--r-- | src/xfaces.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index 6a34c3c8893..3d5ea9e1152 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -2051,7 +2051,7 @@ lface_from_face_name_no_resolve (struct frame *f, Lisp_Object face_name, Lisp_Object lface; if (f) - lface = assq_no_quit (face_name, f->face_alist); + lface = assq_no_quit (face_name, FVAR (f, face_alist)); else lface = assq_no_quit (face_name, Vface_new_frame_defaults); @@ -2678,7 +2678,8 @@ Value is a vector of face attributes. */) lface = Fmake_vector (make_number (LFACE_VECTOR_SIZE), Qunspecified); ASET (lface, 0, Qface); - f->face_alist = Fcons (Fcons (face, lface), f->face_alist); + FVAR (f, face_alist) = Fcons (Fcons (face, lface), FVAR (f, + face_alist)); } else for (i = 1; i < LFACE_VECTOR_SIZE; ++i) @@ -3357,7 +3358,7 @@ update_face_from_frame_parameter (struct frame *f, Lisp_Object param, /* If there are no faces yet, give up. This is the case when called from Fx_create_frame, and we do the necessary things later in face-set-after-frame-defaults. */ - if (NILP (f->face_alist)) + if (NILP (FVAR (f, face_alist))) return; if (EQ (param, Qforeground_color)) @@ -4043,7 +4044,7 @@ For internal use only. */) (Lisp_Object frame) { struct frame *f = frame_or_selected_frame (frame, 0); - return f->face_alist; + return FVAR (f, face_alist); } @@ -4334,7 +4335,7 @@ free_realized_faces (struct face_cache *c) matrices as invalid because they will reference faces freed above. This function is also called when a frame is destroyed. In this case, the root window of F is nil. */ - if (WINDOWP (f->root_window)) + if (WINDOWP (FVAR (f, root_window))) { clear_current_matrices (f); ++windows_or_buffers_changed; @@ -5107,7 +5108,7 @@ face for italic. */) { frame = XCAR (fl_tail); if (!NILP (Fequal (Fcdr (Fassq (Qdisplay, - XFRAME (frame)->param_alist)), + FVAR (XFRAME (frame), param_alist))), display))) break; } @@ -5403,7 +5404,7 @@ realize_default_face (struct frame *f) { /* This function is called so early that colors are not yet set in the frame parameter list. */ - Lisp_Object color = Fassq (Qforeground_color, f->param_alist); + Lisp_Object color = Fassq (Qforeground_color, FVAR (f, param_alist)); if (CONSP (color) && STRINGP (XCDR (color))) LFACE_FOREGROUND (lface) = XCDR (color); @@ -5419,7 +5420,7 @@ realize_default_face (struct frame *f) { /* This function is called so early that colors are not yet set in the frame parameter list. */ - Lisp_Object color = Fassq (Qbackground_color, f->param_alist); + Lisp_Object color = Fassq (Qbackground_color, FVAR (f, param_alist)); if (CONSP (color) && STRINGP (XCDR (color))) LFACE_BACKGROUND (lface) = XCDR (color); else if (FRAME_WINDOW_P (f)) |