aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2012-08-07 09:29:25 +0400
committerDmitry Antipov2012-08-07 09:29:25 +0400
commite69b09607980b55ee15d60424072feac4b6e72a6 (patch)
treea589f89bbd6c3f413383bd3b39b2ed505c773b0c /src
parent5fb50dd30236d8e64951c2f7e72a2d2e15257f24 (diff)
downloademacs-e69b09607980b55ee15d60424072feac4b6e72a6.tar.gz
emacs-e69b09607980b55ee15d60424072feac4b6e72a6.zip
Drop FGET and revert read access to Lisp_Objects slots of struct frame.
* frame.h (FGET): Remove. (struct frame): Do not use INTERNAL_FIELD. * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c: * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m: * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h: * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/buffer.c14
-rw-r--r--src/data.c5
-rw-r--r--src/dispnew.c69
-rw-r--r--src/dosfns.c4
-rw-r--r--src/eval.c2
-rw-r--r--src/fontset.c2
-rw-r--r--src/frame.c89
-rw-r--r--src/frame.h76
-rw-r--r--src/fringe.c4
-rw-r--r--src/gtkutil.c26
-rw-r--r--src/minibuf.c8
-rw-r--r--src/msdos.c6
-rw-r--r--src/nsfns.m40
-rw-r--r--src/nsmenu.m6
-rw-r--r--src/nsterm.m16
-rw-r--r--src/print.c2
-rw-r--r--src/term.c2
-rw-r--r--src/w32fns.c38
-rw-r--r--src/w32menu.c6
-rw-r--r--src/w32term.c22
-rw-r--r--src/window.c39
-rw-r--r--src/window.h8
-rw-r--r--src/xdisp.c118
-rw-r--r--src/xfaces.c17
-rw-r--r--src/xfns.c58
-rw-r--r--src/xmenu.c6
-rw-r--r--src/xterm.c14
28 files changed, 353 insertions, 354 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ed2a18af3c6..2dcfd9ccd64 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
12012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2
3 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
4 * frame.h (FGET): Remove.
5 (struct frame): Do not use INTERNAL_FIELD.
6 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
7 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
8 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
9 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
10
12012-08-06 Juanma Barranquero <lekktu@gmail.com> 112012-08-06 Juanma Barranquero <lekktu@gmail.com>
2 12
3 * w32.c: Silence compiler warnings. 13 * w32.c: Silence compiler warnings.
diff --git a/src/buffer.c b/src/buffer.c
index 6085746ee6e..38399609718 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -193,9 +193,9 @@ followed by the rest of the buffers. */)
193 Lisp_Object args[3]; 193 Lisp_Object args[3];
194 194
195 CHECK_FRAME (frame); 195 CHECK_FRAME (frame);
196 framelist = Fcopy_sequence (FGET (XFRAME (frame), buffer_list)); 196 framelist = Fcopy_sequence (XFRAME (frame)->buffer_list);
197 prevlist = Fnreverse (Fcopy_sequence 197 prevlist = Fnreverse (Fcopy_sequence
198 (FGET (XFRAME (frame), buried_buffer_list))); 198 (XFRAME (frame)->buried_buffer_list));
199 199
200 /* Remove from GENERAL any buffer that duplicates one in 200 /* Remove from GENERAL any buffer that duplicates one in
201 FRAMELIST or PREVLIST. */ 201 FRAMELIST or PREVLIST. */
@@ -1327,7 +1327,7 @@ exists, return the buffer `*scratch*' (creating it if necessary). */)
1327 1327
1328 pred = frame_buffer_predicate (frame); 1328 pred = frame_buffer_predicate (frame);
1329 /* Consider buffers that have been seen in the frame first. */ 1329 /* Consider buffers that have been seen in the frame first. */
1330 tail = FGET (XFRAME (frame), buffer_list); 1330 tail = XFRAME (frame)->buffer_list;
1331 for (; CONSP (tail); tail = XCDR (tail)) 1331 for (; CONSP (tail); tail = XCDR (tail))
1332 { 1332 {
1333 buf = XCAR (tail); 1333 buf = XCAR (tail);
@@ -1767,8 +1767,8 @@ record_buffer (Lisp_Object buffer)
1767 Vinhibit_quit = tem; 1767 Vinhibit_quit = tem;
1768 1768
1769 /* Update buffer list of selected frame. */ 1769 /* Update buffer list of selected frame. */
1770 FSET (f, buffer_list, Fcons (buffer, Fdelq (buffer, FGET (f, buffer_list)))); 1770 FSET (f, buffer_list, Fcons (buffer, Fdelq (buffer, f->buffer_list)));
1771 FSET (f, buried_buffer_list, Fdelq (buffer, FGET (f, buried_buffer_list))); 1771 FSET (f, buried_buffer_list, Fdelq (buffer, f->buried_buffer_list));
1772 1772
1773 /* Run buffer-list-update-hook. */ 1773 /* Run buffer-list-update-hook. */
1774 if (!NILP (Vrun_hooks)) 1774 if (!NILP (Vrun_hooks))
@@ -1805,9 +1805,9 @@ DEFUN ("bury-buffer-internal", Fbury_buffer_internal, Sbury_buffer_internal,
1805 Vinhibit_quit = tem; 1805 Vinhibit_quit = tem;
1806 1806
1807 /* Update buffer lists of selected frame. */ 1807 /* Update buffer lists of selected frame. */
1808 FSET (f, buffer_list, Fdelq (buffer, FGET (f, buffer_list))); 1808 FSET (f, buffer_list, Fdelq (buffer, f->buffer_list));
1809 FSET (f, buried_buffer_list, 1809 FSET (f, buried_buffer_list,
1810 Fcons (buffer, Fdelq (buffer, FGET (f, buried_buffer_list)))); 1810 Fcons (buffer, Fdelq (buffer, f->buried_buffer_list)));
1811 1811
1812 /* Run buffer-list-update-hook. */ 1812 /* Run buffer-list-update-hook. */
1813 if (!NILP (Vrun_hooks)) 1813 if (!NILP (Vrun_hooks))
diff --git a/src/data.c b/src/data.c
index 0803cecf5ee..3a8e0b11d6a 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1006,8 +1006,7 @@ swap_in_symval_forwarding (struct Lisp_Symbol *symbol, struct Lisp_Buffer_Local_
1006 XSETSYMBOL (var, symbol); 1006 XSETSYMBOL (var, symbol);
1007 if (blv->frame_local) 1007 if (blv->frame_local)
1008 { 1008 {
1009 tem1 = assq_no_quit (var, FGET (XFRAME (selected_frame), 1009 tem1 = assq_no_quit (var, XFRAME (selected_frame)->param_alist);
1010 param_alist));
1011 blv->where = selected_frame; 1010 blv->where = selected_frame;
1012 } 1011 }
1013 else 1012 else
@@ -1180,7 +1179,7 @@ set_internal (register Lisp_Object symbol, register Lisp_Object newval, register
1180 XSETSYMBOL (symbol, sym); /* May have changed via aliasing. */ 1179 XSETSYMBOL (symbol, sym); /* May have changed via aliasing. */
1181 tem1 = Fassq (symbol, 1180 tem1 = Fassq (symbol,
1182 (blv->frame_local 1181 (blv->frame_local
1183 ? FGET (XFRAME (where), param_alist) 1182 ? XFRAME (where)->param_alist
1184 : BVAR (XBUFFER (where), local_var_alist))); 1183 : BVAR (XBUFFER (where), local_var_alist)));
1185 blv->where = where; 1184 blv->where = where;
1186 blv->found = 1; 1185 blv->found = 1;
diff --git a/src/dispnew.c b/src/dispnew.c
index d06ab594b2f..2faede33b7f 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -821,12 +821,12 @@ clear_current_matrices (register struct frame *f)
821 /* Clear the matrix of the menu bar window, if such a window exists. 821 /* Clear the matrix of the menu bar window, if such a window exists.
822 The menu bar window is currently used to display menus on X when 822 The menu bar window is currently used to display menus on X when
823 no toolkit support is compiled in. */ 823 no toolkit support is compiled in. */
824 if (WINDOWP (FGET (f, menu_bar_window))) 824 if (WINDOWP (f->menu_bar_window))
825 clear_glyph_matrix (XWINDOW (FGET (f, menu_bar_window))->current_matrix); 825 clear_glyph_matrix (XWINDOW (f->menu_bar_window)->current_matrix);
826 826
827 /* Clear the matrix of the tool-bar window, if any. */ 827 /* Clear the matrix of the tool-bar window, if any. */
828 if (WINDOWP (FGET (f, tool_bar_window))) 828 if (WINDOWP (f->tool_bar_window))
829 clear_glyph_matrix (XWINDOW (FGET (f, tool_bar_window))->current_matrix); 829 clear_glyph_matrix (XWINDOW (f->tool_bar_window)->current_matrix);
830 830
831 /* Clear current window matrices. */ 831 /* Clear current window matrices. */
832 eassert (WINDOWP (FRAME_ROOT_WINDOW (f))); 832 eassert (WINDOWP (FRAME_ROOT_WINDOW (f)));
@@ -842,11 +842,11 @@ clear_desired_matrices (register struct frame *f)
842 if (f->desired_matrix) 842 if (f->desired_matrix)
843 clear_glyph_matrix (f->desired_matrix); 843 clear_glyph_matrix (f->desired_matrix);
844 844
845 if (WINDOWP (FGET (f, menu_bar_window))) 845 if (WINDOWP (f->menu_bar_window))
846 clear_glyph_matrix (XWINDOW (FGET (f, menu_bar_window))->desired_matrix); 846 clear_glyph_matrix (XWINDOW (f->menu_bar_window)->desired_matrix);
847 847
848 if (WINDOWP (FGET (f, tool_bar_window))) 848 if (WINDOWP (f->tool_bar_window))
849 clear_glyph_matrix (XWINDOW (FGET (f, tool_bar_window))->desired_matrix); 849 clear_glyph_matrix (XWINDOW (f->tool_bar_window)->desired_matrix);
850 850
851 /* Do it for window matrices. */ 851 /* Do it for window matrices. */
852 eassert (WINDOWP (FRAME_ROOT_WINDOW (f))); 852 eassert (WINDOWP (FRAME_ROOT_WINDOW (f)));
@@ -1881,7 +1881,7 @@ static void
1881adjust_frame_glyphs_initially (void) 1881adjust_frame_glyphs_initially (void)
1882{ 1882{
1883 struct frame *sf = SELECTED_FRAME (); 1883 struct frame *sf = SELECTED_FRAME ();
1884 struct window *root = XWINDOW (FGET (sf, root_window)); 1884 struct window *root = XWINDOW (sf->root_window);
1885 struct window *mini = XWINDOW (WGET (root, next)); 1885 struct window *mini = XWINDOW (WGET (root, next));
1886 int frame_lines = FRAME_LINES (sf); 1886 int frame_lines = FRAME_LINES (sf);
1887 int frame_cols = FRAME_COLS (sf); 1887 int frame_cols = FRAME_COLS (sf);
@@ -2164,17 +2164,17 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
2164 { 2164 {
2165 /* Allocate a dummy window if not already done. */ 2165 /* Allocate a dummy window if not already done. */
2166 struct window *w; 2166 struct window *w;
2167 if (NILP (FGET (f, menu_bar_window))) 2167 if (NILP (f->menu_bar_window))
2168 { 2168 {
2169 Lisp_Object frame; 2169 Lisp_Object frame;
2170 FSET (f, menu_bar_window, make_window ()); 2170 FSET (f, menu_bar_window, make_window ());
2171 w = XWINDOW (FGET (f, menu_bar_window)); 2171 w = XWINDOW (f->menu_bar_window);
2172 XSETFRAME (frame, f); 2172 XSETFRAME (frame, f);
2173 WSET (w, frame, frame); 2173 WSET (w, frame, frame);
2174 w->pseudo_window_p = 1; 2174 w->pseudo_window_p = 1;
2175 } 2175 }
2176 else 2176 else
2177 w = XWINDOW (FGET (f, menu_bar_window)); 2177 w = XWINDOW (f->menu_bar_window);
2178 2178
2179 /* Set window dimensions to frame dimensions and allocate or 2179 /* Set window dimensions to frame dimensions and allocate or
2180 adjust glyph matrices of W. */ 2180 adjust glyph matrices of W. */
@@ -2192,17 +2192,17 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
2192 /* Allocate/ reallocate matrices of the tool bar window. If we 2192 /* Allocate/ reallocate matrices of the tool bar window. If we
2193 don't have a tool bar window yet, make one. */ 2193 don't have a tool bar window yet, make one. */
2194 struct window *w; 2194 struct window *w;
2195 if (NILP (FGET (f, tool_bar_window))) 2195 if (NILP (f->tool_bar_window))
2196 { 2196 {
2197 Lisp_Object frame; 2197 Lisp_Object frame;
2198 FSET (f, tool_bar_window, make_window ()); 2198 FSET (f, tool_bar_window, make_window ());
2199 w = XWINDOW (FGET (f, tool_bar_window)); 2199 w = XWINDOW (f->tool_bar_window);
2200 XSETFRAME (frame, f); 2200 XSETFRAME (frame, f);
2201 WSET (w, frame, frame); 2201 WSET (w, frame, frame);
2202 w->pseudo_window_p = 1; 2202 w->pseudo_window_p = 1;
2203 } 2203 }
2204 else 2204 else
2205 w = XWINDOW (FGET (f, tool_bar_window)); 2205 w = XWINDOW (f->tool_bar_window);
2206 2206
2207 WSET (w, top_line, make_number (FRAME_MENU_BAR_LINES (f))); 2207 WSET (w, top_line, make_number (FRAME_MENU_BAR_LINES (f)));
2208 WSET (w, left_col, make_number (0)); 2208 WSET (w, left_col, make_number (0));
@@ -2262,14 +2262,14 @@ free_glyphs (struct frame *f)
2262 f->glyphs_initialized_p = 0; 2262 f->glyphs_initialized_p = 0;
2263 2263
2264 /* Release window sub-matrices. */ 2264 /* Release window sub-matrices. */
2265 if (!NILP (FGET (f, root_window))) 2265 if (!NILP (f->root_window))
2266 free_window_matrices (XWINDOW (FGET (f, root_window))); 2266 free_window_matrices (XWINDOW (f->root_window));
2267 2267
2268 /* Free the dummy window for menu bars without X toolkit and its 2268 /* Free the dummy window for menu bars without X toolkit and its
2269 glyph matrices. */ 2269 glyph matrices. */
2270 if (!NILP (FGET (f, menu_bar_window))) 2270 if (!NILP (f->menu_bar_window))
2271 { 2271 {
2272 struct window *w = XWINDOW (FGET (f, menu_bar_window)); 2272 struct window *w = XWINDOW (f->menu_bar_window);
2273 free_glyph_matrix (w->desired_matrix); 2273 free_glyph_matrix (w->desired_matrix);
2274 free_glyph_matrix (w->current_matrix); 2274 free_glyph_matrix (w->current_matrix);
2275 w->desired_matrix = w->current_matrix = NULL; 2275 w->desired_matrix = w->current_matrix = NULL;
@@ -2277,9 +2277,9 @@ free_glyphs (struct frame *f)
2277 } 2277 }
2278 2278
2279 /* Free the tool bar window and its glyph matrices. */ 2279 /* Free the tool bar window and its glyph matrices. */
2280 if (!NILP (FGET (f, tool_bar_window))) 2280 if (!NILP (f->tool_bar_window))
2281 { 2281 {
2282 struct window *w = XWINDOW (FGET (f, tool_bar_window)); 2282 struct window *w = XWINDOW (f->tool_bar_window);
2283 free_glyph_matrix (w->desired_matrix); 2283 free_glyph_matrix (w->desired_matrix);
2284 free_glyph_matrix (w->current_matrix); 2284 free_glyph_matrix (w->current_matrix);
2285 w->desired_matrix = w->current_matrix = NULL; 2285 w->desired_matrix = w->current_matrix = NULL;
@@ -2706,7 +2706,7 @@ make_current (struct glyph_matrix *desired_matrix, struct glyph_matrix *current_
2706 /* If we are called on frame matrices, perform analogous operations 2706 /* If we are called on frame matrices, perform analogous operations
2707 for window matrices. */ 2707 for window matrices. */
2708 if (frame_matrix_frame) 2708 if (frame_matrix_frame)
2709 mirror_make_current (XWINDOW (FGET (frame_matrix_frame, root_window)), row); 2709 mirror_make_current (XWINDOW (frame_matrix_frame->root_window), row);
2710} 2710}
2711 2711
2712 2712
@@ -2804,7 +2804,7 @@ mirrored_line_dance (struct glyph_matrix *matrix, int unchanged_at_top, int nlin
2804 2804
2805 /* Do the same for window matrices, if MATRIX is a frame matrix. */ 2805 /* Do the same for window matrices, if MATRIX is a frame matrix. */
2806 if (frame_matrix_frame) 2806 if (frame_matrix_frame)
2807 mirror_line_dance (XWINDOW (FGET (frame_matrix_frame, root_window)), 2807 mirror_line_dance (XWINDOW (frame_matrix_frame->root_window),
2808 unchanged_at_top, nlines, copy_from, retained_p); 2808 unchanged_at_top, nlines, copy_from, retained_p);
2809} 2809}
2810 2810
@@ -3167,7 +3167,7 @@ update_frame (struct frame *f, int force_p, int inhibit_hairy_id_p)
3167{ 3167{
3168 /* 1 means display has been paused because of pending input. */ 3168 /* 1 means display has been paused because of pending input. */
3169 int paused_p; 3169 int paused_p;
3170 struct window *root_window = XWINDOW (FGET (f, root_window)); 3170 struct window *root_window = XWINDOW (f->root_window);
3171 3171
3172 if (redisplay_dont_pause) 3172 if (redisplay_dont_pause)
3173 force_p = 1; 3173 force_p = 1;
@@ -3202,13 +3202,13 @@ update_frame (struct frame *f, int force_p, int inhibit_hairy_id_p)
3202 3202
3203 /* Update the menu bar on X frames that don't have toolkit 3203 /* Update the menu bar on X frames that don't have toolkit
3204 support. */ 3204 support. */
3205 if (WINDOWP (FGET (f, menu_bar_window))) 3205 if (WINDOWP (f->menu_bar_window))
3206 update_window (XWINDOW (FGET (f, menu_bar_window)), 1); 3206 update_window (XWINDOW (f->menu_bar_window), 1);
3207 3207
3208 /* Update the tool-bar window, if present. */ 3208 /* Update the tool-bar window, if present. */
3209 if (WINDOWP (FGET (f, tool_bar_window))) 3209 if (WINDOWP (f->tool_bar_window))
3210 { 3210 {
3211 struct window *w = XWINDOW (FGET (f, tool_bar_window)); 3211 struct window *w = XWINDOW (f->tool_bar_window);
3212 3212
3213 /* Update tool-bar window. */ 3213 /* Update tool-bar window. */
3214 if (w->must_be_updated_p) 3214 if (w->must_be_updated_p)
@@ -3220,9 +3220,8 @@ update_frame (struct frame *f, int force_p, int inhibit_hairy_id_p)
3220 3220
3221 /* Swap tool-bar strings. We swap because we want to 3221 /* Swap tool-bar strings. We swap because we want to
3222 reuse strings. */ 3222 reuse strings. */
3223 tem = FGET (f, current_tool_bar_string); 3223 tem = f->current_tool_bar_string;
3224 FSET (f, current_tool_bar_string, 3224 FSET (f, current_tool_bar_string, f->desired_tool_bar_string);
3225 FGET (f, desired_tool_bar_string));
3226 FSET (f, desired_tool_bar_string, tem); 3225 FSET (f, desired_tool_bar_string, tem);
3227 } 3226 }
3228 } 3227 }
@@ -5745,8 +5744,8 @@ change_frame_size_1 (register struct frame *f, int newheight, int newwidth, int
5745 if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f)) 5744 if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f))
5746 FrameCols (FRAME_TTY (f)) = newwidth; 5745 FrameCols (FRAME_TTY (f)) = newwidth;
5747 5746
5748 if (WINDOWP (FGET (f, tool_bar_window))) 5747 if (WINDOWP (f->tool_bar_window))
5749 WSET (XWINDOW (FGET (f, tool_bar_window)), 5748 WSET (XWINDOW (f->tool_bar_window),
5750 total_cols, make_number (newwidth)); 5749 total_cols, make_number (newwidth));
5751 } 5750 }
5752 5751
@@ -6071,7 +6070,7 @@ pass nil for VARIABLE. */)
6071 goto changed; 6070 goto changed;
6072 if (vecp == end) 6071 if (vecp == end)
6073 goto changed; 6072 goto changed;
6074 if (!EQ (*vecp++, FGET (XFRAME (frame), name))) 6073 if (!EQ (*vecp++, XFRAME (frame)->name))
6075 goto changed; 6074 goto changed;
6076 } 6075 }
6077 /* Check that the buffer info matches. */ 6076 /* Check that the buffer info matches. */
@@ -6128,7 +6127,7 @@ pass nil for VARIABLE. */)
6128 FOR_EACH_FRAME (tail, frame) 6127 FOR_EACH_FRAME (tail, frame)
6129 { 6128 {
6130 *vecp++ = frame; 6129 *vecp++ = frame;
6131 *vecp++ = FGET (XFRAME (frame), name); 6130 *vecp++ = XFRAME (frame)->name;
6132 } 6131 }
6133 for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail)) 6132 for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail))
6134 { 6133 {
diff --git a/src/dosfns.c b/src/dosfns.c
index 20efc3dee70..e3adf25d79f 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -468,7 +468,7 @@ void
468x_set_title (struct frame *f, Lisp_Object name) 468x_set_title (struct frame *f, Lisp_Object name)
469{ 469{
470 /* Don't change the title if it's already NAME. */ 470 /* Don't change the title if it's already NAME. */
471 if (EQ (name, FGET (f, title))) 471 if (EQ (name, f->title))
472 return; 472 return;
473 473
474 update_mode_lines = 1; 474 update_mode_lines = 1;
@@ -476,7 +476,7 @@ x_set_title (struct frame *f, Lisp_Object name)
476 FSET (f, title, name); 476 FSET (f, title, name);
477 477
478 if (NILP (name)) 478 if (NILP (name))
479 name = FGET (f, name); 479 name = f->name;
480 480
481 if (FRAME_MSDOS_P (f)) 481 if (FRAME_MSDOS_P (f))
482 { 482 {
diff --git a/src/eval.c b/src/eval.c
index e6d4a4ceac9..63700f36d0a 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -3254,7 +3254,7 @@ unbind_to (ptrdiff_t count, Lisp_Object value)
3254 local binding, but only if that binding still exists. */ 3254 local binding, but only if that binding still exists. */
3255 else if (BUFFERP (where) 3255 else if (BUFFERP (where)
3256 ? !NILP (Flocal_variable_p (symbol, where)) 3256 ? !NILP (Flocal_variable_p (symbol, where))
3257 : !NILP (Fassq (symbol, FGET (XFRAME (where), param_alist)))) 3257 : !NILP (Fassq (symbol, XFRAME (where)->param_alist)))
3258 set_internal (symbol, this_binding.old_value, where, 1); 3258 set_internal (symbol, this_binding.old_value, where, 1);
3259 } 3259 }
3260 /* If variable has a trivial value (no forwarding), we can 3260 /* If variable has a trivial value (no forwarding), we can
diff --git a/src/fontset.c b/src/fontset.c
index 7a2c0912d6f..01b00eec180 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -2118,7 +2118,7 @@ dump_fontset (Lisp_Object fontset)
2118 if (FRAME_LIVE_P (f)) 2118 if (FRAME_LIVE_P (f))
2119 ASET (vec, 1, 2119 ASET (vec, 1,
2120 Fcons (FONTSET_NAME (FONTSET_BASE (fontset)), 2120 Fcons (FONTSET_NAME (FONTSET_BASE (fontset)),
2121 FGET (f, name))); 2121 f->name));
2122 else 2122 else
2123 ASET (vec, 1, 2123 ASET (vec, 1,
2124 Fcons (FONTSET_NAME (FONTSET_BASE (fontset)), Qnil)); 2124 Fcons (FONTSET_NAME (FONTSET_BASE (fontset)), Qnil));
diff --git a/src/frame.c b/src/frame.c
index cb94143a1d5..4dc86c15ecb 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -170,7 +170,7 @@ set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
170 windows_or_buffers_changed++; 170 windows_or_buffers_changed++;
171 FRAME_WINDOW_SIZES_CHANGED (f) = 1; 171 FRAME_WINDOW_SIZES_CHANGED (f) = 1;
172 FRAME_MENU_BAR_LINES (f) = nlines; 172 FRAME_MENU_BAR_LINES (f) = nlines;
173 set_menu_bar_lines_1 (FGET (f, root_window), nlines - olines); 173 set_menu_bar_lines_1 (f->root_window, nlines - olines);
174 adjust_glyphs (f); 174 adjust_glyphs (f);
175 } 175 }
176} 176}
@@ -356,7 +356,7 @@ make_frame (int mini_p)
356 FSET (f, selected_window, root_window); 356 FSET (f, selected_window, root_window);
357 /* Make sure this window seems more recently used than 357 /* Make sure this window seems more recently used than
358 a newly-created, never-selected window. */ 358 a newly-created, never-selected window. */
359 XWINDOW (FGET (f, selected_window))->use_time = ++window_select_count; 359 XWINDOW (f->selected_window)->use_time = ++window_select_count;
360 360
361 return f; 361 return f;
362} 362}
@@ -398,8 +398,8 @@ make_frame_without_minibuffer (register Lisp_Object mini_window, KBOARD *kb, Lis
398 UNGCPRO; 398 UNGCPRO;
399 } 399 }
400 400
401 mini_window = FGET (XFRAME (KVAR (kb, Vdefault_minibuffer_frame)), 401 mini_window
402 minibuffer_window); 402 = XFRAME (KVAR (kb, Vdefault_minibuffer_frame))->minibuffer_window;
403 } 403 }
404 404
405 FSET (f, minibuffer_window, mini_window); 405 FSET (f, minibuffer_window, mini_window);
@@ -437,7 +437,7 @@ make_minibuffer_frame (void)
437 Avoid infinite looping on the window chain by marking next pointer 437 Avoid infinite looping on the window chain by marking next pointer
438 as nil. */ 438 as nil. */
439 439
440 mini_window = FSET (f, minibuffer_window, FGET (f, root_window)); 440 mini_window = FSET (f, minibuffer_window, f->root_window);
441 XWINDOW (mini_window)->mini = 1; 441 XWINDOW (mini_window)->mini = 1;
442 WSET (XWINDOW (mini_window), next, Qnil); 442 WSET (XWINDOW (mini_window), next, Qnil);
443 WSET (XWINDOW (mini_window), prev, Qnil); 443 WSET (XWINDOW (mini_window), prev, Qnil);
@@ -570,7 +570,7 @@ get_future_frame_param (Lisp_Object parameter,
570 570
571 result = Fassq (parameter, supplied_parms); 571 result = Fassq (parameter, supplied_parms);
572 if (NILP (result)) 572 if (NILP (result))
573 result = Fassq (parameter, FGET (XFRAME (selected_frame), param_alist)); 573 result = Fassq (parameter, XFRAME (selected_frame)->param_alist);
574 if (NILP (result) && current_value != NULL) 574 if (NILP (result) && current_value != NULL)
575 result = build_string (current_value); 575 result = build_string (current_value);
576 if (!NILP (result) && !STRINGP (result)) 576 if (!NILP (result) && !STRINGP (result))
@@ -689,11 +689,11 @@ affects all frames on the same terminal device. */)
689 689
690 /* Make the frame face alist be frame-specific, so that each 690 /* Make the frame face alist be frame-specific, so that each
691 frame could change its face definitions independently. */ 691 frame could change its face definitions independently. */
692 FSET (f, face_alist, Fcopy_alist (FGET (sf, face_alist))); 692 FSET (f, face_alist, Fcopy_alist (sf->face_alist));
693 /* Simple Fcopy_alist isn't enough, because we need the contents of 693 /* Simple Fcopy_alist isn't enough, because we need the contents of
694 the vectors which are the CDRs of associations in face_alist to 694 the vectors which are the CDRs of associations in face_alist to
695 be copied as well. */ 695 be copied as well. */
696 for (tem = FGET (f, face_alist); CONSP (tem); tem = XCDR (tem)) 696 for (tem = f->face_alist; CONSP (tem); tem = XCDR (tem))
697 XSETCDR (XCAR (tem), Fcopy_sequence (XCDR (XCAR (tem)))); 697 XSETCDR (XCAR (tem), Fcopy_sequence (XCDR (XCAR (tem))));
698 return frame; 698 return frame;
699} 699}
@@ -797,7 +797,7 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor
797 if (! FRAME_MINIBUF_ONLY_P (XFRAME (selected_frame))) 797 if (! FRAME_MINIBUF_ONLY_P (XFRAME (selected_frame)))
798 last_nonminibuf_frame = XFRAME (selected_frame); 798 last_nonminibuf_frame = XFRAME (selected_frame);
799 799
800 Fselect_window (FGET (XFRAME (frame), selected_window), norecord); 800 Fselect_window (XFRAME (frame)->selected_window, norecord);
801 801
802 /* We want to make sure that the next event generates a frame-switch 802 /* We want to make sure that the next event generates a frame-switch
803 event to the appropriate frame. This seems kludgy to me, but 803 event to the appropriate frame. This seems kludgy to me, but
@@ -1238,11 +1238,11 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
1238 } 1238 }
1239 1239
1240 /* Don't allow minibuf_window to remain on a deleted frame. */ 1240 /* Don't allow minibuf_window to remain on a deleted frame. */
1241 if (EQ (FGET (f, minibuffer_window), minibuf_window)) 1241 if (EQ (f->minibuffer_window, minibuf_window))
1242 { 1242 {
1243 Fset_window_buffer (FGET (sf, minibuffer_window), 1243 Fset_window_buffer (sf->minibuffer_window,
1244 WGET (XWINDOW (minibuf_window), buffer), Qnil); 1244 WGET (XWINDOW (minibuf_window), buffer), Qnil);
1245 minibuf_window = FGET (sf, minibuffer_window); 1245 minibuf_window = sf->minibuffer_window;
1246 1246
1247 /* If the dying minibuffer window was selected, 1247 /* If the dying minibuffer window was selected,
1248 select the new one. */ 1248 select the new one. */
@@ -1251,8 +1251,8 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
1251 } 1251 }
1252 1252
1253 /* Don't let echo_area_window to remain on a deleted frame. */ 1253 /* Don't let echo_area_window to remain on a deleted frame. */
1254 if (EQ (FGET (f, minibuffer_window), echo_area_window)) 1254 if (EQ (f->minibuffer_window, echo_area_window))
1255 echo_area_window = FGET (sf, minibuffer_window); 1255 echo_area_window = sf->minibuffer_window;
1256 1256
1257 /* Clear any X selections for this frame. */ 1257 /* Clear any X selections for this frame. */
1258#ifdef HAVE_X_WINDOWS 1258#ifdef HAVE_X_WINDOWS
@@ -1273,7 +1273,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
1273 1273
1274 /* Mark all the windows that used to be on FRAME as deleted, and then 1274 /* Mark all the windows that used to be on FRAME as deleted, and then
1275 remove the reference to them. */ 1275 remove the reference to them. */
1276 delete_all_child_windows (FGET (f, root_window)); 1276 delete_all_child_windows (f->root_window);
1277 FSET (f, root_window, Qnil); 1277 FSET (f, root_window, Qnil);
1278 1278
1279 Vframe_list = Fdelq (frame, Vframe_list); 1279 Vframe_list = Fdelq (frame, Vframe_list);
@@ -1656,7 +1656,7 @@ If omitted, FRAME defaults to the currently selected frame. */)
1656 } 1656 }
1657#endif 1657#endif
1658 1658
1659 make_frame_visible_1 (FGET (XFRAME (frame), root_window)); 1659 make_frame_visible_1 (XFRAME (frame)->root_window);
1660 1660
1661 /* Make menu bar update for the Buffers and Frames menus. */ 1661 /* Make menu bar update for the Buffers and Frames menus. */
1662 windows_or_buffers_changed++; 1662 windows_or_buffers_changed++;
@@ -1710,12 +1710,12 @@ displayed in the terminal. */)
1710 error ("Attempt to make invisible the sole visible or iconified frame"); 1710 error ("Attempt to make invisible the sole visible or iconified frame");
1711 1711
1712 /* Don't allow minibuf_window to remain on a deleted frame. */ 1712 /* Don't allow minibuf_window to remain on a deleted frame. */
1713 if (EQ (FGET (XFRAME (frame), minibuffer_window), minibuf_window)) 1713 if (EQ (XFRAME (frame)->minibuffer_window, minibuf_window))
1714 { 1714 {
1715 struct frame *sf = XFRAME (selected_frame); 1715 struct frame *sf = XFRAME (selected_frame);
1716 Fset_window_buffer (FGET (sf, minibuffer_window), 1716 Fset_window_buffer (sf->minibuffer_window,
1717 WGET (XWINDOW (minibuf_window), buffer), Qnil); 1717 WGET (XWINDOW (minibuf_window), buffer), Qnil);
1718 minibuf_window = FGET (sf, minibuffer_window); 1718 minibuf_window = sf->minibuffer_window;
1719 } 1719 }
1720 1720
1721 /* I think this should be done with a hook. */ 1721 /* I think this should be done with a hook. */
@@ -1748,12 +1748,12 @@ If omitted, FRAME defaults to the currently selected frame. */)
1748#endif 1748#endif
1749 1749
1750 /* Don't allow minibuf_window to remain on a deleted frame. */ 1750 /* Don't allow minibuf_window to remain on a deleted frame. */
1751 if (EQ (FGET (XFRAME (frame), minibuffer_window), minibuf_window)) 1751 if (EQ (XFRAME (frame)->minibuffer_window, minibuf_window))
1752 { 1752 {
1753 struct frame *sf = XFRAME (selected_frame); 1753 struct frame *sf = XFRAME (selected_frame);
1754 Fset_window_buffer (FGET (sf, minibuffer_window), 1754 Fset_window_buffer (sf->minibuffer_window,
1755 WGET (XWINDOW (minibuf_window), buffer), Qnil); 1755 WGET (XWINDOW (minibuf_window), buffer), Qnil);
1756 minibuf_window = FGET (sf, minibuffer_window); 1756 minibuf_window = sf->minibuffer_window;
1757 } 1757 }
1758 1758
1759 /* I think this should be done with a hook. */ 1759 /* I think this should be done with a hook. */
@@ -1940,7 +1940,7 @@ get_frame_param (register struct frame *frame, Lisp_Object prop)
1940{ 1940{
1941 register Lisp_Object tem; 1941 register Lisp_Object tem;
1942 1942
1943 tem = Fassq (prop, FGET (frame, param_alist)); 1943 tem = Fassq (prop, frame->param_alist);
1944 if (EQ (tem, Qnil)) 1944 if (EQ (tem, Qnil))
1945 return tem; 1945 return tem;
1946 return Fcdr (tem); 1946 return Fcdr (tem);
@@ -1952,7 +1952,7 @@ get_frame_param (register struct frame *frame, Lisp_Object prop)
1952Lisp_Object 1952Lisp_Object
1953frame_buffer_predicate (Lisp_Object frame) 1953frame_buffer_predicate (Lisp_Object frame)
1954{ 1954{
1955 return FGET (XFRAME (frame), buffer_predicate); 1955 return XFRAME (frame)->buffer_predicate;
1956} 1956}
1957 1957
1958/* Return the buffer-list of the selected frame. */ 1958/* Return the buffer-list of the selected frame. */
@@ -1960,7 +1960,7 @@ frame_buffer_predicate (Lisp_Object frame)
1960static Lisp_Object 1960static Lisp_Object
1961frame_buffer_list (Lisp_Object frame) 1961frame_buffer_list (Lisp_Object frame)
1962{ 1962{
1963 return FGET (XFRAME (frame), buffer_list); 1963 return XFRAME (frame)->buffer_list;
1964} 1964}
1965 1965
1966/* Discard BUFFER from the buffer-list and buried-buffer-list of each frame. */ 1966/* Discard BUFFER from the buffer-list and buried-buffer-list of each frame. */
@@ -1973,9 +1973,9 @@ frames_discard_buffer (Lisp_Object buffer)
1973 FOR_EACH_FRAME (tail, frame) 1973 FOR_EACH_FRAME (tail, frame)
1974 { 1974 {
1975 FSET (XFRAME (frame), buffer_list, 1975 FSET (XFRAME (frame), buffer_list,
1976 Fdelq (buffer, FGET (XFRAME (frame), buffer_list))); 1976 Fdelq (buffer, XFRAME (frame)->buffer_list));
1977 FSET (XFRAME (frame), buried_buffer_list, 1977 FSET (XFRAME (frame), buried_buffer_list,
1978 Fdelq (buffer, FGET (XFRAME (frame), buried_buffer_list))); 1978 Fdelq (buffer, XFRAME (frame)->buried_buffer_list));
1979 } 1979 }
1980} 1980}
1981 1981
@@ -2023,8 +2023,7 @@ set_term_frame_name (struct frame *f, Lisp_Object name)
2023 2023
2024 /* Check for no change needed in this very common case 2024 /* Check for no change needed in this very common case
2025 before we do any consing. */ 2025 before we do any consing. */
2026 if (frame_name_fnn_p (SSDATA (FGET (f, name)), 2026 if (frame_name_fnn_p (SSDATA (f->name), SBYTES (f->name)))
2027 SBYTES (FGET (f, name))))
2028 return; 2027 return;
2029 2028
2030 name = make_formatted_string (namebuf, "F%"pMd, ++tty_frame_count); 2029 name = make_formatted_string (namebuf, "F%"pMd, ++tty_frame_count);
@@ -2034,7 +2033,7 @@ set_term_frame_name (struct frame *f, Lisp_Object name)
2034 CHECK_STRING (name); 2033 CHECK_STRING (name);
2035 2034
2036 /* Don't change the name if it's already NAME. */ 2035 /* Don't change the name if it's already NAME. */
2037 if (! NILP (Fstring_equal (name, FGET (f, name)))) 2036 if (! NILP (Fstring_equal (name, f->name)))
2038 return; 2037 return;
2039 2038
2040 /* Don't allow the user to set the frame name to F<num>, so it 2039 /* Don't allow the user to set the frame name to F<num>, so it
@@ -2104,9 +2103,9 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
2104 FRAME_TTY (f)->previous_frame = NULL; 2103 FRAME_TTY (f)->previous_frame = NULL;
2105 2104
2106 /* Update the frame parameter alist. */ 2105 /* Update the frame parameter alist. */
2107 old_alist_elt = Fassq (prop, FGET (f, param_alist)); 2106 old_alist_elt = Fassq (prop, f->param_alist);
2108 if (EQ (old_alist_elt, Qnil)) 2107 if (EQ (old_alist_elt, Qnil))
2109 FSET (f, param_alist, Fcons (Fcons (prop, val), FGET (f, param_alist))); 2108 FSET (f, param_alist, Fcons (Fcons (prop, val), f->param_alist));
2110 else 2109 else
2111 Fsetcdr (old_alist_elt, val); 2110 Fsetcdr (old_alist_elt, val);
2112 2111
@@ -2130,7 +2129,7 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
2130 error ("Surrogate minibuffer windows must be minibuffer windows"); 2129 error ("Surrogate minibuffer windows must be minibuffer windows");
2131 2130
2132 if ((FRAME_HAS_MINIBUF_P (f) || FRAME_MINIBUF_ONLY_P (f)) 2131 if ((FRAME_HAS_MINIBUF_P (f) || FRAME_MINIBUF_ONLY_P (f))
2133 && !EQ (val, FGET (f, minibuffer_window))) 2132 && !EQ (val, f->minibuffer_window))
2134 error ("Can't change the surrogate minibuffer of a frame with its own minibuffer"); 2133 error ("Can't change the surrogate minibuffer of a frame with its own minibuffer");
2135 2134
2136 /* Install the chosen minibuffer window, with proper buffer. */ 2135 /* Install the chosen minibuffer window, with proper buffer. */
@@ -2159,7 +2158,7 @@ If FRAME is omitted, return information on the currently selected frame. */)
2159 if (!FRAME_LIVE_P (f)) 2158 if (!FRAME_LIVE_P (f))
2160 return Qnil; 2159 return Qnil;
2161 2160
2162 alist = Fcopy_alist (FGET (f, param_alist)); 2161 alist = Fcopy_alist (f->param_alist);
2163 GCPRO1 (alist); 2162 GCPRO1 (alist);
2164 2163
2165 if (!FRAME_WINDOW_P (f)) 2164 if (!FRAME_WINDOW_P (f))
@@ -2205,7 +2204,7 @@ If FRAME is omitted, return information on the currently selected frame. */)
2205 : FRAME_W32_P (f) ? "w32term" 2204 : FRAME_W32_P (f) ? "w32term"
2206 :"tty")); 2205 :"tty"));
2207 } 2206 }
2208 store_in_alist (&alist, Qname, FGET (f, name)); 2207 store_in_alist (&alist, Qname, f->name);
2209 height = (f->new_text_lines ? f->new_text_lines : FRAME_LINES (f)); 2208 height = (f->new_text_lines ? f->new_text_lines : FRAME_LINES (f));
2210 store_in_alist (&alist, Qheight, make_number (height)); 2209 store_in_alist (&alist, Qheight, make_number (height));
2211 width = (f->new_text_cols ? f->new_text_cols : FRAME_COLS (f)); 2210 width = (f->new_text_cols ? f->new_text_cols : FRAME_COLS (f));
@@ -2218,7 +2217,7 @@ If FRAME is omitted, return information on the currently selected frame. */)
2218 store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil)); 2217 store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil));
2219 store_in_alist (&alist, Qbuffer_list, frame_buffer_list (frame)); 2218 store_in_alist (&alist, Qbuffer_list, frame_buffer_list (frame));
2220 store_in_alist (&alist, Qburied_buffer_list, 2219 store_in_alist (&alist, Qburied_buffer_list,
2221 FGET (XFRAME (frame), buried_buffer_list)); 2220 XFRAME (frame)->buried_buffer_list);
2222 2221
2223 /* I think this should be done with a hook. */ 2222 /* I think this should be done with a hook. */
2224#ifdef HAVE_WINDOW_SYSTEM 2223#ifdef HAVE_WINDOW_SYSTEM
@@ -2259,7 +2258,7 @@ If FRAME is nil, describe the currently selected frame. */)
2259 { 2258 {
2260 /* Avoid consing in frequent cases. */ 2259 /* Avoid consing in frequent cases. */
2261 if (EQ (parameter, Qname)) 2260 if (EQ (parameter, Qname))
2262 value = FGET (f, name); 2261 value = f->name;
2263#ifdef HAVE_X_WINDOWS 2262#ifdef HAVE_X_WINDOWS
2264 else if (EQ (parameter, Qdisplay) && FRAME_X_P (f)) 2263 else if (EQ (parameter, Qdisplay) && FRAME_X_P (f))
2265 value = XCAR (FRAME_X_DISPLAY_INFO (f)->name_list_element); 2264 value = XCAR (FRAME_X_DISPLAY_INFO (f)->name_list_element);
@@ -2267,7 +2266,7 @@ If FRAME is nil, describe the currently selected frame. */)
2267 else if (EQ (parameter, Qbackground_color) 2266 else if (EQ (parameter, Qbackground_color)
2268 || EQ (parameter, Qforeground_color)) 2267 || EQ (parameter, Qforeground_color))
2269 { 2268 {
2270 value = Fassq (parameter, FGET (f, param_alist)); 2269 value = Fassq (parameter, f->param_alist);
2271 if (CONSP (value)) 2270 if (CONSP (value))
2272 { 2271 {
2273 value = XCDR (value); 2272 value = XCDR (value);
@@ -2305,7 +2304,7 @@ If FRAME is nil, describe the currently selected frame. */)
2305 } 2304 }
2306 else if (EQ (parameter, Qdisplay_type) 2305 else if (EQ (parameter, Qdisplay_type)
2307 || EQ (parameter, Qbackground_mode)) 2306 || EQ (parameter, Qbackground_mode))
2308 value = Fcdr (Fassq (parameter, FGET (f, param_alist))); 2307 value = Fcdr (Fassq (parameter, f->param_alist));
2309 else 2308 else
2310 /* FIXME: Avoid this code path at all (as well as code duplication) 2309 /* FIXME: Avoid this code path at all (as well as code duplication)
2311 by sharing more code with Fframe_parameters. */ 2310 by sharing more code with Fframe_parameters. */
@@ -2891,14 +2890,14 @@ x_set_frame_parameters (FRAME_PTR f, Lisp_Object alist)
2891 if (! TYPE_RANGED_INTEGERP (int, icon_left)) 2890 if (! TYPE_RANGED_INTEGERP (int, icon_left))
2892 { 2891 {
2893 icon_left_no_change = 1; 2892 icon_left_no_change = 1;
2894 icon_left = Fcdr (Fassq (Qicon_left, FGET (f, param_alist))); 2893 icon_left = Fcdr (Fassq (Qicon_left, f->param_alist));
2895 if (NILP (icon_left)) 2894 if (NILP (icon_left))
2896 XSETINT (icon_left, 0); 2895 XSETINT (icon_left, 0);
2897 } 2896 }
2898 if (! TYPE_RANGED_INTEGERP (int, icon_top)) 2897 if (! TYPE_RANGED_INTEGERP (int, icon_top))
2899 { 2898 {
2900 icon_top_no_change = 1; 2899 icon_top_no_change = 1;
2901 icon_top = Fcdr (Fassq (Qicon_top, FGET (f, param_alist))); 2900 icon_top = Fcdr (Fassq (Qicon_top, f->param_alist));
2902 if (NILP (icon_top)) 2901 if (NILP (icon_top))
2903 XSETINT (icon_top, 0); 2902 XSETINT (icon_top, 0);
2904 } 2903 }
@@ -3058,7 +3057,7 @@ x_report_frame_params (struct frame *f, Lisp_Object *alistptr)
3058 store_in_alist (alistptr, Qouter_window_id, 3057 store_in_alist (alistptr, Qouter_window_id,
3059 make_formatted_string (buf, "%lu", w)); 3058 make_formatted_string (buf, "%lu", w));
3060#endif 3059#endif
3061 store_in_alist (alistptr, Qicon_name, FGET (f, icon_name)); 3060 store_in_alist (alistptr, Qicon_name, f->icon_name);
3062 FRAME_SAMPLE_VISIBILITY (f); 3061 FRAME_SAMPLE_VISIBILITY (f);
3063 store_in_alist (alistptr, Qvisibility, 3062 store_in_alist (alistptr, Qvisibility,
3064 (FRAME_VISIBLE_P (f) ? Qt 3063 (FRAME_VISIBLE_P (f) ? Qt
@@ -3072,7 +3071,7 @@ x_report_frame_params (struct frame *f, Lisp_Object *alistptr)
3072 XSETFASTINT (tem, FRAME_X_OUTPUT (f)->parent_desc); 3071 XSETFASTINT (tem, FRAME_X_OUTPUT (f)->parent_desc);
3073 store_in_alist (alistptr, Qexplicit_name, (f->explicit_name ? Qt : Qnil)); 3072 store_in_alist (alistptr, Qexplicit_name, (f->explicit_name ? Qt : Qnil));
3074 store_in_alist (alistptr, Qparent_id, tem); 3073 store_in_alist (alistptr, Qparent_id, tem);
3075 store_in_alist (alistptr, Qtool_bar_position, FGET (f, tool_bar_position)); 3074 store_in_alist (alistptr, Qtool_bar_position, f->tool_bar_position);
3076} 3075}
3077 3076
3078 3077
@@ -3132,7 +3131,7 @@ x_set_screen_gamma (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
3132 signal_error ("Invalid screen-gamma", new_value); 3131 signal_error ("Invalid screen-gamma", new_value);
3133 3132
3134 /* Apply the new gamma value to the frame background. */ 3133 /* Apply the new gamma value to the frame background. */
3135 bgcolor = Fassq (Qbackground_color, FGET (f, param_alist)); 3134 bgcolor = Fassq (Qbackground_color, f->param_alist);
3136 if (CONSP (bgcolor) && (bgcolor = XCDR (bgcolor), STRINGP (bgcolor))) 3135 if (CONSP (bgcolor) && (bgcolor = XCDR (bgcolor), STRINGP (bgcolor)))
3137 { 3136 {
3138 Lisp_Object parm_index = Fget (Qbackground_color, Qx_frame_parameter); 3137 Lisp_Object parm_index = Fget (Qbackground_color, Qx_frame_parameter);
@@ -3461,7 +3460,7 @@ x_icon_type (FRAME_PTR f)
3461{ 3460{
3462 Lisp_Object tem; 3461 Lisp_Object tem;
3463 3462
3464 tem = assq_no_quit (Qicon_type, FGET (f, param_alist)); 3463 tem = assq_no_quit (Qicon_type, f->param_alist);
3465 if (CONSP (tem)) 3464 if (CONSP (tem))
3466 return XCDR (tem); 3465 return XCDR (tem);
3467 else 3466 else
diff --git a/src/frame.h b/src/frame.h
index 7c4ccc17bff..3af4c54589a 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -80,15 +80,9 @@ struct terminal;
80 80
81struct font_driver_list; 81struct font_driver_list;
82 82
83/* Most code should use these macros to access Lisp fields 83/* Most code should use this macro to set Lisp field in struct frame. */
84 in struct frame. FGET should not be used as lvalue. */
85 84
86#define FGET(f, field) \ 85#define FSET(f, field, value) ((f)->field = (value))
87 (eassert (offsetof (struct frame, field ## _) \
88 < offsetof (struct frame, face_cache)), \
89 ((f)->INTERNAL_FIELD (field)))
90
91#define FSET(f, field, value) ((f)->INTERNAL_FIELD (field) = (value))
92 86
93struct frame 87struct frame
94{ 88{
@@ -99,15 +93,15 @@ struct frame
99 93
100 /* Name of this frame: a Lisp string. It is used for looking up resources, 94 /* Name of this frame: a Lisp string. It is used for looking up resources,
101 as well as for the title in some cases. */ 95 as well as for the title in some cases. */
102 Lisp_Object INTERNAL_FIELD (name); 96 Lisp_Object name;
103 97
104 /* The name to use for the icon, the last time 98 /* The name to use for the icon, the last time
105 it was refreshed. nil means not explicitly specified. */ 99 it was refreshed. nil means not explicitly specified. */
106 Lisp_Object INTERNAL_FIELD (icon_name); 100 Lisp_Object icon_name;
107 101
108 /* This is the frame title specified explicitly, if any. 102 /* This is the frame title specified explicitly, if any.
109 Usually it is nil. */ 103 Usually it is nil. */
110 Lisp_Object INTERNAL_FIELD (title); 104 Lisp_Object title;
111 105
112 /* The frame which should receive keystrokes that occur in this 106 /* The frame which should receive keystrokes that occur in this
113 frame, or nil if they should go to the frame itself. This is 107 frame, or nil if they should go to the frame itself. This is
@@ -120,29 +114,29 @@ struct frame
120 to shift from one frame to the other, any redirections to the 114 to shift from one frame to the other, any redirections to the
121 original frame are shifted to the newly selected frame; if 115 original frame are shifted to the newly selected frame; if
122 focus_frame is nil, Fselect_frame will leave it alone. */ 116 focus_frame is nil, Fselect_frame will leave it alone. */
123 Lisp_Object INTERNAL_FIELD (focus_frame); 117 Lisp_Object focus_frame;
124 118
125 /* This frame's root window. Every frame has one. 119 /* This frame's root window. Every frame has one.
126 If the frame has only a minibuffer window, this is it. 120 If the frame has only a minibuffer window, this is it.
127 Otherwise, if the frame has a minibuffer window, this is its sibling. */ 121 Otherwise, if the frame has a minibuffer window, this is its sibling. */
128 Lisp_Object INTERNAL_FIELD (root_window); 122 Lisp_Object root_window;
129 123
130 /* This frame's selected window. 124 /* This frame's selected window.
131 Each frame has its own window hierarchy 125 Each frame has its own window hierarchy
132 and one of the windows in it is selected within the frame. 126 and one of the windows in it is selected within the frame.
133 The selected window of the selected frame is Emacs's selected window. */ 127 The selected window of the selected frame is Emacs's selected window. */
134 Lisp_Object INTERNAL_FIELD (selected_window); 128 Lisp_Object selected_window;
135 129
136 /* This frame's minibuffer window. 130 /* This frame's minibuffer window.
137 Most frames have their own minibuffer windows, 131 Most frames have their own minibuffer windows,
138 but only the selected frame's minibuffer window 132 but only the selected frame's minibuffer window
139 can actually appear to exist. */ 133 can actually appear to exist. */
140 Lisp_Object INTERNAL_FIELD (minibuffer_window); 134 Lisp_Object minibuffer_window;
141 135
142 /* Parameter alist of this frame. 136 /* Parameter alist of this frame.
143 These are the parameters specified when creating the frame 137 These are the parameters specified when creating the frame
144 or modified with modify-frame-parameters. */ 138 or modified with modify-frame-parameters. */
145 Lisp_Object INTERNAL_FIELD (param_alist); 139 Lisp_Object param_alist;
146 140
147 /* List of scroll bars on this frame. 141 /* List of scroll bars on this frame.
148 Actually, we don't specify exactly what is stored here at all; the 142 Actually, we don't specify exactly what is stored here at all; the
@@ -151,51 +145,51 @@ struct frame
151 instead of in the `device' structure so that the garbage 145 instead of in the `device' structure so that the garbage
152 collector doesn't need to look inside the window-system-dependent 146 collector doesn't need to look inside the window-system-dependent
153 structure. */ 147 structure. */
154 Lisp_Object INTERNAL_FIELD (scroll_bars); 148 Lisp_Object scroll_bars;
155 Lisp_Object INTERNAL_FIELD (condemned_scroll_bars); 149 Lisp_Object condemned_scroll_bars;
156 150
157 /* Vector describing the items to display in the menu bar. 151 /* Vector describing the items to display in the menu bar.
158 Each item has four elements in this vector. 152 Each item has four elements in this vector.
159 They are KEY, STRING, SUBMAP, and HPOS. 153 They are KEY, STRING, SUBMAP, and HPOS.
160 (HPOS is not used in when the X toolkit is in use.) 154 (HPOS is not used in when the X toolkit is in use.)
161 There are four additional elements of nil at the end, to terminate. */ 155 There are four additional elements of nil at the end, to terminate. */
162 Lisp_Object INTERNAL_FIELD (menu_bar_items); 156 Lisp_Object menu_bar_items;
163 157
164 /* Alist of elements (FACE-NAME . FACE-VECTOR-DATA). */ 158 /* Alist of elements (FACE-NAME . FACE-VECTOR-DATA). */
165 Lisp_Object INTERNAL_FIELD (face_alist); 159 Lisp_Object face_alist;
166 160
167 /* A vector that records the entire structure of this frame's menu bar. 161 /* A vector that records the entire structure of this frame's menu bar.
168 For the format of the data, see extensive comments in xmenu.c. 162 For the format of the data, see extensive comments in xmenu.c.
169 Only the X toolkit version uses this. */ 163 Only the X toolkit version uses this. */
170 Lisp_Object INTERNAL_FIELD (menu_bar_vector); 164 Lisp_Object menu_bar_vector;
171 165
172 /* Predicate for selecting buffers for other-buffer. */ 166 /* Predicate for selecting buffers for other-buffer. */
173 Lisp_Object INTERNAL_FIELD (buffer_predicate); 167 Lisp_Object buffer_predicate;
174 168
175 /* List of buffers viewed in this frame, for other-buffer. */ 169 /* List of buffers viewed in this frame, for other-buffer. */
176 Lisp_Object INTERNAL_FIELD (buffer_list); 170 Lisp_Object buffer_list;
177 171
178 /* List of buffers that were viewed, then buried in this frame. The 172 /* List of buffers that were viewed, then buried in this frame. The
179 most recently buried buffer is first. For last-buffer. */ 173 most recently buried buffer is first. For last-buffer. */
180 Lisp_Object INTERNAL_FIELD (buried_buffer_list); 174 Lisp_Object buried_buffer_list;
181 175
182 /* A dummy window used to display menu bars under X when no X 176 /* A dummy window used to display menu bars under X when no X
183 toolkit support is available. */ 177 toolkit support is available. */
184 Lisp_Object INTERNAL_FIELD (menu_bar_window); 178 Lisp_Object menu_bar_window;
185 179
186 /* A window used to display the tool-bar of a frame. */ 180 /* A window used to display the tool-bar of a frame. */
187 Lisp_Object INTERNAL_FIELD (tool_bar_window); 181 Lisp_Object tool_bar_window;
188 182
189 /* Desired and current tool-bar items. */ 183 /* Desired and current tool-bar items. */
190 Lisp_Object INTERNAL_FIELD (tool_bar_items); 184 Lisp_Object tool_bar_items;
191 185
192 /* Where tool bar is, can be left, right, top or bottom. The native 186 /* Where tool bar is, can be left, right, top or bottom. The native
193 tool bar only supports top. */ 187 tool bar only supports top. */
194 Lisp_Object INTERNAL_FIELD (tool_bar_position); 188 Lisp_Object tool_bar_position;
195 189
196 /* Desired and current contents displayed in tool_bar_window. */ 190 /* Desired and current contents displayed in tool_bar_window. */
197 Lisp_Object INTERNAL_FIELD (desired_tool_bar_string); 191 Lisp_Object desired_tool_bar_string;
198 Lisp_Object INTERNAL_FIELD (current_tool_bar_string); 192 Lisp_Object current_tool_bar_string;
199 193
200 /* Beyond here, there should be no more Lisp_Object components. */ 194 /* Beyond here, there should be no more Lisp_Object components. */
201 195
@@ -646,13 +640,13 @@ typedef struct frame *FRAME_PTR;
646#define FRAME_WINDOW_SIZES_CHANGED(f) (f)->window_sizes_changed 640#define FRAME_WINDOW_SIZES_CHANGED(f) (f)->window_sizes_changed
647 641
648/* The minibuffer window of frame F, if it has one; otherwise nil. */ 642/* The minibuffer window of frame F, if it has one; otherwise nil. */
649#define FRAME_MINIBUF_WINDOW(f) FGET (f, minibuffer_window) 643#define FRAME_MINIBUF_WINDOW(f) f->minibuffer_window
650 644
651/* The root window of the window tree of frame F. */ 645/* The root window of the window tree of frame F. */
652#define FRAME_ROOT_WINDOW(f) FGET (f, root_window) 646#define FRAME_ROOT_WINDOW(f) f->root_window
653 647
654/* The currently selected window of the window tree of frame F. */ 648/* The currently selected window of the window tree of frame F. */
655#define FRAME_SELECTED_WINDOW(f) FGET (f, selected_window) 649#define FRAME_SELECTED_WINDOW(f) f->selected_window
656 650
657#define FRAME_INSERT_COST(f) (f)->insert_line_cost 651#define FRAME_INSERT_COST(f) (f)->insert_line_cost
658#define FRAME_DELETE_COST(f) (f)->delete_line_cost 652#define FRAME_DELETE_COST(f) (f)->delete_line_cost
@@ -660,7 +654,7 @@ typedef struct frame *FRAME_PTR;
660#define FRAME_DELETEN_COST(f) (f)->delete_n_lines_cost 654#define FRAME_DELETEN_COST(f) (f)->delete_n_lines_cost
661#define FRAME_MESSAGE_BUF(f) (f)->message_buf 655#define FRAME_MESSAGE_BUF(f) (f)->message_buf
662#define FRAME_SCROLL_BOTTOM_VPOS(f) (f)->scroll_bottom_vpos 656#define FRAME_SCROLL_BOTTOM_VPOS(f) (f)->scroll_bottom_vpos
663#define FRAME_FOCUS_FRAME(f) FGET (f, focus_frame) 657#define FRAME_FOCUS_FRAME(f) f->focus_frame
664 658
665/* Nonzero if frame F supports scroll bars. 659/* Nonzero if frame F supports scroll bars.
666 If this is zero, then it is impossible to enable scroll bars 660 If this is zero, then it is impossible to enable scroll bars
@@ -761,10 +755,10 @@ typedef struct frame *FRAME_PTR;
761 755
762/* Nonzero if frame F has scroll bars. */ 756/* Nonzero if frame F has scroll bars. */
763 757
764#define FRAME_SCROLL_BARS(f) (FGET (f, scroll_bars)) 758#define FRAME_SCROLL_BARS(f) (f->scroll_bars)
765 759
766#define FRAME_CONDEMNED_SCROLL_BARS(f) (FGET (f, condemned_scroll_bars)) 760#define FRAME_CONDEMNED_SCROLL_BARS(f) (f->condemned_scroll_bars)
767#define FRAME_MENU_BAR_ITEMS(f) (FGET (f, menu_bar_items)) 761#define FRAME_MENU_BAR_ITEMS(f) (f->menu_bar_items)
768#define FRAME_COST_BAUD_RATE(f) ((f)->cost_calculation_baud_rate) 762#define FRAME_COST_BAUD_RATE(f) ((f)->cost_calculation_baud_rate)
769 763
770#define FRAME_DESIRED_CURSOR(f) ((f)->desired_cursor) 764#define FRAME_DESIRED_CURSOR(f) ((f)->desired_cursor)
@@ -832,10 +826,10 @@ typedef struct frame *FRAME_PTR;
832 supported. An alternate definition of the macro would expand to 826 supported. An alternate definition of the macro would expand to
833 something which executes the statement once. */ 827 something which executes the statement once. */
834 828
835#define FOR_EACH_FRAME(list_var, frame_var) \ 829#define FOR_EACH_FRAME(list_var, frame_var) \
836 for ((list_var) = Vframe_list; \ 830 for ((list_var) = Vframe_list; \
837 (CONSP (list_var) \ 831 (CONSP (list_var) \
838 && (frame_var = XCAR (list_var), 1)); \ 832 && (frame_var = XCAR (list_var), 1)); \
839 list_var = XCDR (list_var)) 833 list_var = XCDR (list_var))
840 834
841 835
diff --git a/src/fringe.c b/src/fringe.c
index 25ab1ad665c..4a751439305 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -1338,8 +1338,8 @@ compute_fringe_widths (struct frame *f, int redraw)
1338 int o_right = FRAME_RIGHT_FRINGE_WIDTH (f); 1338 int o_right = FRAME_RIGHT_FRINGE_WIDTH (f);
1339 int o_cols = FRAME_FRINGE_COLS (f); 1339 int o_cols = FRAME_FRINGE_COLS (f);
1340 1340
1341 Lisp_Object left_fringe = Fassq (Qleft_fringe, FGET (f, param_alist)); 1341 Lisp_Object left_fringe = Fassq (Qleft_fringe, f->param_alist);
1342 Lisp_Object right_fringe = Fassq (Qright_fringe, FGET (f, param_alist)); 1342 Lisp_Object right_fringe = Fassq (Qright_fringe, f->param_alist);
1343 int left_fringe_width, right_fringe_width; 1343 int left_fringe_width, right_fringe_width;
1344 1344
1345 if (!NILP (left_fringe)) 1345 if (!NILP (left_fringe))
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 478f9f304c5..4879479201a 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1148,10 +1148,10 @@ xg_create_frame_widgets (FRAME_PTR f)
1148 gtk_widget_set_name (wfixed, SSDATA (Vx_resource_name)); 1148 gtk_widget_set_name (wfixed, SSDATA (Vx_resource_name));
1149 1149
1150 /* If this frame has a title or name, set it in the title bar. */ 1150 /* If this frame has a title or name, set it in the title bar. */
1151 if (! NILP (FGET (f, title))) 1151 if (! NILP (f->title))
1152 title = SSDATA (ENCODE_UTF_8 (FGET (f, title))); 1152 title = SSDATA (ENCODE_UTF_8 (f->title));
1153 else if (! NILP (FGET (f, name))) 1153 else if (! NILP (f->name))
1154 title = SSDATA (ENCODE_UTF_8 (FGET (f, name))); 1154 title = SSDATA (ENCODE_UTF_8 (f->name));
1155 1155
1156 if (title) gtk_window_set_title (GTK_WINDOW (wtop), title); 1156 if (title) gtk_window_set_title (GTK_WINDOW (wtop), title);
1157 1157
@@ -2061,7 +2061,7 @@ make_cl_data (xg_menu_cb_data *cl_data, FRAME_PTR f, GCallback highlight_cb)
2061 { 2061 {
2062 cl_data = xmalloc (sizeof *cl_data); 2062 cl_data = xmalloc (sizeof *cl_data);
2063 cl_data->f = f; 2063 cl_data->f = f;
2064 cl_data->menu_bar_vector = FGET (f, menu_bar_vector); 2064 cl_data->menu_bar_vector = f->menu_bar_vector;
2065 cl_data->menu_bar_items_used = f->menu_bar_items_used; 2065 cl_data->menu_bar_items_used = f->menu_bar_items_used;
2066 cl_data->highlight_cb = highlight_cb; 2066 cl_data->highlight_cb = highlight_cb;
2067 cl_data->ref_count = 0; 2067 cl_data->ref_count = 0;
@@ -2093,7 +2093,7 @@ update_cl_data (xg_menu_cb_data *cl_data,
2093 if (cl_data) 2093 if (cl_data)
2094 { 2094 {
2095 cl_data->f = f; 2095 cl_data->f = f;
2096 cl_data->menu_bar_vector = FGET (f, menu_bar_vector); 2096 cl_data->menu_bar_vector = f->menu_bar_vector;
2097 cl_data->menu_bar_items_used = f->menu_bar_items_used; 2097 cl_data->menu_bar_items_used = f->menu_bar_items_used;
2098 cl_data->highlight_cb = highlight_cb; 2098 cl_data->highlight_cb = highlight_cb;
2099 } 2099 }
@@ -3810,12 +3810,12 @@ xg_tool_bar_callback (GtkWidget *w, gpointer client_data)
3810 struct input_event event; 3810 struct input_event event;
3811 EVENT_INIT (event); 3811 EVENT_INIT (event);
3812 3812
3813 if (! f || ! f->n_tool_bar_items || NILP (FGET (f, tool_bar_items))) 3813 if (! f || ! f->n_tool_bar_items || NILP (f->tool_bar_items))
3814 return; 3814 return;
3815 3815
3816 idx *= TOOL_BAR_ITEM_NSLOTS; 3816 idx *= TOOL_BAR_ITEM_NSLOTS;
3817 3817
3818 key = AREF (FGET (f, tool_bar_items), idx + TOOL_BAR_ITEM_KEY); 3818 key = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_KEY);
3819 XSETFRAME (frame, f); 3819 XSETFRAME (frame, f);
3820 3820
3821 /* We generate two events here. The first one is to set the prefix 3821 /* We generate two events here. The first one is to set the prefix
@@ -4086,16 +4086,16 @@ xg_tool_bar_help_callback (GtkWidget *w,
4086 FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); 4086 FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA);
4087 Lisp_Object help, frame; 4087 Lisp_Object help, frame;
4088 4088
4089 if (! f || ! f->n_tool_bar_items || NILP (FGET (f, tool_bar_items))) 4089 if (! f || ! f->n_tool_bar_items || NILP (f->tool_bar_items))
4090 return FALSE; 4090 return FALSE;
4091 4091
4092 if (event->type == GDK_ENTER_NOTIFY) 4092 if (event->type == GDK_ENTER_NOTIFY)
4093 { 4093 {
4094 idx *= TOOL_BAR_ITEM_NSLOTS; 4094 idx *= TOOL_BAR_ITEM_NSLOTS;
4095 help = AREF (FGET (f, tool_bar_items), idx + TOOL_BAR_ITEM_HELP); 4095 help = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_HELP);
4096 4096
4097 if (NILP (help)) 4097 if (NILP (help))
4098 help = AREF (FGET (f, tool_bar_items), idx + TOOL_BAR_ITEM_CAPTION); 4098 help = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_CAPTION);
4099 } 4099 }
4100 else 4100 else
4101 help = Qnil; 4101 help = Qnil;
@@ -4223,7 +4223,7 @@ xg_create_tool_bar (FRAME_PTR f)
4223} 4223}
4224 4224
4225 4225
4226#define PROP(IDX) AREF (FGET (f, tool_bar_items), i * TOOL_BAR_ITEM_NSLOTS + (IDX)) 4226#define PROP(IDX) AREF (f->tool_bar_items, i * TOOL_BAR_ITEM_NSLOTS + (IDX))
4227 4227
4228/* Find the right-to-left image named by RTL in the tool bar images for F. 4228/* Find the right-to-left image named by RTL in the tool bar images for F.
4229 Returns IMAGE if RTL is not found. */ 4229 Returns IMAGE if RTL is not found. */
@@ -4706,7 +4706,7 @@ update_frame_tool_bar (FRAME_PTR f)
4706 if (f->n_tool_bar_items != 0) 4706 if (f->n_tool_bar_items != 0)
4707 { 4707 {
4708 if (pack_tool_bar) 4708 if (pack_tool_bar)
4709 xg_pack_tool_bar (f, FGET (f, tool_bar_position)); 4709 xg_pack_tool_bar (f, f->tool_bar_position);
4710 gtk_widget_show_all (GTK_WIDGET (x->handlebox_widget)); 4710 gtk_widget_show_all (GTK_WIDGET (x->handlebox_widget));
4711 if (xg_update_tool_bar_sizes (f)) 4711 if (xg_update_tool_bar_sizes (f))
4712 xg_height_or_width_changed (f); 4712 xg_height_or_width_changed (f);
diff --git a/src/minibuf.c b/src/minibuf.c
index 4ef433b3c86..ec8148e9024 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -102,14 +102,14 @@ choose_minibuf_frame (void)
102{ 102{
103 if (FRAMEP (selected_frame) 103 if (FRAMEP (selected_frame)
104 && FRAME_LIVE_P (XFRAME (selected_frame)) 104 && FRAME_LIVE_P (XFRAME (selected_frame))
105 && !EQ (minibuf_window, FGET (XFRAME (selected_frame), minibuffer_window))) 105 && !EQ (minibuf_window, XFRAME (selected_frame)->minibuffer_window))
106 { 106 {
107 struct frame *sf = XFRAME (selected_frame); 107 struct frame *sf = XFRAME (selected_frame);
108 Lisp_Object buffer; 108 Lisp_Object buffer;
109 109
110 /* I don't think that any frames may validly have a null minibuffer 110 /* I don't think that any frames may validly have a null minibuffer
111 window anymore. */ 111 window anymore. */
112 if (NILP (FGET (sf, minibuffer_window))) 112 if (NILP (sf->minibuffer_window))
113 abort (); 113 abort ();
114 114
115 /* Under X, we come here with minibuf_window being the 115 /* Under X, we come here with minibuf_window being the
@@ -117,8 +117,8 @@ choose_minibuf_frame (void)
117 init_window_once. That window doesn't have a buffer. */ 117 init_window_once. That window doesn't have a buffer. */
118 buffer = WGET (XWINDOW (minibuf_window), buffer); 118 buffer = WGET (XWINDOW (minibuf_window), buffer);
119 if (BUFFERP (buffer)) 119 if (BUFFERP (buffer))
120 Fset_window_buffer (FGET (sf, minibuffer_window), buffer, Qnil); 120 Fset_window_buffer (sf->minibuffer_window, buffer, Qnil);
121 minibuf_window = FGET (sf, minibuffer_window); 121 minibuf_window = sf->minibuffer_window;
122 } 122 }
123 123
124 /* Make sure no other frame has a minibuffer as its selected window, 124 /* Make sure no other frame has a minibuffer as its selected window,
diff --git a/src/msdos.c b/src/msdos.c
index cc206b6643c..4cb7f94ae3d 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -1318,8 +1318,8 @@ IT_frame_up_to_date (struct frame *f)
1318 frame parameters. For the selected window, we use either its 1318 frame parameters. For the selected window, we use either its
1319 buffer-local value or the value from the frame parameters if the 1319 buffer-local value or the value from the frame parameters if the
1320 buffer doesn't define its local value for the cursor type. */ 1320 buffer doesn't define its local value for the cursor type. */
1321 sw = XWINDOW (FGET (f, selected_window)); 1321 sw = XWINDOW (f->selected_window);
1322 frame_desired_cursor = Fcdr (Fassq (Qcursor_type, FGET (f, param_alist))); 1322 frame_desired_cursor = Fcdr (Fassq (Qcursor_type, f->param_alist));
1323 if (cursor_in_echo_area 1323 if (cursor_in_echo_area
1324 && FRAME_HAS_MINIBUF_P (f) 1324 && FRAME_HAS_MINIBUF_P (f)
1325 && EQ (FRAME_MINIBUF_WINDOW (f), echo_area_window) 1325 && EQ (FRAME_MINIBUF_WINDOW (f), echo_area_window)
@@ -1598,7 +1598,7 @@ IT_set_frame_parameters (struct frame *f, Lisp_Object alist)
1598 Lisp_Object *values 1598 Lisp_Object *values
1599 = (Lisp_Object *) alloca (length * word_size); 1599 = (Lisp_Object *) alloca (length * word_size);
1600 /* Do we have to reverse the foreground and background colors? */ 1600 /* Do we have to reverse the foreground and background colors? */
1601 int reverse = EQ (Fcdr (Fassq (Qreverse, FGET (f, param_alist))), Qt); 1601 int reverse = EQ (Fcdr (Fassq (Qreverse, f->param_alist)), Qt);
1602 int redraw = 0, fg_set = 0, bg_set = 0; 1602 int redraw = 0, fg_set = 0, bg_set = 0;
1603 unsigned long orig_fg, orig_bg; 1603 unsigned long orig_fg, orig_bg;
1604 struct tty_display_info *tty = FRAME_TTY (f); 1604 struct tty_display_info *tty = FRAME_TTY (f);
diff --git a/src/nsfns.m b/src/nsfns.m
index 98477c90094..a15caf9b905 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -452,12 +452,12 @@ x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
452 452
453 if (NILP (arg)) 453 if (NILP (arg))
454 { 454 {
455 if (!NILP (FGET (f, title))) 455 if (!NILP (f->title))
456 arg = FGET (f, title); 456 arg = f->title;
457 else 457 else
458 /* explicit name and no icon-name -> explicit_name */ 458 /* explicit name and no icon-name -> explicit_name */
459 if (f->explicit_name) 459 if (f->explicit_name)
460 arg = FGET (f, name); 460 arg = f->name;
461 else 461 else
462 { 462 {
463 /* no explicit name and no icon-name -> 463 /* no explicit name and no icon-name ->
@@ -496,10 +496,10 @@ ns_set_name_internal (FRAME_PTR f, Lisp_Object name)
496 if (! [[[view window] title] isEqualToString: str]) 496 if (! [[[view window] title] isEqualToString: str])
497 [[view window] setTitle: str]; 497 [[view window] setTitle: str];
498 498
499 if (!STRINGP (FGET (f, icon_name))) 499 if (!STRINGP (f->icon_name))
500 encoded_icon_name = encoded_name; 500 encoded_icon_name = encoded_name;
501 else 501 else
502 encoded_icon_name = ENCODE_UTF_8 (FGET (f, icon_name)); 502 encoded_icon_name = ENCODE_UTF_8 (f->icon_name);
503 503
504 str = [NSString stringWithUTF8String: SSDATA (encoded_icon_name)]; 504 str = [NSString stringWithUTF8String: SSDATA (encoded_icon_name)];
505 505
@@ -537,14 +537,14 @@ ns_set_name (struct frame *f, Lisp_Object name, int explicit)
537 CHECK_STRING (name); 537 CHECK_STRING (name);
538 538
539 /* Don't change the name if it's already NAME. */ 539 /* Don't change the name if it's already NAME. */
540 if (! NILP (Fstring_equal (name, FGET (f, name)))) 540 if (! NILP (Fstring_equal (name, f->name)))
541 return; 541 return;
542 542
543 FSET (f, name, name); 543 FSET (f, name, name);
544 544
545 /* title overrides explicit name */ 545 /* title overrides explicit name */
546 if (! NILP (FGET (f, title))) 546 if (! NILP (f->title))
547 name = FGET (f, title); 547 name = f->title;
548 548
549 ns_set_name_internal (f, name); 549 ns_set_name_internal (f, name);
550} 550}
@@ -586,7 +586,7 @@ x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name)
586{ 586{
587 NSTRACE (x_set_title); 587 NSTRACE (x_set_title);
588 /* Don't change the title if it's already NAME. */ 588 /* Don't change the title if it's already NAME. */
589 if (EQ (name, FGET (f, title))) 589 if (EQ (name, f->title))
590 return; 590 return;
591 591
592 update_mode_lines = 1; 592 update_mode_lines = 1;
@@ -594,7 +594,7 @@ x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name)
594 FSET (f, title, name); 594 FSET (f, title, name);
595 595
596 if (NILP (name)) 596 if (NILP (name))
597 name = FGET (f, name); 597 name = f->name;
598 else 598 else
599 CHECK_STRING (name); 599 CHECK_STRING (name);
600 600
@@ -607,7 +607,7 @@ ns_set_name_as_filename (struct frame *f)
607{ 607{
608 NSView *view; 608 NSView *view;
609 Lisp_Object name, filename; 609 Lisp_Object name, filename;
610 Lisp_Object buf = WGET (XWINDOW (FGET (f, selected_window)), buffer); 610 Lisp_Object buf = WGET (XWINDOW (f->selected_window), buffer);
611 const char *title; 611 const char *title;
612 NSAutoreleasePool *pool; 612 NSAutoreleasePool *pool;
613 struct gcpro gcpro1; 613 struct gcpro gcpro1;
@@ -615,7 +615,7 @@ ns_set_name_as_filename (struct frame *f)
615 NSString *str; 615 NSString *str;
616 NSTRACE (ns_set_name_as_filename); 616 NSTRACE (ns_set_name_as_filename);
617 617
618 if (f->explicit_name || ! NILP (FGET (f, title)) || ns_in_resize) 618 if (f->explicit_name || ! NILP (f->title) || ns_in_resize)
619 return; 619 return;
620 620
621 BLOCK_INPUT; 621 BLOCK_INPUT;
@@ -690,7 +690,7 @@ ns_set_doc_edited (struct frame *f, Lisp_Object arg)
690{ 690{
691 NSView *view = FRAME_NS_VIEW (f); 691 NSView *view = FRAME_NS_VIEW (f);
692 NSAutoreleasePool *pool; 692 NSAutoreleasePool *pool;
693 if (!MINI_WINDOW_P (XWINDOW (FGET (f, selected_window)))) 693 if (!MINI_WINDOW_P (XWINDOW (f->selected_window)))
694 { 694 {
695 BLOCK_INPUT; 695 BLOCK_INPUT;
696 pool = [[NSAutoreleasePool alloc] init]; 696 pool = [[NSAutoreleasePool alloc] init];
@@ -777,7 +777,7 @@ ns_implicitly_set_icon_type (struct frame *f)
777 BLOCK_INPUT; 777 BLOCK_INPUT;
778 pool = [[NSAutoreleasePool alloc] init]; 778 pool = [[NSAutoreleasePool alloc] init];
779 if (f->output_data.ns->miniimage 779 if (f->output_data.ns->miniimage
780 && [[NSString stringWithUTF8String: SSDATA (FGET (f, name))] 780 && [[NSString stringWithUTF8String: SSDATA (f->name)]
781 isEqualToString: [(NSImage *)f->output_data.ns->miniimage name]]) 781 isEqualToString: [(NSImage *)f->output_data.ns->miniimage name]])
782 { 782 {
783 [pool release]; 783 [pool release];
@@ -785,7 +785,7 @@ ns_implicitly_set_icon_type (struct frame *f)
785 return; 785 return;
786 } 786 }
787 787
788 tem = assq_no_quit (Qicon_type, FGET (f, param_alist)); 788 tem = assq_no_quit (Qicon_type, f->param_alist);
789 if (CONSP (tem) && ! NILP (XCDR (tem))) 789 if (CONSP (tem) && ! NILP (XCDR (tem)))
790 { 790 {
791 [pool release]; 791 [pool release];
@@ -799,17 +799,17 @@ ns_implicitly_set_icon_type (struct frame *f)
799 { 799 {
800 elt = XCAR (chain); 800 elt = XCAR (chain);
801 /* special case: 't' means go by file type */ 801 /* special case: 't' means go by file type */
802 if (SYMBOLP (elt) && EQ (elt, Qt) && SSDATA (FGET (f, name))[0] == '/') 802 if (SYMBOLP (elt) && EQ (elt, Qt) && SSDATA (f->name)[0] == '/')
803 { 803 {
804 NSString *str 804 NSString *str
805 = [NSString stringWithUTF8String: SSDATA (FGET (f, name))]; 805 = [NSString stringWithUTF8String: SSDATA (f->name)];
806 if ([[NSFileManager defaultManager] fileExistsAtPath: str]) 806 if ([[NSFileManager defaultManager] fileExistsAtPath: str])
807 image = [[[NSWorkspace sharedWorkspace] iconForFile: str] retain]; 807 image = [[[NSWorkspace sharedWorkspace] iconForFile: str] retain];
808 } 808 }
809 else if (CONSP (elt) && 809 else if (CONSP (elt) &&
810 STRINGP (XCAR (elt)) && 810 STRINGP (XCAR (elt)) &&
811 STRINGP (XCDR (elt)) && 811 STRINGP (XCDR (elt)) &&
812 fast_string_match (XCAR (elt), FGET (f, name)) >= 0) 812 fast_string_match (XCAR (elt), f->name) >= 0)
813 { 813 {
814 image = [EmacsImage allocInitFromFile: XCDR (elt)]; 814 image = [EmacsImage allocInitFromFile: XCDR (elt)];
815 if (image == nil) 815 if (image == nil)
@@ -1208,7 +1208,7 @@ This function is an internal primitive--use `make-frame' instead. */)
1208 FSET (f, icon_name, x_get_arg (dpyinfo, parms, Qicon_name, 1208 FSET (f, icon_name, x_get_arg (dpyinfo, parms, Qicon_name,
1209 "iconName", "Title", 1209 "iconName", "Title",
1210 RES_TYPE_STRING)); 1210 RES_TYPE_STRING));
1211 if (! STRINGP (FGET (f, icon_name))) 1211 if (! STRINGP (f->icon_name))
1212 FSET (f, icon_name, Qnil); 1212 FSET (f, icon_name, Qnil);
1213 1213
1214 FRAME_NS_DISPLAY_INFO (f) = dpyinfo; 1214 FRAME_NS_DISPLAY_INFO (f) = dpyinfo;
@@ -1398,7 +1398,7 @@ This function is an internal primitive--use `make-frame' instead. */)
1398 by x_get_arg and friends, now go in the misc. alist of the frame. */ 1398 by x_get_arg and friends, now go in the misc. alist of the frame. */
1399 for (tem = parms; CONSP (tem); tem = XCDR (tem)) 1399 for (tem = parms; CONSP (tem); tem = XCDR (tem))
1400 if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem)))) 1400 if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
1401 FSET (f, param_alist, Fcons (XCAR (tem), FGET (f, param_alist))); 1401 FSET (f, param_alist, Fcons (XCAR (tem), f->param_alist));
1402 1402
1403 UNGCPRO; 1403 UNGCPRO;
1404 1404
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 152127e66c5..2707bb5e017 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -222,13 +222,13 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu)
222 222
223 /* Save the frame's previous menu bar contents data */ 223 /* Save the frame's previous menu bar contents data */
224 if (previous_menu_items_used) 224 if (previous_menu_items_used)
225 memcpy (previous_items, aref_addr (FGET (f, menu_bar_vector), 0), 225 memcpy (previous_items, aref_addr (f->menu_bar_vector, 0),
226 previous_menu_items_used * sizeof (Lisp_Object)); 226 previous_menu_items_used * sizeof (Lisp_Object));
227 227
228 /* parse stage 1: extract from lisp */ 228 /* parse stage 1: extract from lisp */
229 save_menu_items (); 229 save_menu_items ();
230 230
231 menu_items = FGET (f, menu_bar_vector); 231 menu_items = f->menu_bar_vector;
232 menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0; 232 menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0;
233 submenu_start = alloca (ASIZE (items) * sizeof *submenu_start); 233 submenu_start = alloca (ASIZE (items) * sizeof *submenu_start);
234 submenu_end = alloca (ASIZE (items) * sizeof *submenu_end); 234 submenu_end = alloca (ASIZE (items) * sizeof *submenu_end);
@@ -1040,7 +1040,7 @@ update_frame_tool_bar (FRAME_PTR f)
1040 /* update EmacsToolbar as in GtkUtils, build items list */ 1040 /* update EmacsToolbar as in GtkUtils, build items list */
1041 for (i = 0; i < f->n_tool_bar_items; ++i) 1041 for (i = 0; i < f->n_tool_bar_items; ++i)
1042 { 1042 {
1043#define TOOLPROP(IDX) AREF (FGET (f, tool_bar_items), \ 1043#define TOOLPROP(IDX) AREF (f->tool_bar_items, \
1044 i * TOOL_BAR_ITEM_NSLOTS + (IDX)) 1044 i * TOOL_BAR_ITEM_NSLOTS + (IDX))
1045 1045
1046 BOOL enabled_p = !NILP (TOOLPROP (TOOL_BAR_ITEM_ENABLED_P)); 1046 BOOL enabled_p = !NILP (TOOLPROP (TOOL_BAR_ITEM_ENABLED_P));
diff --git a/src/nsterm.m b/src/nsterm.m
index 046ed4d3082..472a49bd8ff 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1304,7 +1304,7 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows)
1304 FRAME_PIXEL_HEIGHT (f) = pixelheight; 1304 FRAME_PIXEL_HEIGHT (f) = pixelheight;
1305/* SET_FRAME_GARBAGED (f); // this short-circuits expose call in drawRect */ 1305/* SET_FRAME_GARBAGED (f); // this short-circuits expose call in drawRect */
1306 1306
1307 mark_window_cursors_off (XWINDOW (FGET (f, root_window))); 1307 mark_window_cursors_off (XWINDOW (f->root_window));
1308 cancel_mouse_face (f); 1308 cancel_mouse_face (f);
1309 1309
1310 UNBLOCK_INPUT; 1310 UNBLOCK_INPUT;
@@ -2123,8 +2123,8 @@ ns_after_update_window_line (struct glyph_row *desired_row)
2123 int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y)); 2123 int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y));
2124 2124
2125 /* Internal border is drawn below the tool bar. */ 2125 /* Internal border is drawn below the tool bar. */
2126 if (WINDOWP (FGET (f, tool_bar_window)) 2126 if (WINDOWP (f->tool_bar_window)
2127 && w == XWINDOW (FGET (f, tool_bar_window))) 2127 && w == XWINDOW (f->tool_bar_window))
2128 y -= width; 2128 y -= width;
2129 /* end copy from other terms */ 2129 /* end copy from other terms */
2130 2130
@@ -5540,7 +5540,7 @@ ns_term_shutdown (int sig)
5540 if (ns_drag_types) 5540 if (ns_drag_types)
5541 [self registerForDraggedTypes: ns_drag_types]; 5541 [self registerForDraggedTypes: ns_drag_types];
5542 5542
5543 tem = FGET (f, name); 5543 tem = f->name;
5544 name = [NSString stringWithUTF8String: 5544 name = [NSString stringWithUTF8String:
5545 NILP (tem) ? "Emacs" : SSDATA (tem)]; 5545 NILP (tem) ? "Emacs" : SSDATA (tem)];
5546 [win setTitle: name]; 5546 [win setTitle: name];
@@ -5558,7 +5558,7 @@ ns_term_shutdown (int sig)
5558#endif 5558#endif
5559 FRAME_TOOLBAR_HEIGHT (f) = 0; 5559 FRAME_TOOLBAR_HEIGHT (f) = 0;
5560 5560
5561 tem = FGET (f, icon_name); 5561 tem = f->icon_name;
5562 if (!NILP (tem)) 5562 if (!NILP (tem))
5563 [win setMiniwindowTitle: 5563 [win setMiniwindowTitle:
5564 [NSString stringWithUTF8String: SSDATA (tem)]]; 5564 [NSString stringWithUTF8String: SSDATA (tem)]];
@@ -5739,7 +5739,7 @@ ns_term_shutdown (int sig)
5739 { 5739 {
5740 NSInteger tag = [sender tag]; 5740 NSInteger tag = [sender tag];
5741 find_and_call_menu_selection (emacsframe, emacsframe->menu_bar_items_used, 5741 find_and_call_menu_selection (emacsframe, emacsframe->menu_bar_items_used,
5742 FGET (emacsframe, menu_bar_vector), 5742 emacsframe->menu_bar_vector,
5743 (void *)tag); 5743 (void *)tag);
5744 } 5744 }
5745 5745
@@ -5773,7 +5773,7 @@ ns_term_shutdown (int sig)
5773 5773
5774 emacs_event->kind = TOOL_BAR_EVENT; 5774 emacs_event->kind = TOOL_BAR_EVENT;
5775/* XSETINT (emacs_event->code, 0); */ 5775/* XSETINT (emacs_event->code, 0); */
5776 emacs_event->arg = AREF (FGET (emacsframe, tool_bar_items), 5776 emacs_event->arg = AREF (emacsframe->tool_bar_items,
5777 idx + TOOL_BAR_ITEM_KEY); 5777 idx + TOOL_BAR_ITEM_KEY);
5778 emacs_event->modifiers = EV_MODIFIERS (theEvent); 5778 emacs_event->modifiers = EV_MODIFIERS (theEvent);
5779 EV_TRAILER (theEvent); 5779 EV_TRAILER (theEvent);
@@ -6062,7 +6062,7 @@ ns_term_shutdown (int sig)
6062 Lisp_Object str = Qnil; 6062 Lisp_Object str = Qnil;
6063 struct frame *f = SELECTED_FRAME (); 6063 struct frame *f = SELECTED_FRAME ();
6064 struct buffer *curbuf 6064 struct buffer *curbuf
6065 = XBUFFER (WGET (XWINDOW (FGET (f, selected_window)), buffer)); 6065 = XBUFFER (WGET (XWINDOW (f->selected_window), buffer));
6066 6066
6067 if ([attribute isEqualToString:NSAccessibilityRoleAttribute]) 6067 if ([attribute isEqualToString:NSAccessibilityRoleAttribute])
6068 return NSAccessibilityTextFieldRole; 6068 return NSAccessibilityTextFieldRole;
diff --git a/src/print.c b/src/print.c
index 8e98fe4b233..39726552ae6 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1896,7 +1896,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
1896 else if (FRAMEP (obj)) 1896 else if (FRAMEP (obj))
1897 { 1897 {
1898 int len; 1898 int len;
1899 Lisp_Object frame_name = FGET (XFRAME (obj), name); 1899 Lisp_Object frame_name = XFRAME (obj)->name;
1900 1900
1901 strout ((FRAME_LIVE_P (XFRAME (obj)) 1901 strout ((FRAME_LIVE_P (XFRAME (obj))
1902 ? "#<frame " : "#<dead frame "), 1902 ? "#<frame " : "#<dead frame "),
diff --git a/src/term.c b/src/term.c
index 60b963be2ce..2b944b48a12 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2192,7 +2192,7 @@ set_tty_color_mode (struct tty_display_info *tty, struct frame *f)
2192 Lisp_Object tty_color_mode_alist 2192 Lisp_Object tty_color_mode_alist
2193 = Fintern_soft (build_string ("tty-color-mode-alist"), Qnil); 2193 = Fintern_soft (build_string ("tty-color-mode-alist"), Qnil);
2194 2194
2195 tem = assq_no_quit (Qtty_color_mode, FGET (f, param_alist)); 2195 tem = assq_no_quit (Qtty_color_mode, f->param_alist);
2196 val = CONSP (tem) ? XCDR (tem) : Qnil; 2196 val = CONSP (tem) ? XCDR (tem) : Qnil;
2197 2197
2198 if (INTEGERP (val)) 2198 if (INTEGERP (val))
diff --git a/src/w32fns.c b/src/w32fns.c
index b82d4bcef3f..c8218c12c18 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1498,11 +1498,11 @@ x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
1498 BLOCK_INPUT; 1498 BLOCK_INPUT;
1499 1499
1500 result = x_text_icon (f, 1500 result = x_text_icon (f,
1501 SSDATA ((!NILP (FGET (f, icon_name)) 1501 SSDATA ((!NILP (f->icon_name)
1502 ? FGET (f, icon_name) 1502 ? f->icon_name
1503 : !NILP (FGET (f, title)) 1503 : !NILP (f->title)
1504 ? FGET (f, title) 1504 ? f->title
1505 : FGET (f, name)))); 1505 : f->name)));
1506 1506
1507 if (result) 1507 if (result)
1508 { 1508 {
@@ -1631,8 +1631,8 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1631 } 1631 }
1632 UNBLOCK_INPUT; 1632 UNBLOCK_INPUT;
1633 1633
1634 if (WINDOWP (FGET (f, tool_bar_window))) 1634 if (WINDOWP (f->tool_bar_window))
1635 clear_glyph_matrix (XWINDOW (FGET (f, tool_bar_window))->current_matrix); 1635 clear_glyph_matrix (XWINDOW (f->tool_bar_window)->current_matrix);
1636 } 1636 }
1637 1637
1638 run_window_configuration_change_hook (f); 1638 run_window_configuration_change_hook (f);
@@ -1674,7 +1674,7 @@ x_set_name (struct frame *f, Lisp_Object name, int explicit)
1674 /* Check for no change needed in this very common case 1674 /* Check for no change needed in this very common case
1675 before we do any consing. */ 1675 before we do any consing. */
1676 if (!strcmp (FRAME_W32_DISPLAY_INFO (f)->w32_id_name, 1676 if (!strcmp (FRAME_W32_DISPLAY_INFO (f)->w32_id_name,
1677 SDATA (FGET (f, name)))) 1677 SDATA (f->name)))
1678 return; 1678 return;
1679 name = build_string (FRAME_W32_DISPLAY_INFO (f)->w32_id_name); 1679 name = build_string (FRAME_W32_DISPLAY_INFO (f)->w32_id_name);
1680 } 1680 }
@@ -1682,15 +1682,15 @@ x_set_name (struct frame *f, Lisp_Object name, int explicit)
1682 CHECK_STRING (name); 1682 CHECK_STRING (name);
1683 1683
1684 /* Don't change the name if it's already NAME. */ 1684 /* Don't change the name if it's already NAME. */
1685 if (! NILP (Fstring_equal (name, FGET (f, name)))) 1685 if (! NILP (Fstring_equal (name, f->name)))
1686 return; 1686 return;
1687 1687
1688 FSET (f, name, name); 1688 FSET (f, name, name);
1689 1689
1690 /* For setting the frame title, the title parameter should override 1690 /* For setting the frame title, the title parameter should override
1691 the name parameter. */ 1691 the name parameter. */
1692 if (! NILP (FGET (f, title))) 1692 if (! NILP (f->title))
1693 name = FGET (f, title); 1693 name = f->title;
1694 1694
1695 if (FRAME_W32_WINDOW (f)) 1695 if (FRAME_W32_WINDOW (f))
1696 { 1696 {
@@ -1728,7 +1728,7 @@ void
1728x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name) 1728x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name)
1729{ 1729{
1730 /* Don't change the title if it's already NAME. */ 1730 /* Don't change the title if it's already NAME. */
1731 if (EQ (name, FGET (f, title))) 1731 if (EQ (name, f->title))
1732 return; 1732 return;
1733 1733
1734 update_mode_lines = 1; 1734 update_mode_lines = 1;
@@ -1736,7 +1736,7 @@ x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name)
1736 FSET (f, title, name); 1736 FSET (f, title, name);
1737 1737
1738 if (NILP (name)) 1738 if (NILP (name))
1739 name = FGET (f, name); 1739 name = f->name;
1740 1740
1741 if (FRAME_W32_WINDOW (f)) 1741 if (FRAME_W32_WINDOW (f))
1742 { 1742 {
@@ -3896,7 +3896,7 @@ w32_window (struct frame *f, long window_prompting, int minibuffer_only)
3896 int explicit = f->explicit_name; 3896 int explicit = f->explicit_name;
3897 3897
3898 f->explicit_name = 0; 3898 f->explicit_name = 0;
3899 name = FGET (f, name); 3899 name = f->name;
3900 FSET (f, name, Qnil); 3900 FSET (f, name, Qnil);
3901 x_set_name (f, name, explicit); 3901 x_set_name (f, name, explicit);
3902 } 3902 }
@@ -3944,9 +3944,9 @@ x_icon (struct frame *f, Lisp_Object parms)
3944 ? IconicState 3944 ? IconicState
3945 : NormalState)); 3945 : NormalState));
3946 3946
3947 x_text_icon (f, SSDATA ((!NILP (FGET (f, icon_name)) 3947 x_text_icon (f, SSDATA ((!NILP (f->icon_name)
3948 ? FGET (f, icon_name) 3948 ? f->icon_name
3949 : FGET (f, name)))); 3949 : f->name)));
3950#endif 3950#endif
3951 3951
3952 UNBLOCK_INPUT; 3952 UNBLOCK_INPUT;
@@ -4149,7 +4149,7 @@ This function is an internal primitive--use `make-frame' instead. */)
4149 FSET (f, icon_name, 4149 FSET (f, icon_name,
4150 x_get_arg (dpyinfo, parameters, Qicon_name, "iconName", "Title", 4150 x_get_arg (dpyinfo, parameters, Qicon_name, "iconName", "Title",
4151 RES_TYPE_STRING)); 4151 RES_TYPE_STRING));
4152 if (! STRINGP (FGET (f, icon_name))) 4152 if (! STRINGP (f->icon_name))
4153 FSET (f, icon_name, Qnil); 4153 FSET (f, icon_name, Qnil);
4154 4154
4155/* FRAME_W32_DISPLAY_INFO (f) = dpyinfo; */ 4155/* FRAME_W32_DISPLAY_INFO (f) = dpyinfo; */
@@ -4359,7 +4359,7 @@ This function is an internal primitive--use `make-frame' instead. */)
4359 by x_get_arg and friends, now go in the misc. alist of the frame. */ 4359 by x_get_arg and friends, now go in the misc. alist of the frame. */
4360 for (tem = parameters; CONSP (tem); tem = XCDR (tem)) 4360 for (tem = parameters; CONSP (tem); tem = XCDR (tem))
4361 if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem)))) 4361 if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
4362 FSET (f, param_alist, Fcons (XCAR (tem), FGET (f, param_alist))); 4362 FSET (f, param_alist, Fcons (XCAR (tem), f->param_alist));
4363 4363
4364 UNGCPRO; 4364 UNGCPRO;
4365 4365
diff --git a/src/w32menu.c b/src/w32menu.c
index 7ea4633235e..1c837bed375 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -277,7 +277,7 @@ menubar_selection_callback (FRAME_PTR f, void * client_data)
277 return; 277 return;
278 entry = Qnil; 278 entry = Qnil;
279 subprefix_stack = (Lisp_Object *) alloca (f->menu_bar_items_used * word_size); 279 subprefix_stack = (Lisp_Object *) alloca (f->menu_bar_items_used * word_size);
280 vector = FGET (f, menu_bar_vector); 280 vector = f->menu_bar_vector;
281 prefix = Qnil; 281 prefix = Qnil;
282 i = 0; 282 i = 0;
283 while (i < f->menu_bar_items_used) 283 while (i < f->menu_bar_items_used)
@@ -419,14 +419,14 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
419 419
420 /* Save the frame's previous menu bar contents data. */ 420 /* Save the frame's previous menu bar contents data. */
421 if (previous_menu_items_used) 421 if (previous_menu_items_used)
422 memcpy (previous_items, XVECTOR (FGET (f, menu_bar_vector))->contents, 422 memcpy (previous_items, XVECTOR (f->menu_bar_vector)->contents,
423 previous_menu_items_used * word_size); 423 previous_menu_items_used * word_size);
424 424
425 /* Fill in menu_items with the current menu bar contents. 425 /* Fill in menu_items with the current menu bar contents.
426 This can evaluate Lisp code. */ 426 This can evaluate Lisp code. */
427 save_menu_items (); 427 save_menu_items ();
428 428
429 menu_items = FGET (f, menu_bar_vector); 429 menu_items = f->menu_bar_vector;
430 menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0; 430 menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0;
431 submenu_start = (int *) alloca (ASIZE (items) * sizeof (int)); 431 submenu_start = (int *) alloca (ASIZE (items) * sizeof (int));
432 submenu_end = (int *) alloca (ASIZE (items) * sizeof (int)); 432 submenu_end = (int *) alloca (ASIZE (items) * sizeof (int));
diff --git a/src/w32term.c b/src/w32term.c
index 262bbd49e68..eebf5e5d2ab 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -4194,7 +4194,7 @@ w32_read_socket (struct terminal *terminal, int expected,
4194 /* We may get paint messages even though the client 4194 /* We may get paint messages even though the client
4195 area is clipped - these are not expose events. */ 4195 area is clipped - these are not expose events. */
4196 DebPrint (("clipped frame %p (%s) got WM_PAINT - ignored\n", f, 4196 DebPrint (("clipped frame %p (%s) got WM_PAINT - ignored\n", f,
4197 SDATA (FGET (f, name)))); 4197 SDATA (f->name)));
4198 } 4198 }
4199 else if (f->async_visible != 1) 4199 else if (f->async_visible != 1)
4200 { 4200 {
@@ -4203,7 +4203,7 @@ w32_read_socket (struct terminal *terminal, int expected,
4203 f->async_iconified = 0; 4203 f->async_iconified = 0;
4204 SET_FRAME_GARBAGED (f); 4204 SET_FRAME_GARBAGED (f);
4205 DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f, 4205 DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f,
4206 SDATA (FGET (f, name)))); 4206 SDATA (f->name)));
4207 4207
4208 /* WM_PAINT serves as MapNotify as well, so report 4208 /* WM_PAINT serves as MapNotify as well, so report
4209 visibility changes properly. */ 4209 visibility changes properly. */
@@ -4259,7 +4259,7 @@ w32_read_socket (struct terminal *terminal, int expected,
4259 if (f && !f->iconified) 4259 if (f && !f->iconified)
4260 { 4260 {
4261 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) 4261 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
4262 && !EQ (FGET (f, tool_bar_window), hlinfo->mouse_face_window)) 4262 && !EQ (f->tool_bar_window, hlinfo->mouse_face_window))
4263 { 4263 {
4264 clear_mouse_face (hlinfo); 4264 clear_mouse_face (hlinfo);
4265 hlinfo->mouse_face_hidden = 1; 4265 hlinfo->mouse_face_hidden = 1;
@@ -4284,7 +4284,7 @@ w32_read_socket (struct terminal *terminal, int expected,
4284 if (f && !f->iconified) 4284 if (f && !f->iconified)
4285 { 4285 {
4286 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) 4286 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
4287 && !EQ (FGET (f, tool_bar_window), hlinfo->mouse_face_window)) 4287 && !EQ (f->tool_bar_window, hlinfo->mouse_face_window))
4288 { 4288 {
4289 clear_mouse_face (hlinfo); 4289 clear_mouse_face (hlinfo);
4290 hlinfo->mouse_face_hidden = 1; 4290 hlinfo->mouse_face_hidden = 1;
@@ -4362,7 +4362,7 @@ w32_read_socket (struct terminal *terminal, int expected,
4362 if (f && !f->iconified) 4362 if (f && !f->iconified)
4363 { 4363 {
4364 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) 4364 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
4365 && !EQ (FGET (f, tool_bar_window), hlinfo->mouse_face_window)) 4365 && !EQ (f->tool_bar_window, hlinfo->mouse_face_window))
4366 { 4366 {
4367 clear_mouse_face (hlinfo); 4367 clear_mouse_face (hlinfo);
4368 hlinfo->mouse_face_hidden = 1; 4368 hlinfo->mouse_face_hidden = 1;
@@ -4486,8 +4486,8 @@ w32_read_socket (struct terminal *terminal, int expected,
4486 construct_mouse_click (&inev, &msg, f); 4486 construct_mouse_click (&inev, &msg, f);
4487 4487
4488 /* Is this in the tool-bar? */ 4488 /* Is this in the tool-bar? */
4489 if (WINDOWP (FGET (f, tool_bar_window)) 4489 if (WINDOWP (f->tool_bar_window)
4490 && WINDOW_TOTAL_LINES (XWINDOW (FGET (f, tool_bar_window)))) 4490 && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window)))
4491 { 4491 {
4492 Lisp_Object window; 4492 Lisp_Object window;
4493 int x = XFASTINT (inev.x); 4493 int x = XFASTINT (inev.x);
@@ -4495,7 +4495,7 @@ w32_read_socket (struct terminal *terminal, int expected,
4495 4495
4496 window = window_from_coordinates (f, x, y, 0, 1); 4496 window = window_from_coordinates (f, x, y, 0, 1);
4497 4497
4498 if (EQ (window, FGET (f, tool_bar_window))) 4498 if (EQ (window, f->tool_bar_window))
4499 { 4499 {
4500 w32_handle_tool_bar_click (f, &inev); 4500 w32_handle_tool_bar_click (f, &inev);
4501 tool_bar_p = 1; 4501 tool_bar_p = 1;
@@ -4940,7 +4940,7 @@ w32_read_socket (struct terminal *terminal, int expected,
4940 if (!FRAME_OBSCURED_P (f)) 4940 if (!FRAME_OBSCURED_P (f))
4941 { 4941 {
4942 DebPrint (("frame %p (%s) obscured\n", f, 4942 DebPrint (("frame %p (%s) obscured\n", f,
4943 SDATA (FGET (f, name)))); 4943 SDATA (f->name)));
4944 } 4944 }
4945 } 4945 }
4946 else 4946 else
@@ -4952,7 +4952,7 @@ w32_read_socket (struct terminal *terminal, int expected,
4952 { 4952 {
4953 SET_FRAME_GARBAGED (f); 4953 SET_FRAME_GARBAGED (f);
4954 DebPrint (("obscured frame %p (%s) found to be visible\n", f, 4954 DebPrint (("obscured frame %p (%s) found to be visible\n", f,
4955 SDATA (FGET (f, name)))); 4955 SDATA (f->name)));
4956 4956
4957 /* Force a redisplay sooner or later. */ 4957 /* Force a redisplay sooner or later. */
4958 record_asynch_buffer_change (); 4958 record_asynch_buffer_change ();
@@ -5600,7 +5600,7 @@ x_set_window_size (struct frame *f, int change_gravity, int cols, int rows)
5600 SET_FRAME_GARBAGED (f); 5600 SET_FRAME_GARBAGED (f);
5601 5601
5602 /* If cursor was outside the new size, mark it as off. */ 5602 /* If cursor was outside the new size, mark it as off. */
5603 mark_window_cursors_off (XWINDOW (FGET (f, root_window))); 5603 mark_window_cursors_off (XWINDOW (f->root_window));
5604 5604
5605 /* Clear out any recollection of where the mouse highlighting was, 5605 /* Clear out any recollection of where the mouse highlighting was,
5606 since it might be in a place that's outside the new frame size. 5606 since it might be in a place that's outside the new frame size.
diff --git a/src/window.c b/src/window.c
index a71fa0b1088..912eb04f489 100644
--- a/src/window.c
+++ b/src/window.c
@@ -191,13 +191,13 @@ With a window argument, return the root window of that window's frame. */)
191 Lisp_Object window; 191 Lisp_Object window;
192 192
193 if (NILP (frame_or_window)) 193 if (NILP (frame_or_window))
194 window = FGET (SELECTED_FRAME (), root_window); 194 window = SELECTED_FRAME ()->root_window;
195 else if (WINDOWP (frame_or_window)) 195 else if (WINDOWP (frame_or_window))
196 window = FGET (XFRAME (WINDOW_FRAME (XWINDOW (frame_or_window))), root_window); 196 window = XFRAME (WINDOW_FRAME (XWINDOW (frame_or_window)))->root_window;
197 else 197 else
198 { 198 {
199 CHECK_LIVE_FRAME (frame_or_window); 199 CHECK_LIVE_FRAME (frame_or_window);
200 window = FGET (XFRAME (frame_or_window), root_window); 200 window = XFRAME (frame_or_window)->root_window;
201 } 201 }
202 202
203 return window; 203 return window;
@@ -235,13 +235,13 @@ the first window of that frame. */)
235 Lisp_Object window; 235 Lisp_Object window;
236 236
237 if (NILP (frame_or_window)) 237 if (NILP (frame_or_window))
238 window = FGET (SELECTED_FRAME (), root_window); 238 window = SELECTED_FRAME ()->root_window;
239 else if (WINDOWP (frame_or_window)) 239 else if (WINDOWP (frame_or_window))
240 window = FGET (XFRAME (WINDOW_FRAME (XWINDOW (frame_or_window))), root_window); 240 window = XFRAME (WINDOW_FRAME (XWINDOW (frame_or_window)))->root_window;
241 else 241 else
242 { 242 {
243 CHECK_LIVE_FRAME (frame_or_window); 243 CHECK_LIVE_FRAME (frame_or_window);
244 window = FGET (XFRAME (frame_or_window), root_window); 244 window = XFRAME (frame_or_window)->root_window;
245 } 245 }
246 246
247 while (NILP (WGET (XWINDOW (window), buffer))) 247 while (NILP (WGET (XWINDOW (window), buffer)))
@@ -269,14 +269,13 @@ the selected window of that frame. */)
269 Lisp_Object window; 269 Lisp_Object window;
270 270
271 if (NILP (frame_or_window)) 271 if (NILP (frame_or_window))
272 window = FGET (SELECTED_FRAME (), selected_window); 272 window = SELECTED_FRAME ()->selected_window;
273 else if (WINDOWP (frame_or_window)) 273 else if (WINDOWP (frame_or_window))
274 window = FGET (XFRAME (WINDOW_FRAME (XWINDOW (frame_or_window))), 274 window = XFRAME (WINDOW_FRAME (XWINDOW (frame_or_window)))->selected_window;
275 selected_window);
276 else 275 else
277 { 276 {
278 CHECK_LIVE_FRAME (frame_or_window); 277 CHECK_LIVE_FRAME (frame_or_window);
279 window = FGET (XFRAME (frame_or_window), selected_window); 278 window = XFRAME (frame_or_window)->selected_window;
280 } 279 }
281 280
282 return window; 281 return window;
@@ -1214,13 +1213,13 @@ window_from_coordinates (struct frame *f, int x, int y,
1214 bar exists. */ 1213 bar exists. */
1215 if (NILP (window) 1214 if (NILP (window)
1216 && tool_bar_p 1215 && tool_bar_p
1217 && WINDOWP (FGET (f, tool_bar_window)) 1216 && WINDOWP (f->tool_bar_window)
1218 && WINDOW_TOTAL_LINES (XWINDOW (FGET (f, tool_bar_window))) > 0 1217 && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window)) > 0
1219 && (coordinates_in_window (XWINDOW (FGET (f, tool_bar_window)), x, y) 1218 && (coordinates_in_window (XWINDOW (f->tool_bar_window), x, y)
1220 != ON_NOTHING)) 1219 != ON_NOTHING))
1221 { 1220 {
1222 *part = ON_TEXT; 1221 *part = ON_TEXT;
1223 window = FGET (f, tool_bar_window); 1222 window = f->tool_bar_window;
1224 } 1223 }
1225 1224
1226 return window; 1225 return window;
@@ -2314,7 +2313,7 @@ MINIBUF neither nil nor t means never include the minibuffer window. */)
2314 (Lisp_Object frame, Lisp_Object minibuf, Lisp_Object window) 2313 (Lisp_Object frame, Lisp_Object minibuf, Lisp_Object window)
2315{ 2314{
2316 if (NILP (window)) 2315 if (NILP (window))
2317 window = FRAMEP (frame) ? FGET (XFRAME (frame), selected_window) : selected_window; 2316 window = FRAMEP (frame) ? XFRAME (frame)->selected_window : selected_window;
2318 CHECK_WINDOW (window); 2317 CHECK_WINDOW (window);
2319 if (NILP (frame)) 2318 if (NILP (frame))
2320 frame = selected_frame; 2319 frame = selected_frame;
@@ -3553,9 +3552,9 @@ be applied on the Elisp level. */)
3553void 3552void
3554resize_frame_windows (struct frame *f, int size, int horflag) 3553resize_frame_windows (struct frame *f, int size, int horflag)
3555{ 3554{
3556 Lisp_Object root = FGET (f, root_window); 3555 Lisp_Object root = f->root_window;
3557 struct window *r = XWINDOW (root); 3556 struct window *r = XWINDOW (root);
3558 Lisp_Object mini = FGET (f, minibuffer_window); 3557 Lisp_Object mini = f->minibuffer_window;
3559 struct window *m; 3558 struct window *m;
3560 /* new_size is the new size of the frame's root window. */ 3559 /* new_size is the new size of the frame's root window. */
3561 int new_size = (horflag 3560 int new_size = (horflag
@@ -3603,7 +3602,7 @@ resize_frame_windows (struct frame *f, int size, int horflag)
3603 { 3602 {
3604 /* We lost. Delete all windows but the frame's 3603 /* We lost. Delete all windows but the frame's
3605 selected one. */ 3604 selected one. */
3606 root = FGET (f, selected_window); 3605 root = f->selected_window;
3607 Fdelete_other_windows_internal (root, Qnil); 3606 Fdelete_other_windows_internal (root, Qnil);
3608 if (horflag) 3607 if (horflag)
3609 WSET (XWINDOW (root), total_cols, make_number (new_size)); 3608 WSET (XWINDOW (root), total_cols, make_number (new_size));
@@ -6484,8 +6483,8 @@ init_window_once (void)
6484 struct frame *f = make_initial_frame (); 6483 struct frame *f = make_initial_frame ();
6485 XSETFRAME (selected_frame, f); 6484 XSETFRAME (selected_frame, f);
6486 Vterminal_frame = selected_frame; 6485 Vterminal_frame = selected_frame;
6487 minibuf_window = FGET (f, minibuffer_window); 6486 minibuf_window = f->minibuffer_window;
6488 selected_window = FGET (f, selected_window); 6487 selected_window = f->selected_window;
6489 last_nonminibuf_frame = f; 6488 last_nonminibuf_frame = f;
6490 6489
6491 window_initialized = 1; 6490 window_initialized = 1;
diff --git a/src/window.h b/src/window.h
index b6a37e2df9e..64b6c19ec69 100644
--- a/src/window.h
+++ b/src/window.h
@@ -474,14 +474,14 @@ struct window
474/* 1 if W is a menu bar window. */ 474/* 1 if W is a menu bar window. */
475 475
476#define WINDOW_MENU_BAR_P(W) \ 476#define WINDOW_MENU_BAR_P(W) \
477 (WINDOWP (FGET (WINDOW_XFRAME (W), menu_bar_window)) \ 477 (WINDOWP (WINDOW_XFRAME (W)->menu_bar_window) \
478 && (W) == XWINDOW (FGET (WINDOW_XFRAME (W), menu_bar_window))) 478 && (W) == XWINDOW (WINDOW_XFRAME (W)->menu_bar_window))
479 479
480/* 1 if W is a tool bar window. */ 480/* 1 if W is a tool bar window. */
481 481
482#define WINDOW_TOOL_BAR_P(W) \ 482#define WINDOW_TOOL_BAR_P(W) \
483 (WINDOWP (FGET (WINDOW_XFRAME (W), tool_bar_window)) \ 483 (WINDOWP (WINDOW_XFRAME (W)->tool_bar_window) \
484 && (W) == XWINDOW (FGET (WINDOW_XFRAME (W), tool_bar_window))) 484 && (W) == XWINDOW (WINDOW_XFRAME (W)->tool_bar_window))
485 485
486/* Return the frame y-position at which window W starts. 486/* Return the frame y-position at which window W starts.
487 This includes a header line, if any. */ 487 This includes a header line, if any. */
diff --git a/src/xdisp.c b/src/xdisp.c
index d0338db44f0..ed3e48fbc36 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -10891,7 +10891,7 @@ format_mode_line_unwind_data (struct frame *target_frame,
10891 /* Similarly to `with-selected-window', if the operation selects 10891 /* Similarly to `with-selected-window', if the operation selects
10892 a window on another frame, we must restore that frame's 10892 a window on another frame, we must restore that frame's
10893 selected window, and (for a tty) the top-frame. */ 10893 selected window, and (for a tty) the top-frame. */
10894 ASET (vector, 8, FGET (target_frame, selected_window)); 10894 ASET (vector, 8, target_frame->selected_window);
10895 if (FRAME_TERMCAP_P (target_frame)) 10895 if (FRAME_TERMCAP_P (target_frame))
10896 ASET (vector, 9, FRAME_TTY (target_frame)->top_frame); 10896 ASET (vector, 9, FRAME_TTY (target_frame)->top_frame);
10897 } 10897 }
@@ -11051,14 +11051,14 @@ x_consider_frame_title (Lisp_Object frame)
11051 format_mode_line_unwind_data 11051 format_mode_line_unwind_data
11052 (f, current_buffer, selected_window, 0)); 11052 (f, current_buffer, selected_window, 0));
11053 11053
11054 Fselect_window (FGET (f, selected_window), Qt); 11054 Fselect_window (f->selected_window, Qt);
11055 set_buffer_internal_1 11055 set_buffer_internal_1
11056 (XBUFFER (WGET (XWINDOW (FGET (f, selected_window)), buffer))); 11056 (XBUFFER (WGET (XWINDOW (f->selected_window), buffer)));
11057 fmt = FRAME_ICONIFIED_P (f) ? Vicon_title_format : Vframe_title_format; 11057 fmt = FRAME_ICONIFIED_P (f) ? Vicon_title_format : Vframe_title_format;
11058 11058
11059 mode_line_target = MODE_LINE_TITLE; 11059 mode_line_target = MODE_LINE_TITLE;
11060 title_start = MODE_LINE_NOPROP_LEN (0); 11060 title_start = MODE_LINE_NOPROP_LEN (0);
11061 init_iterator (&it, XWINDOW (FGET (f, selected_window)), -1, -1, 11061 init_iterator (&it, XWINDOW (f->selected_window), -1, -1,
11062 NULL, DEFAULT_FACE_ID); 11062 NULL, DEFAULT_FACE_ID);
11063 display_mode_element (&it, 0, -1, -1, fmt, Qnil, 0); 11063 display_mode_element (&it, 0, -1, -1, fmt, Qnil, 0);
11064 len = MODE_LINE_NOPROP_LEN (title_start); 11064 len = MODE_LINE_NOPROP_LEN (title_start);
@@ -11070,9 +11070,9 @@ x_consider_frame_title (Lisp_Object frame)
11070 already wasted too much time by walking through the list with 11070 already wasted too much time by walking through the list with
11071 display_mode_element, then we might need to optimize at a 11071 display_mode_element, then we might need to optimize at a
11072 higher level than this.) */ 11072 higher level than this.) */
11073 if (! STRINGP (FGET (f, name)) 11073 if (! STRINGP (f->name)
11074 || SBYTES (FGET (f, name)) != len 11074 || SBYTES (f->name) != len
11075 || memcmp (title, SDATA (FGET (f, name)), len) != 0) 11075 || memcmp (title, SDATA (f->name), len) != 0)
11076 x_implicitly_set_name (f, make_string (title, len), Qnil); 11076 x_implicitly_set_name (f, make_string (title, len), Qnil);
11077 } 11077 }
11078} 11078}
@@ -11173,7 +11173,7 @@ prepare_menu_bars (void)
11173 && FRAME_NS_P (f)) 11173 && FRAME_NS_P (f))
11174 ns_set_doc_edited 11174 ns_set_doc_edited
11175 (f, Fbuffer_modified_p 11175 (f, Fbuffer_modified_p
11176 (WGET (XWINDOW (FGET (f, selected_window)), buffer))); 11176 (WGET (XWINDOW (f->selected_window), buffer)));
11177#endif 11177#endif
11178 UNGCPRO; 11178 UNGCPRO;
11179 } 11179 }
@@ -11414,8 +11414,8 @@ update_tool_bar (struct frame *f, int save_match_data)
11414#if defined (USE_GTK) || defined (HAVE_NS) 11414#if defined (USE_GTK) || defined (HAVE_NS)
11415 int do_update = FRAME_EXTERNAL_TOOL_BAR (f); 11415 int do_update = FRAME_EXTERNAL_TOOL_BAR (f);
11416#else 11416#else
11417 int do_update = WINDOWP (FGET (f, tool_bar_window)) 11417 int do_update = WINDOWP (f->tool_bar_window)
11418 && WINDOW_TOTAL_LINES (XWINDOW (FGET (f, tool_bar_window))) > 0; 11418 && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window)) > 0;
11419#endif 11419#endif
11420 11420
11421 if (do_update) 11421 if (do_update)
@@ -11477,12 +11477,12 @@ update_tool_bar (struct frame *f, int save_match_data)
11477 11477
11478 /* Build desired tool-bar items from keymaps. */ 11478 /* Build desired tool-bar items from keymaps. */
11479 new_tool_bar 11479 new_tool_bar
11480 = tool_bar_items (Fcopy_sequence (FGET (f, tool_bar_items)), 11480 = tool_bar_items (Fcopy_sequence (f->tool_bar_items),
11481 &new_n_tool_bar); 11481 &new_n_tool_bar);
11482 11482
11483 /* Redisplay the tool-bar if we changed it. */ 11483 /* Redisplay the tool-bar if we changed it. */
11484 if (new_n_tool_bar != f->n_tool_bar_items 11484 if (new_n_tool_bar != f->n_tool_bar_items
11485 || NILP (Fequal (new_tool_bar, FGET (f, tool_bar_items)))) 11485 || NILP (Fequal (new_tool_bar, f->tool_bar_items)))
11486 { 11486 {
11487 /* Redisplay that happens asynchronously due to an expose event 11487 /* Redisplay that happens asynchronously due to an expose event
11488 may access f->tool_bar_items. Make sure we update both 11488 may access f->tool_bar_items. Make sure we update both
@@ -11521,22 +11521,22 @@ build_desired_tool_bar_string (struct frame *f)
11521 Otherwise, make a new string. */ 11521 Otherwise, make a new string. */
11522 11522
11523 /* The size of the string we might be able to reuse. */ 11523 /* The size of the string we might be able to reuse. */
11524 size = (STRINGP (FGET (f, desired_tool_bar_string)) 11524 size = (STRINGP (f->desired_tool_bar_string)
11525 ? SCHARS (FGET (f, desired_tool_bar_string)) 11525 ? SCHARS (f->desired_tool_bar_string)
11526 : 0); 11526 : 0);
11527 11527
11528 /* We need one space in the string for each image. */ 11528 /* We need one space in the string for each image. */
11529 size_needed = f->n_tool_bar_items; 11529 size_needed = f->n_tool_bar_items;
11530 11530
11531 /* Reuse f->desired_tool_bar_string, if possible. */ 11531 /* Reuse f->desired_tool_bar_string, if possible. */
11532 if (size < size_needed || NILP (FGET (f, desired_tool_bar_string))) 11532 if (size < size_needed || NILP (f->desired_tool_bar_string))
11533 FSET (f, desired_tool_bar_string, 11533 FSET (f, desired_tool_bar_string,
11534 Fmake_string (make_number (size_needed), make_number (' '))); 11534 Fmake_string (make_number (size_needed), make_number (' ')));
11535 else 11535 else
11536 { 11536 {
11537 props = list4 (Qdisplay, Qnil, Qmenu_item, Qnil); 11537 props = list4 (Qdisplay, Qnil, Qmenu_item, Qnil);
11538 Fremove_text_properties (make_number (0), make_number (size), 11538 Fremove_text_properties (make_number (0), make_number (size),
11539 props, FGET (f, desired_tool_bar_string)); 11539 props, f->desired_tool_bar_string);
11540 } 11540 }
11541 11541
11542 /* Put a `display' property on the string for the images to display, 11542 /* Put a `display' property on the string for the images to display,
@@ -11545,7 +11545,7 @@ build_desired_tool_bar_string (struct frame *f)
11545 for (i = 0; i < f->n_tool_bar_items; ++i) 11545 for (i = 0; i < f->n_tool_bar_items; ++i)
11546 { 11546 {
11547#define PROP(IDX) \ 11547#define PROP(IDX) \
11548 AREF (FGET (f, tool_bar_items), i * TOOL_BAR_ITEM_NSLOTS + (IDX)) 11548 AREF (f->tool_bar_items, i * TOOL_BAR_ITEM_NSLOTS + (IDX))
11549 11549
11550 int enabled_p = !NILP (PROP (TOOL_BAR_ITEM_ENABLED_P)); 11550 int enabled_p = !NILP (PROP (TOOL_BAR_ITEM_ENABLED_P));
11551 int selected_p = !NILP (PROP (TOOL_BAR_ITEM_SELECTED_P)); 11551 int selected_p = !NILP (PROP (TOOL_BAR_ITEM_SELECTED_P));
@@ -11654,11 +11654,11 @@ build_desired_tool_bar_string (struct frame *f)
11654 string. The string can be longer than needed when we reuse a 11654 string. The string can be longer than needed when we reuse a
11655 previous string. */ 11655 previous string. */
11656 if (i + 1 == f->n_tool_bar_items) 11656 if (i + 1 == f->n_tool_bar_items)
11657 end = SCHARS (FGET (f, desired_tool_bar_string)); 11657 end = SCHARS (f->desired_tool_bar_string);
11658 else 11658 else
11659 end = i + 1; 11659 end = i + 1;
11660 Fadd_text_properties (make_number (i), make_number (end), 11660 Fadd_text_properties (make_number (i), make_number (end),
11661 props, FGET (f, desired_tool_bar_string)); 11661 props, f->desired_tool_bar_string);
11662#undef PROP 11662#undef PROP
11663 } 11663 }
11664 11664
@@ -11808,7 +11808,7 @@ display_tool_bar_line (struct it *it, int height)
11808static int 11808static int
11809tool_bar_lines_needed (struct frame *f, int *n_rows) 11809tool_bar_lines_needed (struct frame *f, int *n_rows)
11810{ 11810{
11811 struct window *w = XWINDOW (FGET (f, tool_bar_window)); 11811 struct window *w = XWINDOW (f->tool_bar_window);
11812 struct it it; 11812 struct it it;
11813 /* tool_bar_lines_needed is called from redisplay_tool_bar after building 11813 /* tool_bar_lines_needed is called from redisplay_tool_bar after building
11814 the desired matrix, so use (unused) mode-line row as temporary row to 11814 the desired matrix, so use (unused) mode-line row as temporary row to
@@ -11820,7 +11820,7 @@ tool_bar_lines_needed (struct frame *f, int *n_rows)
11820 init_iterator (&it, w, -1, -1, temp_row, TOOL_BAR_FACE_ID); 11820 init_iterator (&it, w, -1, -1, temp_row, TOOL_BAR_FACE_ID);
11821 it.first_visible_x = 0; 11821 it.first_visible_x = 0;
11822 it.last_visible_x = FRAME_TOTAL_COLS (f) * FRAME_COLUMN_WIDTH (f); 11822 it.last_visible_x = FRAME_TOTAL_COLS (f) * FRAME_COLUMN_WIDTH (f);
11823 reseat_to_string (&it, NULL, FGET (f, desired_tool_bar_string), 0, 0, 0, -1); 11823 reseat_to_string (&it, NULL, f->desired_tool_bar_string, 0, 0, 0, -1);
11824 it.paragraph_embedding = L2R; 11824 it.paragraph_embedding = L2R;
11825 11825
11826 while (!ITERATOR_AT_END_P (&it)) 11826 while (!ITERATOR_AT_END_P (&it))
@@ -11854,8 +11854,8 @@ DEFUN ("tool-bar-lines-needed", Ftool_bar_lines_needed, Stool_bar_lines_needed,
11854 CHECK_FRAME (frame); 11854 CHECK_FRAME (frame);
11855 f = XFRAME (frame); 11855 f = XFRAME (frame);
11856 11856
11857 if (WINDOWP (FGET (f, tool_bar_window)) 11857 if (WINDOWP (f->tool_bar_window)
11858 && (w = XWINDOW (FGET (f, tool_bar_window)), 11858 && (w = XWINDOW (f->tool_bar_window),
11859 WINDOW_TOTAL_LINES (w) > 0)) 11859 WINDOW_TOTAL_LINES (w) > 0))
11860 { 11860 {
11861 update_tool_bar (f, 1); 11861 update_tool_bar (f, 1);
@@ -11890,8 +11890,8 @@ redisplay_tool_bar (struct frame *f)
11890 do anything. This means you must start with tool-bar-lines 11890 do anything. This means you must start with tool-bar-lines
11891 non-zero to get the auto-sizing effect. Or in other words, you 11891 non-zero to get the auto-sizing effect. Or in other words, you
11892 can turn off tool-bars by specifying tool-bar-lines zero. */ 11892 can turn off tool-bars by specifying tool-bar-lines zero. */
11893 if (!WINDOWP (FGET (f, tool_bar_window)) 11893 if (!WINDOWP (f->tool_bar_window)
11894 || (w = XWINDOW (FGET (f, tool_bar_window)), 11894 || (w = XWINDOW (f->tool_bar_window),
11895 WINDOW_TOTAL_LINES (w) == 0)) 11895 WINDOW_TOTAL_LINES (w) == 0))
11896 return 0; 11896 return 0;
11897 11897
@@ -11903,7 +11903,7 @@ redisplay_tool_bar (struct frame *f)
11903 11903
11904 /* Build a string that represents the contents of the tool-bar. */ 11904 /* Build a string that represents the contents of the tool-bar. */
11905 build_desired_tool_bar_string (f); 11905 build_desired_tool_bar_string (f);
11906 reseat_to_string (&it, NULL, FGET (f, desired_tool_bar_string), 0, 0, 0, -1); 11906 reseat_to_string (&it, NULL, f->desired_tool_bar_string, 0, 0, 0, -1);
11907 /* FIXME: This should be controlled by a user option. But it 11907 /* FIXME: This should be controlled by a user option. But it
11908 doesn't make sense to have an R2L tool bar if the menu bar cannot 11908 doesn't make sense to have an R2L tool bar if the menu bar cannot
11909 be drawn also R2L, and making the menu bar R2L is tricky due 11909 be drawn also R2L, and making the menu bar R2L is tricky due
@@ -12060,14 +12060,14 @@ tool_bar_item_info (struct frame *f, struct glyph *glyph, int *prop_idx)
12060 /* This function can be called asynchronously, which means we must 12060 /* This function can be called asynchronously, which means we must
12061 exclude any possibility that Fget_text_property signals an 12061 exclude any possibility that Fget_text_property signals an
12062 error. */ 12062 error. */
12063 charpos = min (SCHARS (FGET (f, current_tool_bar_string)), glyph->charpos); 12063 charpos = min (SCHARS (f->current_tool_bar_string), glyph->charpos);
12064 charpos = max (0, charpos); 12064 charpos = max (0, charpos);
12065 12065
12066 /* Get the text property `menu-item' at pos. The value of that 12066 /* Get the text property `menu-item' at pos. The value of that
12067 property is the start index of this item's properties in 12067 property is the start index of this item's properties in
12068 F->tool_bar_items. */ 12068 F->tool_bar_items. */
12069 prop = Fget_text_property (make_number (charpos), 12069 prop = Fget_text_property (make_number (charpos),
12070 Qmenu_item, FGET (f, current_tool_bar_string)); 12070 Qmenu_item, f->current_tool_bar_string);
12071 if (INTEGERP (prop)) 12071 if (INTEGERP (prop))
12072 { 12072 {
12073 *prop_idx = XINT (prop); 12073 *prop_idx = XINT (prop);
@@ -12095,7 +12095,7 @@ get_tool_bar_item (struct frame *f, int x, int y, struct glyph **glyph,
12095 int *hpos, int *vpos, int *prop_idx) 12095 int *hpos, int *vpos, int *prop_idx)
12096{ 12096{
12097 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); 12097 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
12098 struct window *w = XWINDOW (FGET (f, tool_bar_window)); 12098 struct window *w = XWINDOW (f->tool_bar_window);
12099 int area; 12099 int area;
12100 12100
12101 /* Find the glyph under X/Y. */ 12101 /* Find the glyph under X/Y. */
@@ -12109,7 +12109,7 @@ get_tool_bar_item (struct frame *f, int x, int y, struct glyph **glyph,
12109 return -1; 12109 return -1;
12110 12110
12111 /* Is mouse on the highlighted item? */ 12111 /* Is mouse on the highlighted item? */
12112 if (EQ (FGET (f, tool_bar_window), hlinfo->mouse_face_window) 12112 if (EQ (f->tool_bar_window, hlinfo->mouse_face_window)
12113 && *vpos >= hlinfo->mouse_face_beg_row 12113 && *vpos >= hlinfo->mouse_face_beg_row
12114 && *vpos <= hlinfo->mouse_face_end_row 12114 && *vpos <= hlinfo->mouse_face_end_row
12115 && (*vpos > hlinfo->mouse_face_beg_row 12115 && (*vpos > hlinfo->mouse_face_beg_row
@@ -12134,7 +12134,7 @@ handle_tool_bar_click (struct frame *f, int x, int y, int down_p,
12134 int modifiers) 12134 int modifiers)
12135{ 12135{
12136 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); 12136 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
12137 struct window *w = XWINDOW (FGET (f, tool_bar_window)); 12137 struct window *w = XWINDOW (f->tool_bar_window);
12138 int hpos, vpos, prop_idx; 12138 int hpos, vpos, prop_idx;
12139 struct glyph *glyph; 12139 struct glyph *glyph;
12140 Lisp_Object enabled_p; 12140 Lisp_Object enabled_p;
@@ -12145,7 +12145,7 @@ handle_tool_bar_click (struct frame *f, int x, int y, int down_p,
12145 return; 12145 return;
12146 12146
12147 /* If item is disabled, do nothing. */ 12147 /* If item is disabled, do nothing. */
12148 enabled_p = AREF (FGET (f, tool_bar_items), prop_idx + TOOL_BAR_ITEM_ENABLED_P); 12148 enabled_p = AREF (f->tool_bar_items, prop_idx + TOOL_BAR_ITEM_ENABLED_P);
12149 if (NILP (enabled_p)) 12149 if (NILP (enabled_p))
12150 return; 12150 return;
12151 12151
@@ -12166,7 +12166,7 @@ handle_tool_bar_click (struct frame *f, int x, int y, int down_p,
12166 show_mouse_face (hlinfo, DRAW_IMAGE_RAISED); 12166 show_mouse_face (hlinfo, DRAW_IMAGE_RAISED);
12167 hlinfo->mouse_face_image_state = DRAW_IMAGE_RAISED; 12167 hlinfo->mouse_face_image_state = DRAW_IMAGE_RAISED;
12168 12168
12169 key = AREF (FGET (f, tool_bar_items), prop_idx + TOOL_BAR_ITEM_KEY); 12169 key = AREF (f->tool_bar_items, prop_idx + TOOL_BAR_ITEM_KEY);
12170 12170
12171 XSETFRAME (frame, f); 12171 XSETFRAME (frame, f);
12172 event.kind = TOOL_BAR_EVENT; 12172 event.kind = TOOL_BAR_EVENT;
@@ -12191,7 +12191,7 @@ handle_tool_bar_click (struct frame *f, int x, int y, int down_p,
12191static void 12191static void
12192note_tool_bar_highlight (struct frame *f, int x, int y) 12192note_tool_bar_highlight (struct frame *f, int x, int y)
12193{ 12193{
12194 Lisp_Object window = FGET (f, tool_bar_window); 12194 Lisp_Object window = f->tool_bar_window;
12195 struct window *w = XWINDOW (window); 12195 struct window *w = XWINDOW (window);
12196 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 12196 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
12197 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); 12197 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
@@ -12237,7 +12237,7 @@ note_tool_bar_highlight (struct frame *f, int x, int y)
12237 draw = mouse_down_p ? DRAW_IMAGE_SUNKEN : DRAW_IMAGE_RAISED; 12237 draw = mouse_down_p ? DRAW_IMAGE_SUNKEN : DRAW_IMAGE_RAISED;
12238 12238
12239 /* If tool-bar item is not enabled, don't highlight it. */ 12239 /* If tool-bar item is not enabled, don't highlight it. */
12240 enabled_p = AREF (FGET (f, tool_bar_items), prop_idx + TOOL_BAR_ITEM_ENABLED_P); 12240 enabled_p = AREF (f->tool_bar_items, prop_idx + TOOL_BAR_ITEM_ENABLED_P);
12241 if (!NILP (enabled_p)) 12241 if (!NILP (enabled_p))
12242 { 12242 {
12243 /* Compute the x-position of the glyph. In front and past the 12243 /* Compute the x-position of the glyph. In front and past the
@@ -12271,9 +12271,9 @@ note_tool_bar_highlight (struct frame *f, int x, int y)
12271 XTread_socket does the rest. */ 12271 XTread_socket does the rest. */
12272 help_echo_object = help_echo_window = Qnil; 12272 help_echo_object = help_echo_window = Qnil;
12273 help_echo_pos = -1; 12273 help_echo_pos = -1;
12274 help_echo_string = AREF (FGET (f, tool_bar_items), prop_idx + TOOL_BAR_ITEM_HELP); 12274 help_echo_string = AREF (f->tool_bar_items, prop_idx + TOOL_BAR_ITEM_HELP);
12275 if (NILP (help_echo_string)) 12275 if (NILP (help_echo_string))
12276 help_echo_string = AREF (FGET (f, tool_bar_items), prop_idx + TOOL_BAR_ITEM_CAPTION); 12276 help_echo_string = AREF (f->tool_bar_items, prop_idx + TOOL_BAR_ITEM_CAPTION);
12277} 12277}
12278 12278
12279#endif /* HAVE_WINDOW_SYSTEM */ 12279#endif /* HAVE_WINDOW_SYSTEM */
@@ -12854,7 +12854,7 @@ select_frame_for_redisplay (Lisp_Object frame)
12854 selected_frame = frame; 12854 selected_frame = frame;
12855 12855
12856 do { 12856 do {
12857 for (tail = FGET (XFRAME (frame), param_alist); 12857 for (tail = XFRAME (frame)->param_alist;
12858 CONSP (tail); tail = XCDR (tail)) 12858 CONSP (tail); tail = XCDR (tail))
12859 if (CONSP (XCAR (tail)) 12859 if (CONSP (XCAR (tail))
12860 && (tem = XCAR (XCAR (tail)), 12860 && (tem = XCAR (XCAR (tail)),
@@ -13428,7 +13428,7 @@ redisplay_internal (void)
13428 if (!f->already_hscrolled_p) 13428 if (!f->already_hscrolled_p)
13429 { 13429 {
13430 f->already_hscrolled_p = 1; 13430 f->already_hscrolled_p = 1;
13431 if (hscroll_windows (FGET (f, root_window))) 13431 if (hscroll_windows (f->root_window))
13432 goto retry; 13432 goto retry;
13433 } 13433 }
13434 13434
@@ -13441,7 +13441,7 @@ redisplay_internal (void)
13441 STOP_POLLING; 13441 STOP_POLLING;
13442 13442
13443 /* Update the display. */ 13443 /* Update the display. */
13444 set_window_update_flags (XWINDOW (FGET (f, root_window)), 1); 13444 set_window_update_flags (XWINDOW (f->root_window), 1);
13445 pending |= update_frame (f, 0, 0); 13445 pending |= update_frame (f, 0, 0);
13446 f->updated_p = 1; 13446 f->updated_p = 1;
13447 } 13447 }
@@ -13454,7 +13454,7 @@ redisplay_internal (void)
13454 and selected_window to be temporarily out-of-sync but let's make 13454 and selected_window to be temporarily out-of-sync but let's make
13455 sure this stays contained. */ 13455 sure this stays contained. */
13456 select_frame_for_redisplay (old_frame); 13456 select_frame_for_redisplay (old_frame);
13457 eassert (EQ (FGET (XFRAME (selected_frame), selected_window), 13457 eassert (EQ (XFRAME (selected_frame)->selected_window,
13458 selected_window)); 13458 selected_window));
13459 13459
13460 if (!pending) 13460 if (!pending)
@@ -13467,7 +13467,7 @@ redisplay_internal (void)
13467 struct frame *f = XFRAME (frame); 13467 struct frame *f = XFRAME (frame);
13468 if (f->updated_p) 13468 if (f->updated_p)
13469 { 13469 {
13470 mark_window_display_accurate (FGET (f, root_window), 1); 13470 mark_window_display_accurate (f->root_window, 1);
13471 if (FRAME_TERMINAL (f)->frame_up_to_date_hook) 13471 if (FRAME_TERMINAL (f)->frame_up_to_date_hook)
13472 FRAME_TERMINAL (f)->frame_up_to_date_hook (f); 13472 FRAME_TERMINAL (f)->frame_up_to_date_hook (f);
13473 } 13473 }
@@ -16163,7 +16163,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
16163 if (FRAME_EXTERNAL_TOOL_BAR (f)) 16163 if (FRAME_EXTERNAL_TOOL_BAR (f))
16164 redisplay_tool_bar (f); 16164 redisplay_tool_bar (f);
16165#else 16165#else
16166 if (WINDOWP (FGET (f, tool_bar_window)) 16166 if (WINDOWP (f->tool_bar_window)
16167 && (FRAME_TOOL_BAR_LINES (f) > 0 16167 && (FRAME_TOOL_BAR_LINES (f) > 0
16168 || !NILP (Vauto_resize_tool_bars)) 16168 || !NILP (Vauto_resize_tool_bars))
16169 && redisplay_tool_bar (f)) 16169 && redisplay_tool_bar (f))
@@ -18118,7 +18118,7 @@ GLYPH > 1 or omitted means dump glyphs in long form. */)
18118 (Lisp_Object row, Lisp_Object glyphs) 18118 (Lisp_Object row, Lisp_Object glyphs)
18119{ 18119{
18120 struct frame *sf = SELECTED_FRAME (); 18120 struct frame *sf = SELECTED_FRAME ();
18121 struct glyph_matrix *m = XWINDOW (FGET (sf, tool_bar_window))->current_matrix; 18121 struct glyph_matrix *m = XWINDOW (sf->tool_bar_window)->current_matrix;
18122 EMACS_INT vpos; 18122 EMACS_INT vpos;
18123 18123
18124 CHECK_NUMBER (row); 18124 CHECK_NUMBER (row);
@@ -20103,8 +20103,8 @@ display_menu_bar (struct window *w)
20103 /* Menu bar lines are displayed in the desired matrix of the 20103 /* Menu bar lines are displayed in the desired matrix of the
20104 dummy window menu_bar_window. */ 20104 dummy window menu_bar_window. */
20105 struct window *menu_w; 20105 struct window *menu_w;
20106 eassert (WINDOWP (FGET (f, menu_bar_window))); 20106 eassert (WINDOWP (f->menu_bar_window));
20107 menu_w = XWINDOW (FGET (f, menu_bar_window)); 20107 menu_w = XWINDOW (f->menu_bar_window);
20108 init_iterator (&it, menu_w, -1, -1, menu_w->desired_matrix->rows, 20108 init_iterator (&it, menu_w, -1, -1, menu_w->desired_matrix->rows,
20109 MENU_FACE_ID); 20109 MENU_FACE_ID);
20110 it.first_visible_x = 0; 20110 it.first_visible_x = 0;
@@ -21408,10 +21408,10 @@ decode_mode_spec (struct window *w, register int c, int field_width,
21408 21408
21409 case 'F': 21409 case 'F':
21410 /* %F displays the frame name. */ 21410 /* %F displays the frame name. */
21411 if (!NILP (FGET (f, title))) 21411 if (!NILP (f->title))
21412 return SSDATA (FGET (f, title)); 21412 return SSDATA (f->title);
21413 if (f->explicit_name || ! FRAME_WINDOW_P (f)) 21413 if (f->explicit_name || ! FRAME_WINDOW_P (f))
21414 return SSDATA (FGET (f, name)); 21414 return SSDATA (f->name);
21415 return "Emacs"; 21415 return "Emacs";
21416 21416
21417 case 'f': 21417 case 'f':
@@ -25575,7 +25575,7 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width,
25575 } 25575 }
25576 25576
25577 /* Detect a nonselected window or nonselected frame. */ 25577 /* Detect a nonselected window or nonselected frame. */
25578 else if (w != XWINDOW (FGET (f, selected_window)) 25578 else if (w != XWINDOW (f->selected_window)
25579 || f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame) 25579 || f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame)
25580 { 25580 {
25581 *active_cursor = 0; 25581 *active_cursor = 0;
@@ -26117,7 +26117,7 @@ update_cursor_in_window_tree (struct window *w, int on_p)
26117void 26117void
26118x_update_cursor (struct frame *f, int on_p) 26118x_update_cursor (struct frame *f, int on_p)
26119{ 26119{
26120 update_cursor_in_window_tree (XWINDOW (FGET (f, root_window)), on_p); 26120 update_cursor_in_window_tree (XWINDOW (f->root_window), on_p);
26121} 26121}
26122 26122
26123 26123
@@ -26276,7 +26276,7 @@ show_mouse_face (Mouse_HLInfo *hlinfo, enum draw_glyphs_face draw)
26276 if (FRAME_WINDOW_P (f)) 26276 if (FRAME_WINDOW_P (f))
26277 { 26277 {
26278 if (draw == DRAW_NORMAL_TEXT 26278 if (draw == DRAW_NORMAL_TEXT
26279 && !EQ (hlinfo->mouse_face_window, FGET (f, tool_bar_window))) 26279 && !EQ (hlinfo->mouse_face_window, f->tool_bar_window))
26280 FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->text_cursor); 26280 FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->text_cursor);
26281 else if (draw == DRAW_MOUSE_FACE) 26281 else if (draw == DRAW_MOUSE_FACE)
26282 FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->hand_cursor); 26282 FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->hand_cursor);
@@ -27632,7 +27632,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
27632#ifdef HAVE_WINDOW_SYSTEM 27632#ifdef HAVE_WINDOW_SYSTEM
27633 /* Handle tool-bar window differently since it doesn't display a 27633 /* Handle tool-bar window differently since it doesn't display a
27634 buffer. */ 27634 buffer. */
27635 if (EQ (window, FGET (f, tool_bar_window))) 27635 if (EQ (window, f->tool_bar_window))
27636 { 27636 {
27637 note_tool_bar_highlight (f, x, y); 27637 note_tool_bar_highlight (f, x, y);
27638 return; 27638 return;
@@ -28542,18 +28542,18 @@ expose_frame (struct frame *f, int x, int y, int w, int h)
28542 } 28542 }
28543 28543
28544 TRACE ((stderr, "(%d, %d, %d, %d)\n", r.x, r.y, r.width, r.height)); 28544 TRACE ((stderr, "(%d, %d, %d, %d)\n", r.x, r.y, r.width, r.height));
28545 mouse_face_overwritten_p = expose_window_tree (XWINDOW (FGET (f, root_window)), &r); 28545 mouse_face_overwritten_p = expose_window_tree (XWINDOW (f->root_window), &r);
28546 28546
28547 if (WINDOWP (FGET (f, tool_bar_window))) 28547 if (WINDOWP (f->tool_bar_window))
28548 mouse_face_overwritten_p 28548 mouse_face_overwritten_p
28549 |= expose_window (XWINDOW (FGET (f, tool_bar_window)), &r); 28549 |= expose_window (XWINDOW (f->tool_bar_window), &r);
28550 28550
28551#ifdef HAVE_X_WINDOWS 28551#ifdef HAVE_X_WINDOWS
28552#ifndef MSDOS 28552#ifndef MSDOS
28553#ifndef USE_X_TOOLKIT 28553#ifndef USE_X_TOOLKIT
28554 if (WINDOWP (FGET (f, menu_bar_window))) 28554 if (WINDOWP (f->menu_bar_window))
28555 mouse_face_overwritten_p 28555 mouse_face_overwritten_p
28556 |= expose_window (XWINDOW (FGET (f, menu_bar_window)), &r); 28556 |= expose_window (XWINDOW (f->menu_bar_window), &r);
28557#endif /* not USE_X_TOOLKIT */ 28557#endif /* not USE_X_TOOLKIT */
28558#endif 28558#endif
28559#endif 28559#endif
diff --git a/src/xfaces.c b/src/xfaces.c
index ff9df493033..66d7d348c9c 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -2053,7 +2053,7 @@ lface_from_face_name_no_resolve (struct frame *f, Lisp_Object face_name,
2053 Lisp_Object lface; 2053 Lisp_Object lface;
2054 2054
2055 if (f) 2055 if (f)
2056 lface = assq_no_quit (face_name, FGET (f, face_alist)); 2056 lface = assq_no_quit (face_name, f->face_alist);
2057 else 2057 else
2058 lface = assq_no_quit (face_name, Vface_new_frame_defaults); 2058 lface = assq_no_quit (face_name, Vface_new_frame_defaults);
2059 2059
@@ -2680,8 +2680,7 @@ Value is a vector of face attributes. */)
2680 lface = Fmake_vector (make_number (LFACE_VECTOR_SIZE), 2680 lface = Fmake_vector (make_number (LFACE_VECTOR_SIZE),
2681 Qunspecified); 2681 Qunspecified);
2682 ASET (lface, 0, Qface); 2682 ASET (lface, 0, Qface);
2683 FSET (f, face_alist, 2683 FSET (f, face_alist, Fcons (Fcons (face, lface), f->face_alist));
2684 Fcons (Fcons (face, lface), FGET (f, face_alist)));
2685 } 2684 }
2686 else 2685 else
2687 for (i = 1; i < LFACE_VECTOR_SIZE; ++i) 2686 for (i = 1; i < LFACE_VECTOR_SIZE; ++i)
@@ -3360,7 +3359,7 @@ update_face_from_frame_parameter (struct frame *f, Lisp_Object param,
3360 /* If there are no faces yet, give up. This is the case when called 3359 /* If there are no faces yet, give up. This is the case when called
3361 from Fx_create_frame, and we do the necessary things later in 3360 from Fx_create_frame, and we do the necessary things later in
3362 face-set-after-frame-defaults. */ 3361 face-set-after-frame-defaults. */
3363 if (NILP (FGET (f, face_alist))) 3362 if (NILP (f->face_alist))
3364 return; 3363 return;
3365 3364
3366 if (EQ (param, Qforeground_color)) 3365 if (EQ (param, Qforeground_color))
@@ -4046,7 +4045,7 @@ For internal use only. */)
4046 (Lisp_Object frame) 4045 (Lisp_Object frame)
4047{ 4046{
4048 struct frame *f = frame_or_selected_frame (frame, 0); 4047 struct frame *f = frame_or_selected_frame (frame, 0);
4049 return FGET (f, face_alist); 4048 return f->face_alist;
4050} 4049}
4051 4050
4052 4051
@@ -4337,7 +4336,7 @@ free_realized_faces (struct face_cache *c)
4337 matrices as invalid because they will reference faces freed 4336 matrices as invalid because they will reference faces freed
4338 above. This function is also called when a frame is 4337 above. This function is also called when a frame is
4339 destroyed. In this case, the root window of F is nil. */ 4338 destroyed. In this case, the root window of F is nil. */
4340 if (WINDOWP (FGET (f, root_window))) 4339 if (WINDOWP (f->root_window))
4341 { 4340 {
4342 clear_current_matrices (f); 4341 clear_current_matrices (f);
4343 ++windows_or_buffers_changed; 4342 ++windows_or_buffers_changed;
@@ -5110,7 +5109,7 @@ face for italic. */)
5110 { 5109 {
5111 frame = XCAR (fl_tail); 5110 frame = XCAR (fl_tail);
5112 if (!NILP (Fequal (Fcdr (Fassq (Qdisplay, 5111 if (!NILP (Fequal (Fcdr (Fassq (Qdisplay,
5113 FGET (XFRAME (frame), param_alist))), 5112 XFRAME (frame)->param_alist)),
5114 display))) 5113 display)))
5115 break; 5114 break;
5116 } 5115 }
@@ -5406,7 +5405,7 @@ realize_default_face (struct frame *f)
5406 { 5405 {
5407 /* This function is called so early that colors are not yet 5406 /* This function is called so early that colors are not yet
5408 set in the frame parameter list. */ 5407 set in the frame parameter list. */
5409 Lisp_Object color = Fassq (Qforeground_color, FGET (f, param_alist)); 5408 Lisp_Object color = Fassq (Qforeground_color, f->param_alist);
5410 5409
5411 if (CONSP (color) && STRINGP (XCDR (color))) 5410 if (CONSP (color) && STRINGP (XCDR (color)))
5412 ASET (lface, LFACE_FOREGROUND_INDEX, XCDR (color)); 5411 ASET (lface, LFACE_FOREGROUND_INDEX, XCDR (color));
@@ -5422,7 +5421,7 @@ realize_default_face (struct frame *f)
5422 { 5421 {
5423 /* This function is called so early that colors are not yet 5422 /* This function is called so early that colors are not yet
5424 set in the frame parameter list. */ 5423 set in the frame parameter list. */
5425 Lisp_Object color = Fassq (Qbackground_color, FGET (f, param_alist)); 5424 Lisp_Object color = Fassq (Qbackground_color, f->param_alist);
5426 if (CONSP (color) && STRINGP (XCDR (color))) 5425 if (CONSP (color) && STRINGP (XCDR (color)))
5427 ASET (lface, LFACE_BACKGROUND_INDEX, XCDR (color)); 5426 ASET (lface, LFACE_BACKGROUND_INDEX, XCDR (color));
5428 else if (FRAME_WINDOW_P (f)) 5427 else if (FRAME_WINDOW_P (f))
diff --git a/src/xfns.c b/src/xfns.c
index e1bfffeba1c..58c1efc2803 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1123,9 +1123,9 @@ x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
1123 BLOCK_INPUT; 1123 BLOCK_INPUT;
1124 if (NILP (arg)) 1124 if (NILP (arg))
1125 result = x_text_icon (f, 1125 result = x_text_icon (f,
1126 SSDATA ((!NILP (FGET (f, icon_name)) 1126 SSDATA ((!NILP (f->icon_name)
1127 ? FGET (f, icon_name) 1127 ? f->icon_name
1128 : FGET (f, name)))); 1128 : f->name)));
1129 else 1129 else
1130 result = x_bitmap_icon (f, arg); 1130 result = x_bitmap_icon (f, arg);
1131 1131
@@ -1160,11 +1160,11 @@ x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
1160 BLOCK_INPUT; 1160 BLOCK_INPUT;
1161 1161
1162 result = x_text_icon (f, 1162 result = x_text_icon (f,
1163 SSDATA ((!NILP (FGET (f, icon_name)) 1163 SSDATA ((!NILP (f->icon_name)
1164 ? FGET (f, icon_name) 1164 ? f->icon_name
1165 : !NILP (FGET (f, title)) 1165 : !NILP (f->title)
1166 ? FGET (f, title) 1166 ? f->title
1167 : FGET (f, name)))); 1167 : f->name)));
1168 1168
1169 if (result) 1169 if (result)
1170 { 1170 {
@@ -1253,8 +1253,8 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1253 UNBLOCK_INPUT; 1253 UNBLOCK_INPUT;
1254 } 1254 }
1255 1255
1256 if (nlines == 0 && WINDOWP (FGET (f, menu_bar_window))) 1256 if (nlines == 0 && WINDOWP (f->menu_bar_window))
1257 clear_glyph_matrix (XWINDOW (FGET (f, menu_bar_window))->current_matrix); 1257 clear_glyph_matrix (XWINDOW (f->menu_bar_window)->current_matrix);
1258 } 1258 }
1259#endif /* not USE_X_TOOLKIT && not USE_GTK */ 1259#endif /* not USE_X_TOOLKIT && not USE_GTK */
1260 adjust_glyphs (f); 1260 adjust_glyphs (f);
@@ -1352,8 +1352,8 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1352 UNBLOCK_INPUT; 1352 UNBLOCK_INPUT;
1353 } 1353 }
1354 1354
1355 if (WINDOWP (FGET (f, tool_bar_window))) 1355 if (WINDOWP (f->tool_bar_window))
1356 clear_glyph_matrix (XWINDOW (FGET (f, tool_bar_window))->current_matrix); 1356 clear_glyph_matrix (XWINDOW (f->tool_bar_window)->current_matrix);
1357 } 1357 }
1358 1358
1359 run_window_configuration_change_hook (f); 1359 run_window_configuration_change_hook (f);
@@ -1548,7 +1548,7 @@ x_set_name_internal (FRAME_PTR f, Lisp_Object name)
1548 if (text.nitems != bytes) 1548 if (text.nitems != bytes)
1549 error ("Window name too large"); 1549 error ("Window name too large");
1550 1550
1551 if (!STRINGP (FGET (f, icon_name))) 1551 if (!STRINGP (f->icon_name))
1552 { 1552 {
1553 icon = text; 1553 icon = text;
1554 encoded_icon_name = encoded_name; 1554 encoded_icon_name = encoded_name;
@@ -1556,7 +1556,7 @@ x_set_name_internal (FRAME_PTR f, Lisp_Object name)
1556 else 1556 else
1557 { 1557 {
1558 /* See the above comment "Note: Encoding strategy". */ 1558 /* See the above comment "Note: Encoding strategy". */
1559 icon.value = x_encode_text (FGET (f, icon_name), coding_system, 0, 1559 icon.value = x_encode_text (f->icon_name, coding_system, 0,
1560 &bytes, &stringp, &do_free_icon_value); 1560 &bytes, &stringp, &do_free_icon_value);
1561 icon.encoding = (stringp ? XA_STRING 1561 icon.encoding = (stringp ? XA_STRING
1562 : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT); 1562 : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
@@ -1565,7 +1565,7 @@ x_set_name_internal (FRAME_PTR f, Lisp_Object name)
1565 if (icon.nitems != bytes) 1565 if (icon.nitems != bytes)
1566 error ("Icon name too large"); 1566 error ("Icon name too large");
1567 1567
1568 encoded_icon_name = ENCODE_UTF_8 (FGET (f, icon_name)); 1568 encoded_icon_name = ENCODE_UTF_8 (f->icon_name);
1569 } 1569 }
1570 1570
1571#ifdef USE_GTK 1571#ifdef USE_GTK
@@ -1632,7 +1632,7 @@ x_set_name (struct frame *f, Lisp_Object name, int explicit)
1632 /* Check for no change needed in this very common case 1632 /* Check for no change needed in this very common case
1633 before we do any consing. */ 1633 before we do any consing. */
1634 if (!strcmp (FRAME_X_DISPLAY_INFO (f)->x_id_name, 1634 if (!strcmp (FRAME_X_DISPLAY_INFO (f)->x_id_name,
1635 SSDATA (FGET (f, name)))) 1635 SSDATA (f->name)))
1636 return; 1636 return;
1637 name = build_string (FRAME_X_DISPLAY_INFO (f)->x_id_name); 1637 name = build_string (FRAME_X_DISPLAY_INFO (f)->x_id_name);
1638 } 1638 }
@@ -1640,15 +1640,15 @@ x_set_name (struct frame *f, Lisp_Object name, int explicit)
1640 CHECK_STRING (name); 1640 CHECK_STRING (name);
1641 1641
1642 /* Don't change the name if it's already NAME. */ 1642 /* Don't change the name if it's already NAME. */
1643 if (! NILP (Fstring_equal (name, FGET (f, name)))) 1643 if (! NILP (Fstring_equal (name, f->name)))
1644 return; 1644 return;
1645 1645
1646 FSET (f, name, name); 1646 FSET (f, name, name);
1647 1647
1648 /* For setting the frame title, the title parameter should override 1648 /* For setting the frame title, the title parameter should override
1649 the name parameter. */ 1649 the name parameter. */
1650 if (! NILP (FGET (f, title))) 1650 if (! NILP (f->title))
1651 name = FGET (f, title); 1651 name = f->title;
1652 1652
1653 x_set_name_internal (f, name); 1653 x_set_name_internal (f, name);
1654} 1654}
@@ -1678,7 +1678,7 @@ static void
1678x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name) 1678x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name)
1679{ 1679{
1680 /* Don't change the title if it's already NAME. */ 1680 /* Don't change the title if it's already NAME. */
1681 if (EQ (name, FGET (f, title))) 1681 if (EQ (name, f->title))
1682 return; 1682 return;
1683 1683
1684 update_mode_lines = 1; 1684 update_mode_lines = 1;
@@ -1686,7 +1686,7 @@ x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name)
1686 FSET (f, title, name); 1686 FSET (f, title, name);
1687 1687
1688 if (NILP (name)) 1688 if (NILP (name))
1689 name = FGET (f, name); 1689 name = f->name;
1690 else 1690 else
1691 CHECK_STRING (name); 1691 CHECK_STRING (name);
1692 1692
@@ -2571,7 +2571,7 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
2571 int explicit = f->explicit_name; 2571 int explicit = f->explicit_name;
2572 2572
2573 f->explicit_name = 0; 2573 f->explicit_name = 0;
2574 name = FGET (f, name); 2574 name = f->name;
2575 FSET (f, name, Qnil); 2575 FSET (f, name, Qnil);
2576 x_set_name (f, name, explicit); 2576 x_set_name (f, name, explicit);
2577 } 2577 }
@@ -2714,7 +2714,7 @@ x_window (struct frame *f)
2714 int explicit = f->explicit_name; 2714 int explicit = f->explicit_name;
2715 2715
2716 f->explicit_name = 0; 2716 f->explicit_name = 0;
2717 name = FGET (f, name); 2717 name = f->name;
2718 FSET (f, name, Qnil); 2718 FSET (f, name, Qnil);
2719 x_set_name (f, name, explicit); 2719 x_set_name (f, name, explicit);
2720 } 2720 }
@@ -2791,9 +2791,9 @@ x_icon (struct frame *f, Lisp_Object parms)
2791 : NormalState)); 2791 : NormalState));
2792#endif 2792#endif
2793 2793
2794 x_text_icon (f, SSDATA ((!NILP (FGET (f, icon_name)) 2794 x_text_icon (f, SSDATA ((!NILP (f->icon_name)
2795 ? FGET (f, icon_name) 2795 ? f->icon_name
2796 : FGET (f, name)))); 2796 : f->name)));
2797 2797
2798 UNBLOCK_INPUT; 2798 UNBLOCK_INPUT;
2799} 2799}
@@ -3138,7 +3138,7 @@ This function is an internal primitive--use `make-frame' instead. */)
3138 FSET (f, icon_name, 3138 FSET (f, icon_name,
3139 x_get_arg (dpyinfo, parms, Qicon_name, "iconName", "Title", 3139 x_get_arg (dpyinfo, parms, Qicon_name, "iconName", "Title",
3140 RES_TYPE_STRING)); 3140 RES_TYPE_STRING));
3141 if (! STRINGP (FGET (f, icon_name))) 3141 if (! STRINGP (f->icon_name))
3142 FSET (f, icon_name, Qnil); 3142 FSET (f, icon_name, Qnil);
3143 3143
3144 FRAME_X_DISPLAY_INFO (f) = dpyinfo; 3144 FRAME_X_DISPLAY_INFO (f) = dpyinfo;
@@ -3340,7 +3340,7 @@ This function is an internal primitive--use `make-frame' instead. */)
3340 x_default_parameter (f, parms, Qfullscreen, Qnil, 3340 x_default_parameter (f, parms, Qfullscreen, Qnil,
3341 "fullscreen", "Fullscreen", RES_TYPE_SYMBOL); 3341 "fullscreen", "Fullscreen", RES_TYPE_SYMBOL);
3342 x_default_parameter (f, parms, Qtool_bar_position, 3342 x_default_parameter (f, parms, Qtool_bar_position,
3343 FGET (f, tool_bar_position), 0, 0, RES_TYPE_SYMBOL); 3343 f->tool_bar_position, 0, 0, RES_TYPE_SYMBOL);
3344 3344
3345 /* Compute the size of the X window. */ 3345 /* Compute the size of the X window. */
3346 window_prompting = x_figure_window_size (f, parms, 1); 3346 window_prompting = x_figure_window_size (f, parms, 1);
@@ -3468,7 +3468,7 @@ This function is an internal primitive--use `make-frame' instead. */)
3468 by x_get_arg and friends, now go in the misc. alist of the frame. */ 3468 by x_get_arg and friends, now go in the misc. alist of the frame. */
3469 for (tem = parms; CONSP (tem); tem = XCDR (tem)) 3469 for (tem = parms; CONSP (tem); tem = XCDR (tem))
3470 if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem)))) 3470 if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
3471 FSET (f, param_alist, Fcons (XCAR (tem), FGET (f, param_alist))); 3471 FSET (f, param_alist, Fcons (XCAR (tem), f->param_alist));
3472 3472
3473 UNGCPRO; 3473 UNGCPRO;
3474 3474
diff --git a/src/xmenu.c b/src/xmenu.c
index 23f96dcebdc..24d17c1836e 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -835,7 +835,7 @@ menubar_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
835 if (!f) 835 if (!f)
836 return; 836 return;
837 find_and_call_menu_selection (f, f->menu_bar_items_used, 837 find_and_call_menu_selection (f, f->menu_bar_items_used,
838 FGET (f, menu_bar_vector), client_data); 838 f->menu_bar_vector, client_data);
839} 839}
840#endif /* not USE_GTK */ 840#endif /* not USE_GTK */
841 841
@@ -1014,14 +1014,14 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
1014 1014
1015 /* Save the frame's previous menu bar contents data. */ 1015 /* Save the frame's previous menu bar contents data. */
1016 if (previous_menu_items_used) 1016 if (previous_menu_items_used)
1017 memcpy (previous_items, XVECTOR (FGET (f, menu_bar_vector))->contents, 1017 memcpy (previous_items, XVECTOR (f->menu_bar_vector)->contents,
1018 previous_menu_items_used * word_size); 1018 previous_menu_items_used * word_size);
1019 1019
1020 /* Fill in menu_items with the current menu bar contents. 1020 /* Fill in menu_items with the current menu bar contents.
1021 This can evaluate Lisp code. */ 1021 This can evaluate Lisp code. */
1022 save_menu_items (); 1022 save_menu_items ();
1023 1023
1024 menu_items = FGET (f, menu_bar_vector); 1024 menu_items = f->menu_bar_vector;
1025 menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0; 1025 menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0;
1026 subitems = ASIZE (items) / 4; 1026 subitems = ASIZE (items) / 4;
1027 submenu_start = alloca ((subitems + 1) * sizeof *submenu_start); 1027 submenu_start = alloca ((subitems + 1) * sizeof *submenu_start);
diff --git a/src/xterm.c b/src/xterm.c
index 771b68e1be0..84b3a2aaddf 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -6363,7 +6363,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
6363 mouse highlighting. */ 6363 mouse highlighting. */
6364 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) 6364 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
6365 && (f == 0 6365 && (f == 0
6366 || !EQ (FGET (f, tool_bar_window), hlinfo->mouse_face_window))) 6366 || !EQ (f->tool_bar_window, hlinfo->mouse_face_window)))
6367 { 6367 {
6368 clear_mouse_face (hlinfo); 6368 clear_mouse_face (hlinfo);
6369 hlinfo->mouse_face_hidden = 1; 6369 hlinfo->mouse_face_hidden = 1;
@@ -6910,15 +6910,15 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
6910 if (f) 6910 if (f)
6911 { 6911 {
6912 /* Is this in the tool-bar? */ 6912 /* Is this in the tool-bar? */
6913 if (WINDOWP (FGET (f, tool_bar_window)) 6913 if (WINDOWP (f->tool_bar_window)
6914 && WINDOW_TOTAL_LINES (XWINDOW (FGET (f, tool_bar_window)))) 6914 && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window)))
6915 { 6915 {
6916 Lisp_Object window; 6916 Lisp_Object window;
6917 int x = event.xbutton.x; 6917 int x = event.xbutton.x;
6918 int y = event.xbutton.y; 6918 int y = event.xbutton.y;
6919 6919
6920 window = window_from_coordinates (f, x, y, 0, 1); 6920 window = window_from_coordinates (f, x, y, 0, 1);
6921 tool_bar_p = EQ (window, FGET (f, tool_bar_window)); 6921 tool_bar_p = EQ (window, f->tool_bar_window);
6922 6922
6923 if (tool_bar_p && event.xbutton.button < 4) 6923 if (tool_bar_p && event.xbutton.button < 4)
6924 { 6924 {
@@ -7509,7 +7509,7 @@ x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x, int
7509 } 7509 }
7510 7510
7511#ifdef HAVE_X_I18N 7511#ifdef HAVE_X_I18N
7512 if (w == XWINDOW (FGET (f, selected_window))) 7512 if (w == XWINDOW (f->selected_window))
7513 if (FRAME_XIC (f) && (FRAME_XIC_STYLE (f) & XIMPreeditPosition)) 7513 if (FRAME_XIC (f) && (FRAME_XIC_STYLE (f) & XIMPreeditPosition))
7514 xic_set_preeditarea (w, x, y); 7514 xic_set_preeditarea (w, x, y);
7515#endif 7515#endif
@@ -8160,7 +8160,7 @@ xim_instantiate_callback (Display *display, XPointer client_data, XPointer call_
8160 xic_set_statusarea (f); 8160 xic_set_statusarea (f);
8161 if (FRAME_XIC_STYLE (f) & XIMPreeditPosition) 8161 if (FRAME_XIC_STYLE (f) & XIMPreeditPosition)
8162 { 8162 {
8163 struct window *w = XWINDOW (FGET (f, selected_window)); 8163 struct window *w = XWINDOW (f->selected_window);
8164 xic_set_preeditarea (w, w->cursor.x, w->cursor.y); 8164 xic_set_preeditarea (w, w->cursor.x, w->cursor.y);
8165 } 8165 }
8166 } 8166 }
@@ -8948,7 +8948,7 @@ x_set_window_size (struct frame *f, int change_gravity, int cols, int rows)
8948#endif /* not USE_GTK */ 8948#endif /* not USE_GTK */
8949 8949
8950 /* If cursor was outside the new size, mark it as off. */ 8950 /* If cursor was outside the new size, mark it as off. */
8951 mark_window_cursors_off (XWINDOW (FGET (f, root_window))); 8951 mark_window_cursors_off (XWINDOW (f->root_window));
8952 8952
8953 /* Clear out any recollection of where the mouse highlighting was, 8953 /* Clear out any recollection of where the mouse highlighting was,
8954 since it might be in a place that's outside the new frame size. 8954 since it might be in a place that's outside the new frame size.