aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2012-08-06 09:27:54 +0400
committerDmitry Antipov2012-08-06 09:27:54 +0400
commitedd74c35125983cbf822b15828886c7d2e50b275 (patch)
tree2fd1c3704ee48251a092d1631dc0d560bfe1961d /src
parentba7b015436fce401af7f40d1ee8dcc08cdf2541a (diff)
downloademacs-edd74c35125983cbf822b15828886c7d2e50b275.tar.gz
emacs-edd74c35125983cbf822b15828886c7d2e50b275.zip
Separate read and write access to Lisp_Object slots of struct frame.
* frame.h (FGET, FSET): New macros similar to AREF and ASET. * 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/ChangeLog9
-rw-r--r--src/buffer.c16
-rw-r--r--src/data.c5
-rw-r--r--src/dispnew.c80
-rw-r--r--src/dosfns.c6
-rw-r--r--src/eval.c2
-rw-r--r--src/fontset.c2
-rw-r--r--src/frame.c128
-rw-r--r--src/frame.h24
-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.m60
-rw-r--r--src/nsmenu.m8
-rw-r--r--src/nsterm.m18
-rw-r--r--src/print.c2
-rw-r--r--src/term.c2
-rw-r--r--src/w32fns.c64
-rw-r--r--src/w32menu.c8
-rw-r--r--src/w32term.c22
-rw-r--r--src/window.c56
-rw-r--r--src/window.h8
-rw-r--r--src/xdisp.c124
-rw-r--r--src/xfaces.c18
-rw-r--r--src/xfns.c88
-rw-r--r--src/xmenu.c12
-rw-r--r--src/xterm.c32
28 files changed, 429 insertions, 409 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 61e7c3d8c23..c02f4f74848 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2
3 Separate read and write access to Lisp_Object slots of struct frame.
4 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
5 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
6 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
7 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
8 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
9
12012-08-05 Andreas Schwab <schwab@linux-m68k.org> 102012-08-05 Andreas Schwab <schwab@linux-m68k.org>
2 11
3 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT. 12 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
diff --git a/src/buffer.c b/src/buffer.c
index 37e520f9f5f..445f7bea263 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 (FVAR (XFRAME (frame), buffer_list)); 196 framelist = Fcopy_sequence (FGET (XFRAME (frame), buffer_list));
197 prevlist = Fnreverse (Fcopy_sequence 197 prevlist = Fnreverse (Fcopy_sequence
198 (FVAR (XFRAME (frame), buried_buffer_list))); 198 (FGET (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 = FVAR (XFRAME (frame), buffer_list); 1330 tail = FGET (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 FVAR (f, buffer_list) = Fcons (buffer, Fdelq (buffer, FVAR (f, buffer_list))); 1770 FSET (f, buffer_list, Fcons (buffer, Fdelq (buffer, FGET (f, buffer_list))));
1771 FVAR (f, buried_buffer_list) = Fdelq (buffer, FVAR (f, buried_buffer_list)); 1771 FSET (f, buried_buffer_list, Fdelq (buffer, FGET (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 FVAR (f, buffer_list) = Fdelq (buffer, FVAR (f, buffer_list)); 1808 FSET (f, buffer_list, Fdelq (buffer, FGET (f, buffer_list)));
1809 FVAR (f, buried_buffer_list) 1809 FSET (f, buried_buffer_list,
1810 = Fcons (buffer, Fdelq (buffer, FVAR (f, buried_buffer_list))); 1810 Fcons (buffer, Fdelq (buffer, FGET (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 f5942a84da1..0803cecf5ee 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1006,7 +1006,8 @@ 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, FVAR (XFRAME (selected_frame), param_alist)); 1009 tem1 = assq_no_quit (var, FGET (XFRAME (selected_frame),
1010 param_alist));
1010 blv->where = selected_frame; 1011 blv->where = selected_frame;
1011 } 1012 }
1012 else 1013 else
@@ -1179,7 +1180,7 @@ set_internal (register Lisp_Object symbol, register Lisp_Object newval, register
1179 XSETSYMBOL (symbol, sym); /* May have changed via aliasing. */ 1180 XSETSYMBOL (symbol, sym); /* May have changed via aliasing. */
1180 tem1 = Fassq (symbol, 1181 tem1 = Fassq (symbol,
1181 (blv->frame_local 1182 (blv->frame_local
1182 ? FVAR (XFRAME (where), param_alist) 1183 ? FGET (XFRAME (where), param_alist)
1183 : BVAR (XBUFFER (where), local_var_alist))); 1184 : BVAR (XBUFFER (where), local_var_alist)));
1184 blv->where = where; 1185 blv->where = where;
1185 blv->found = 1; 1186 blv->found = 1;
diff --git a/src/dispnew.c b/src/dispnew.c
index 9246c35d9c6..63fc35fd93e 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -844,12 +844,12 @@ clear_current_matrices (register struct frame *f)
844 /* Clear the matrix of the menu bar window, if such a window exists. 844 /* Clear the matrix of the menu bar window, if such a window exists.
845 The menu bar window is currently used to display menus on X when 845 The menu bar window is currently used to display menus on X when
846 no toolkit support is compiled in. */ 846 no toolkit support is compiled in. */
847 if (WINDOWP (FVAR (f, menu_bar_window))) 847 if (WINDOWP (FGET (f, menu_bar_window)))
848 clear_glyph_matrix (XWINDOW (FVAR (f, menu_bar_window))->current_matrix); 848 clear_glyph_matrix (XWINDOW (FGET (f, menu_bar_window))->current_matrix);
849 849
850 /* Clear the matrix of the tool-bar window, if any. */ 850 /* Clear the matrix of the tool-bar window, if any. */
851 if (WINDOWP (FVAR (f, tool_bar_window))) 851 if (WINDOWP (FGET (f, tool_bar_window)))
852 clear_glyph_matrix (XWINDOW (FVAR (f, tool_bar_window))->current_matrix); 852 clear_glyph_matrix (XWINDOW (FGET (f, tool_bar_window))->current_matrix);
853 853
854 /* Clear current window matrices. */ 854 /* Clear current window matrices. */
855 eassert (WINDOWP (FRAME_ROOT_WINDOW (f))); 855 eassert (WINDOWP (FRAME_ROOT_WINDOW (f)));
@@ -865,11 +865,11 @@ clear_desired_matrices (register struct frame *f)
865 if (f->desired_matrix) 865 if (f->desired_matrix)
866 clear_glyph_matrix (f->desired_matrix); 866 clear_glyph_matrix (f->desired_matrix);
867 867
868 if (WINDOWP (FVAR (f, menu_bar_window))) 868 if (WINDOWP (FGET (f, menu_bar_window)))
869 clear_glyph_matrix (XWINDOW (FVAR (f, menu_bar_window))->desired_matrix); 869 clear_glyph_matrix (XWINDOW (FGET (f, menu_bar_window))->desired_matrix);
870 870
871 if (WINDOWP (FVAR (f, tool_bar_window))) 871 if (WINDOWP (FGET (f, tool_bar_window)))
872 clear_glyph_matrix (XWINDOW (FVAR (f, tool_bar_window))->desired_matrix); 872 clear_glyph_matrix (XWINDOW (FGET (f, tool_bar_window))->desired_matrix);
873 873
874 /* Do it for window matrices. */ 874 /* Do it for window matrices. */
875 eassert (WINDOWP (FRAME_ROOT_WINDOW (f))); 875 eassert (WINDOWP (FRAME_ROOT_WINDOW (f)));
@@ -1904,7 +1904,7 @@ static void
1904adjust_frame_glyphs_initially (void) 1904adjust_frame_glyphs_initially (void)
1905{ 1905{
1906 struct frame *sf = SELECTED_FRAME (); 1906 struct frame *sf = SELECTED_FRAME ();
1907 struct window *root = XWINDOW (FVAR (sf, root_window)); 1907 struct window *root = XWINDOW (FGET (sf, root_window));
1908 struct window *mini = XWINDOW (WVAR (root, next)); 1908 struct window *mini = XWINDOW (WVAR (root, next));
1909 int frame_lines = FRAME_LINES (sf); 1909 int frame_lines = FRAME_LINES (sf);
1910 int frame_cols = FRAME_COLS (sf); 1910 int frame_cols = FRAME_COLS (sf);
@@ -2187,15 +2187,15 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
2187 { 2187 {
2188 /* Allocate a dummy window if not already done. */ 2188 /* Allocate a dummy window if not already done. */
2189 struct window *w; 2189 struct window *w;
2190 if (NILP (FVAR (f, menu_bar_window))) 2190 if (NILP (FGET (f, menu_bar_window)))
2191 { 2191 {
2192 FVAR (f, menu_bar_window) = make_window (); 2192 FSET (f, menu_bar_window, make_window ());
2193 w = XWINDOW (FVAR (f, menu_bar_window)); 2193 w = XWINDOW (FGET (f, menu_bar_window));
2194 XSETFRAME (WVAR (w, frame), f); 2194 XSETFRAME (WVAR (w, frame), f);
2195 w->pseudo_window_p = 1; 2195 w->pseudo_window_p = 1;
2196 } 2196 }
2197 else 2197 else
2198 w = XWINDOW (FVAR (f, menu_bar_window)); 2198 w = XWINDOW (FGET (f, menu_bar_window));
2199 2199
2200 /* Set window dimensions to frame dimensions and allocate or 2200 /* Set window dimensions to frame dimensions and allocate or
2201 adjust glyph matrices of W. */ 2201 adjust glyph matrices of W. */
@@ -2213,15 +2213,15 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
2213 /* Allocate/ reallocate matrices of the tool bar window. If we 2213 /* Allocate/ reallocate matrices of the tool bar window. If we
2214 don't have a tool bar window yet, make one. */ 2214 don't have a tool bar window yet, make one. */
2215 struct window *w; 2215 struct window *w;
2216 if (NILP (FVAR (f, tool_bar_window))) 2216 if (NILP (FGET (f, tool_bar_window)))
2217 { 2217 {
2218 FVAR (f, tool_bar_window) = make_window (); 2218 FSET (f, tool_bar_window, make_window ());
2219 w = XWINDOW (FVAR (f, tool_bar_window)); 2219 w = XWINDOW (FGET (f, tool_bar_window));
2220 XSETFRAME (WVAR (w, frame), f); 2220 XSETFRAME (WVAR (w, frame), f);
2221 w->pseudo_window_p = 1; 2221 w->pseudo_window_p = 1;
2222 } 2222 }
2223 else 2223 else
2224 w = XWINDOW (FVAR (f, tool_bar_window)); 2224 w = XWINDOW (FGET (f, tool_bar_window));
2225 2225
2226 XSETFASTINT (WVAR (w, top_line), FRAME_MENU_BAR_LINES (f)); 2226 XSETFASTINT (WVAR (w, top_line), FRAME_MENU_BAR_LINES (f));
2227 XSETFASTINT (WVAR (w, left_col), 0); 2227 XSETFASTINT (WVAR (w, left_col), 0);
@@ -2281,28 +2281,28 @@ free_glyphs (struct frame *f)
2281 f->glyphs_initialized_p = 0; 2281 f->glyphs_initialized_p = 0;
2282 2282
2283 /* Release window sub-matrices. */ 2283 /* Release window sub-matrices. */
2284 if (!NILP (FVAR (f, root_window))) 2284 if (!NILP (FGET (f, root_window)))
2285 free_window_matrices (XWINDOW (FVAR (f, root_window))); 2285 free_window_matrices (XWINDOW (FGET (f, root_window)));
2286 2286
2287 /* Free the dummy window for menu bars without X toolkit and its 2287 /* Free the dummy window for menu bars without X toolkit and its
2288 glyph matrices. */ 2288 glyph matrices. */
2289 if (!NILP (FVAR (f, menu_bar_window))) 2289 if (!NILP (FGET (f, menu_bar_window)))
2290 { 2290 {
2291 struct window *w = XWINDOW (FVAR (f, menu_bar_window)); 2291 struct window *w = XWINDOW (FGET (f, menu_bar_window));
2292 free_glyph_matrix (w->desired_matrix); 2292 free_glyph_matrix (w->desired_matrix);
2293 free_glyph_matrix (w->current_matrix); 2293 free_glyph_matrix (w->current_matrix);
2294 w->desired_matrix = w->current_matrix = NULL; 2294 w->desired_matrix = w->current_matrix = NULL;
2295 FVAR (f, menu_bar_window) = Qnil; 2295 FSET (f, menu_bar_window, Qnil);
2296 } 2296 }
2297 2297
2298 /* Free the tool bar window and its glyph matrices. */ 2298 /* Free the tool bar window and its glyph matrices. */
2299 if (!NILP (FVAR (f, tool_bar_window))) 2299 if (!NILP (FGET (f, tool_bar_window)))
2300 { 2300 {
2301 struct window *w = XWINDOW (FVAR (f, tool_bar_window)); 2301 struct window *w = XWINDOW (FGET (f, tool_bar_window));
2302 free_glyph_matrix (w->desired_matrix); 2302 free_glyph_matrix (w->desired_matrix);
2303 free_glyph_matrix (w->current_matrix); 2303 free_glyph_matrix (w->current_matrix);
2304 w->desired_matrix = w->current_matrix = NULL; 2304 w->desired_matrix = w->current_matrix = NULL;
2305 FVAR (f, tool_bar_window) = Qnil; 2305 FSET (f, tool_bar_window, Qnil);
2306 } 2306 }
2307 2307
2308 /* Release frame glyph matrices. Reset fields to zero in 2308 /* Release frame glyph matrices. Reset fields to zero in
@@ -2725,7 +2725,7 @@ make_current (struct glyph_matrix *desired_matrix, struct glyph_matrix *current_
2725 /* If we are called on frame matrices, perform analogous operations 2725 /* If we are called on frame matrices, perform analogous operations
2726 for window matrices. */ 2726 for window matrices. */
2727 if (frame_matrix_frame) 2727 if (frame_matrix_frame)
2728 mirror_make_current (XWINDOW (FVAR (frame_matrix_frame, root_window)), row); 2728 mirror_make_current (XWINDOW (FGET (frame_matrix_frame, root_window)), row);
2729} 2729}
2730 2730
2731 2731
@@ -2823,7 +2823,7 @@ mirrored_line_dance (struct glyph_matrix *matrix, int unchanged_at_top, int nlin
2823 2823
2824 /* Do the same for window matrices, if MATRIX is a frame matrix. */ 2824 /* Do the same for window matrices, if MATRIX is a frame matrix. */
2825 if (frame_matrix_frame) 2825 if (frame_matrix_frame)
2826 mirror_line_dance (XWINDOW (FVAR (frame_matrix_frame, root_window)), 2826 mirror_line_dance (XWINDOW (FGET (frame_matrix_frame, root_window)),
2827 unchanged_at_top, nlines, copy_from, retained_p); 2827 unchanged_at_top, nlines, copy_from, retained_p);
2828} 2828}
2829 2829
@@ -3186,7 +3186,7 @@ update_frame (struct frame *f, int force_p, int inhibit_hairy_id_p)
3186{ 3186{
3187 /* 1 means display has been paused because of pending input. */ 3187 /* 1 means display has been paused because of pending input. */
3188 int paused_p; 3188 int paused_p;
3189 struct window *root_window = XWINDOW (FVAR (f, root_window)); 3189 struct window *root_window = XWINDOW (FGET (f, root_window));
3190 3190
3191 if (redisplay_dont_pause) 3191 if (redisplay_dont_pause)
3192 force_p = 1; 3192 force_p = 1;
@@ -3221,13 +3221,13 @@ update_frame (struct frame *f, int force_p, int inhibit_hairy_id_p)
3221 3221
3222 /* Update the menu bar on X frames that don't have toolkit 3222 /* Update the menu bar on X frames that don't have toolkit
3223 support. */ 3223 support. */
3224 if (WINDOWP (FVAR (f, menu_bar_window))) 3224 if (WINDOWP (FGET (f, menu_bar_window)))
3225 update_window (XWINDOW (FVAR (f, menu_bar_window)), 1); 3225 update_window (XWINDOW (FGET (f, menu_bar_window)), 1);
3226 3226
3227 /* Update the tool-bar window, if present. */ 3227 /* Update the tool-bar window, if present. */
3228 if (WINDOWP (FVAR (f, tool_bar_window))) 3228 if (WINDOWP (FGET (f, tool_bar_window)))
3229 { 3229 {
3230 struct window *w = XWINDOW (FVAR (f, tool_bar_window)); 3230 struct window *w = XWINDOW (FGET (f, tool_bar_window));
3231 3231
3232 /* Update tool-bar window. */ 3232 /* Update tool-bar window. */
3233 if (w->must_be_updated_p) 3233 if (w->must_be_updated_p)
@@ -3239,10 +3239,10 @@ update_frame (struct frame *f, int force_p, int inhibit_hairy_id_p)
3239 3239
3240 /* Swap tool-bar strings. We swap because we want to 3240 /* Swap tool-bar strings. We swap because we want to
3241 reuse strings. */ 3241 reuse strings. */
3242 tem = FVAR (f, current_tool_bar_string); 3242 tem = FGET (f, current_tool_bar_string);
3243 FVAR (f, current_tool_bar_string) = FVAR (f, 3243 FSET (f, current_tool_bar_string,
3244 desired_tool_bar_string); 3244 FGET (f, desired_tool_bar_string));
3245 FVAR (f, desired_tool_bar_string) = tem; 3245 FSET (f, desired_tool_bar_string, tem);
3246 } 3246 }
3247 } 3247 }
3248 3248
@@ -5764,8 +5764,8 @@ change_frame_size_1 (register struct frame *f, int newheight, int newwidth, int
5764 if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f)) 5764 if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f))
5765 FrameCols (FRAME_TTY (f)) = newwidth; 5765 FrameCols (FRAME_TTY (f)) = newwidth;
5766 5766
5767 if (WINDOWP (FVAR (f, tool_bar_window))) 5767 if (WINDOWP (FGET (f, tool_bar_window)))
5768 XSETFASTINT (WVAR (XWINDOW (FVAR (f, tool_bar_window)), total_cols), newwidth); 5768 XSETFASTINT (WVAR (XWINDOW (FGET (f, tool_bar_window)), total_cols), newwidth);
5769 } 5769 }
5770 5770
5771 FRAME_LINES (f) = newheight; 5771 FRAME_LINES (f) = newheight;
@@ -6089,7 +6089,7 @@ pass nil for VARIABLE. */)
6089 goto changed; 6089 goto changed;
6090 if (vecp == end) 6090 if (vecp == end)
6091 goto changed; 6091 goto changed;
6092 if (!EQ (*vecp++, FVAR (XFRAME (frame), name))) 6092 if (!EQ (*vecp++, FGET (XFRAME (frame), name)))
6093 goto changed; 6093 goto changed;
6094 } 6094 }
6095 /* Check that the buffer info matches. */ 6095 /* Check that the buffer info matches. */
@@ -6146,7 +6146,7 @@ pass nil for VARIABLE. */)
6146 FOR_EACH_FRAME (tail, frame) 6146 FOR_EACH_FRAME (tail, frame)
6147 { 6147 {
6148 *vecp++ = frame; 6148 *vecp++ = frame;
6149 *vecp++ = FVAR (XFRAME (frame), name); 6149 *vecp++ = FGET (XFRAME (frame), name);
6150 } 6150 }
6151 for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail)) 6151 for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail))
6152 { 6152 {
diff --git a/src/dosfns.c b/src/dosfns.c
index 162a98382cb..20efc3dee70 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -468,15 +468,15 @@ 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, FVAR (f, title))) 471 if (EQ (name, FGET (f, title)))
472 return; 472 return;
473 473
474 update_mode_lines = 1; 474 update_mode_lines = 1;
475 475
476 FVAR (f, title) = name; 476 FSET (f, title, name);
477 477
478 if (NILP (name)) 478 if (NILP (name))
479 name = FVAR (f, name); 479 name = FGET (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 5eb144eb0b2..e6d4a4ceac9 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, FVAR (XFRAME (where), param_alist)))) 3257 : !NILP (Fassq (symbol, FGET (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 7ea1deeaecb..7f6fdeda36f 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 FVAR (f, name))); 2121 FGET (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 308179e206f..f488a534984 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 (FVAR (f, root_window), nlines - olines); 173 set_menu_bar_lines_1 (FGET (f, root_window), nlines - olines);
174 adjust_glyphs (f); 174 adjust_glyphs (f);
175 } 175 }
176} 176}
@@ -269,7 +269,7 @@ make_frame (int mini_p)
269 269
270 /* Initialize Lisp data. Note that allocate_frame initializes all 270 /* Initialize Lisp data. Note that allocate_frame initializes all
271 Lisp data to nil, so do it only for slots which should not be nil. */ 271 Lisp data to nil, so do it only for slots which should not be nil. */
272 FVAR (f, tool_bar_position) = Qtop; 272 FSET (f, tool_bar_position, Qtop);
273 273
274 /* Initialize non-Lisp data. Note that allocate_frame zeroes out all 274 /* Initialize non-Lisp data. Note that allocate_frame zeroes out all
275 non-Lisp data, so do it only for slots which should not be zero. 275 non-Lisp data, so do it only for slots which should not be zero.
@@ -293,13 +293,13 @@ make_frame (int mini_p)
293 WVAR (XWINDOW (mini_window), prev) = root_window; 293 WVAR (XWINDOW (mini_window), prev) = root_window;
294 XWINDOW (mini_window)->mini = 1; 294 XWINDOW (mini_window)->mini = 1;
295 WVAR (XWINDOW (mini_window), frame) = frame; 295 WVAR (XWINDOW (mini_window), frame) = frame;
296 FVAR (f, minibuffer_window) = mini_window; 296 FSET (f, minibuffer_window, mini_window);
297 } 297 }
298 else 298 else
299 { 299 {
300 mini_window = Qnil; 300 mini_window = Qnil;
301 WVAR (XWINDOW (root_window), next) = Qnil; 301 WVAR (XWINDOW (root_window), next) = Qnil;
302 FVAR (f, minibuffer_window) = Qnil; 302 FSET (f, minibuffer_window, Qnil);
303 } 303 }
304 304
305 WVAR (XWINDOW (root_window), frame) = frame; 305 WVAR (XWINDOW (root_window), frame) = frame;
@@ -339,7 +339,7 @@ make_frame (int mini_p)
339 etc. Running Lisp functions at this point surely ends in a 339 etc. Running Lisp functions at this point surely ends in a
340 SEGV. */ 340 SEGV. */
341 set_window_buffer (root_window, buf, 0, 0); 341 set_window_buffer (root_window, buf, 0, 0);
342 FVAR (f, buffer_list) = Fcons (buf, Qnil); 342 FSET (f, buffer_list, Fcons (buf, Qnil));
343 } 343 }
344 344
345 if (mini_p) 345 if (mini_p)
@@ -352,11 +352,11 @@ make_frame (int mini_p)
352 0, 0); 352 0, 0);
353 } 353 }
354 354
355 FVAR (f, root_window) = root_window; 355 FSET (f, root_window, root_window);
356 FVAR (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 (FVAR (f, selected_window))->use_time = ++window_select_count; 359 XWINDOW (FGET (f, selected_window))->use_time = ++window_select_count;
360 360
361 return f; 361 return f;
362} 362}
@@ -398,11 +398,11 @@ make_frame_without_minibuffer (register Lisp_Object mini_window, KBOARD *kb, Lis
398 UNGCPRO; 398 UNGCPRO;
399 } 399 }
400 400
401 mini_window = FVAR (XFRAME (KVAR (kb, Vdefault_minibuffer_frame)), 401 mini_window = FGET (XFRAME (KVAR (kb, Vdefault_minibuffer_frame)),
402 minibuffer_window); 402 minibuffer_window);
403 } 403 }
404 404
405 FVAR (f, minibuffer_window) = mini_window; 405 FSET (f, minibuffer_window, mini_window);
406 406
407 /* Make the chosen minibuffer window display the proper minibuffer, 407 /* Make the chosen minibuffer window display the proper minibuffer,
408 unless it is already showing a minibuffer. */ 408 unless it is already showing a minibuffer. */
@@ -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 = FVAR (f, minibuffer_window) = FVAR (f, root_window); 440 mini_window = FSET (f, minibuffer_window, FGET (f, root_window));
441 XWINDOW (mini_window)->mini = 1; 441 XWINDOW (mini_window)->mini = 1;
442 WVAR (XWINDOW (mini_window), next) = Qnil; 442 WVAR (XWINDOW (mini_window), next) = Qnil;
443 WVAR (XWINDOW (mini_window), prev) = Qnil; 443 WVAR (XWINDOW (mini_window), prev) = Qnil;
@@ -478,7 +478,7 @@ make_initial_frame (void)
478 Vframe_list = Fcons (frame, Vframe_list); 478 Vframe_list = Fcons (frame, Vframe_list);
479 479
480 tty_frame_count = 1; 480 tty_frame_count = 1;
481 FVAR (f, name) = build_pure_c_string ("F1"); 481 FSET (f, name, build_pure_c_string ("F1"));
482 482
483 f->visible = 1; 483 f->visible = 1;
484 f->async_visible = 1; 484 f->async_visible = 1;
@@ -519,7 +519,7 @@ make_terminal_frame (struct terminal *terminal)
519 XSETFRAME (frame, f); 519 XSETFRAME (frame, f);
520 Vframe_list = Fcons (frame, Vframe_list); 520 Vframe_list = Fcons (frame, Vframe_list);
521 521
522 FVAR (f, name) = make_formatted_string (name, "F%"pMd, ++tty_frame_count); 522 FSET (f, name, make_formatted_string (name, "F%"pMd, ++tty_frame_count));
523 523
524 f->visible = 1; /* FRAME_SET_VISIBLE wd set frame_garbaged. */ 524 f->visible = 1; /* FRAME_SET_VISIBLE wd set frame_garbaged. */
525 f->async_visible = 1; /* Don't let visible be cleared later. */ 525 f->async_visible = 1; /* Don't let visible be cleared later. */
@@ -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, FVAR (XFRAME (selected_frame), param_alist)); 573 result = Fassq (parameter, FGET (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 FVAR (f, face_alist) = Fcopy_alist (FVAR (sf, face_alist)); 692 FSET (f, face_alist, Fcopy_alist (FGET (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 = FVAR (f, face_alist); CONSP (tem); tem = XCDR (tem)) 696 for (tem = FGET (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 (FVAR (XFRAME (frame), selected_window), norecord); 800 Fselect_window (FGET (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 (FVAR (f, minibuffer_window), minibuf_window)) 1241 if (EQ (FGET (f, minibuffer_window), minibuf_window))
1242 { 1242 {
1243 Fset_window_buffer (FVAR (sf, minibuffer_window), 1243 Fset_window_buffer (FGET (sf, minibuffer_window),
1244 WVAR (XWINDOW (minibuf_window), buffer), Qnil); 1244 WVAR (XWINDOW (minibuf_window), buffer), Qnil);
1245 minibuf_window = FVAR (sf, minibuffer_window); 1245 minibuf_window = FGET (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 (FVAR (f, minibuffer_window), echo_area_window)) 1254 if (EQ (FGET (f, minibuffer_window), echo_area_window))
1255 echo_area_window = FVAR (sf, minibuffer_window); 1255 echo_area_window = FGET (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,8 +1273,8 @@ 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 (FVAR (f, root_window)); 1276 delete_all_child_windows (FGET (f, root_window));
1277 FVAR (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);
1280 FRAME_SET_VISIBLE (f, 0); 1280 FRAME_SET_VISIBLE (f, 0);
@@ -1283,7 +1283,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
1283 garbage collection. The frame object itself may not be garbage 1283 garbage collection. The frame object itself may not be garbage
1284 collected until much later, because recent_keys and other data 1284 collected until much later, because recent_keys and other data
1285 structures can still refer to it. */ 1285 structures can still refer to it. */
1286 FVAR (f, menu_bar_vector) = Qnil; 1286 FSET (f, menu_bar_vector, Qnil);
1287 1287
1288 free_font_driver_list (f); 1288 free_font_driver_list (f);
1289 xfree (f->namebuf); 1289 xfree (f->namebuf);
@@ -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 (FVAR (XFRAME (frame), root_window)); 1659 make_frame_visible_1 (FGET (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 (FVAR (XFRAME (frame), minibuffer_window), minibuf_window)) 1713 if (EQ (FGET (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 (FVAR (sf, minibuffer_window), 1716 Fset_window_buffer (FGET (sf, minibuffer_window),
1717 WVAR (XWINDOW (minibuf_window), buffer), Qnil); 1717 WVAR (XWINDOW (minibuf_window), buffer), Qnil);
1718 minibuf_window = FVAR (sf, minibuffer_window); 1718 minibuf_window = FGET (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 (FVAR (XFRAME (frame), minibuffer_window), minibuf_window)) 1751 if (EQ (FGET (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 (FVAR (sf, minibuffer_window), 1754 Fset_window_buffer (FGET (sf, minibuffer_window),
1755 WVAR (XWINDOW (minibuf_window), buffer), Qnil); 1755 WVAR (XWINDOW (minibuf_window), buffer), Qnil);
1756 minibuf_window = FVAR (sf, minibuffer_window); 1756 minibuf_window = FGET (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. */
@@ -1907,7 +1907,7 @@ The redirection lasts until `redirect-frame-focus' is called to change it. */)
1907 1907
1908 f = XFRAME (frame); 1908 f = XFRAME (frame);
1909 1909
1910 FVAR (f, focus_frame) = focus_frame; 1910 FSET (f, focus_frame, focus_frame);
1911 1911
1912 if (FRAME_TERMINAL (f)->frame_rehighlight_hook) 1912 if (FRAME_TERMINAL (f)->frame_rehighlight_hook)
1913 (*FRAME_TERMINAL (f)->frame_rehighlight_hook) (f); 1913 (*FRAME_TERMINAL (f)->frame_rehighlight_hook) (f);
@@ -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, FVAR (frame, param_alist)); 1943 tem = Fassq (prop, FGET (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 FVAR (XFRAME (frame), buffer_predicate); 1955 return FGET (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 FVAR (XFRAME (frame), buffer_list); 1963 return FGET (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. */
@@ -1972,10 +1972,10 @@ frames_discard_buffer (Lisp_Object buffer)
1972 1972
1973 FOR_EACH_FRAME (tail, frame) 1973 FOR_EACH_FRAME (tail, frame)
1974 { 1974 {
1975 FVAR (XFRAME (frame), buffer_list) 1975 FSET (XFRAME (frame), buffer_list,
1976 = Fdelq (buffer, FVAR (XFRAME (frame), buffer_list)); 1976 Fdelq (buffer, FGET (XFRAME (frame), buffer_list)));
1977 FVAR (XFRAME (frame), buried_buffer_list) 1977 FSET (XFRAME (frame), buried_buffer_list,
1978 = Fdelq (buffer, FVAR (XFRAME (frame), buried_buffer_list)); 1978 Fdelq (buffer, FGET (XFRAME (frame), buried_buffer_list)));
1979 } 1979 }
1980} 1980}
1981 1981
@@ -2023,8 +2023,8 @@ 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 (FVAR (f, name)), 2026 if (frame_name_fnn_p (SSDATA (FGET (f, name)),
2027 SBYTES (FVAR (f, name)))) 2027 SBYTES (FGET (f, name))))
2028 return; 2028 return;
2029 2029
2030 name = make_formatted_string (namebuf, "F%"pMd, ++tty_frame_count); 2030 name = make_formatted_string (namebuf, "F%"pMd, ++tty_frame_count);
@@ -2034,7 +2034,7 @@ set_term_frame_name (struct frame *f, Lisp_Object name)
2034 CHECK_STRING (name); 2034 CHECK_STRING (name);
2035 2035
2036 /* Don't change the name if it's already NAME. */ 2036 /* Don't change the name if it's already NAME. */
2037 if (! NILP (Fstring_equal (name, FVAR (f, name)))) 2037 if (! NILP (Fstring_equal (name, FGET (f, name))))
2038 return; 2038 return;
2039 2039
2040 /* Don't allow the user to set the frame name to F<num>, so it 2040 /* Don't allow the user to set the frame name to F<num>, so it
@@ -2043,7 +2043,7 @@ set_term_frame_name (struct frame *f, Lisp_Object name)
2043 error ("Frame names of the form F<num> are usurped by Emacs"); 2043 error ("Frame names of the form F<num> are usurped by Emacs");
2044 } 2044 }
2045 2045
2046 FVAR (f, name) = name; 2046 FSET (f, name, name);
2047 update_mode_lines = 1; 2047 update_mode_lines = 1;
2048} 2048}
2049 2049
@@ -2060,7 +2060,7 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
2060 for (; CONSP (val); val = XCDR (val)) 2060 for (; CONSP (val); val = XCDR (val))
2061 if (!NILP (Fbuffer_live_p (XCAR (val)))) 2061 if (!NILP (Fbuffer_live_p (XCAR (val))))
2062 list = Fcons (XCAR (val), list); 2062 list = Fcons (XCAR (val), list);
2063 FVAR (f, buffer_list) = Fnreverse (list); 2063 FSET (f, buffer_list, Fnreverse (list));
2064 return; 2064 return;
2065 } 2065 }
2066 if (EQ (prop, Qburied_buffer_list)) 2066 if (EQ (prop, Qburied_buffer_list))
@@ -2069,7 +2069,7 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
2069 for (; CONSP (val); val = XCDR (val)) 2069 for (; CONSP (val); val = XCDR (val))
2070 if (!NILP (Fbuffer_live_p (XCAR (val)))) 2070 if (!NILP (Fbuffer_live_p (XCAR (val))))
2071 list = Fcons (XCAR (val), list); 2071 list = Fcons (XCAR (val), list);
2072 FVAR (f, buried_buffer_list) = Fnreverse (list); 2072 FSET (f, buried_buffer_list, Fnreverse (list));
2073 return; 2073 return;
2074 } 2074 }
2075 2075
@@ -2104,9 +2104,9 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
2104 FRAME_TTY (f)->previous_frame = NULL; 2104 FRAME_TTY (f)->previous_frame = NULL;
2105 2105
2106 /* Update the frame parameter alist. */ 2106 /* Update the frame parameter alist. */
2107 old_alist_elt = Fassq (prop, FVAR (f, param_alist)); 2107 old_alist_elt = Fassq (prop, FGET (f, param_alist));
2108 if (EQ (old_alist_elt, Qnil)) 2108 if (EQ (old_alist_elt, Qnil))
2109 FVAR (f, param_alist) = Fcons (Fcons (prop, val), FVAR (f, param_alist)); 2109 FSET (f, param_alist, Fcons (Fcons (prop, val), FGET (f, param_alist)));
2110 else 2110 else
2111 Fsetcdr (old_alist_elt, val); 2111 Fsetcdr (old_alist_elt, val);
2112 2112
@@ -2114,7 +2114,7 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
2114 in addition to the alist. */ 2114 in addition to the alist. */
2115 2115
2116 if (EQ (prop, Qbuffer_predicate)) 2116 if (EQ (prop, Qbuffer_predicate))
2117 FVAR (f, buffer_predicate) = val; 2117 FSET (f, buffer_predicate, val);
2118 2118
2119 if (! FRAME_WINDOW_P (f)) 2119 if (! FRAME_WINDOW_P (f))
2120 { 2120 {
@@ -2130,11 +2130,11 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
2130 error ("Surrogate minibuffer windows must be minibuffer windows"); 2130 error ("Surrogate minibuffer windows must be minibuffer windows");
2131 2131
2132 if ((FRAME_HAS_MINIBUF_P (f) || FRAME_MINIBUF_ONLY_P (f)) 2132 if ((FRAME_HAS_MINIBUF_P (f) || FRAME_MINIBUF_ONLY_P (f))
2133 && !EQ (val, FVAR (f, minibuffer_window))) 2133 && !EQ (val, FGET (f, minibuffer_window)))
2134 error ("Can't change the surrogate minibuffer of a frame with its own minibuffer"); 2134 error ("Can't change the surrogate minibuffer of a frame with its own minibuffer");
2135 2135
2136 /* Install the chosen minibuffer window, with proper buffer. */ 2136 /* Install the chosen minibuffer window, with proper buffer. */
2137 FVAR (f, minibuffer_window) = val; 2137 FSET (f, minibuffer_window, val);
2138 } 2138 }
2139} 2139}
2140 2140
@@ -2159,7 +2159,7 @@ If FRAME is omitted, return information on the currently selected frame. */)
2159 if (!FRAME_LIVE_P (f)) 2159 if (!FRAME_LIVE_P (f))
2160 return Qnil; 2160 return Qnil;
2161 2161
2162 alist = Fcopy_alist (FVAR (f, param_alist)); 2162 alist = Fcopy_alist (FGET (f, param_alist));
2163 GCPRO1 (alist); 2163 GCPRO1 (alist);
2164 2164
2165 if (!FRAME_WINDOW_P (f)) 2165 if (!FRAME_WINDOW_P (f))
@@ -2205,7 +2205,7 @@ If FRAME is omitted, return information on the currently selected frame. */)
2205 : FRAME_W32_P (f) ? "w32term" 2205 : FRAME_W32_P (f) ? "w32term"
2206 :"tty")); 2206 :"tty"));
2207 } 2207 }
2208 store_in_alist (&alist, Qname, FVAR (f, name)); 2208 store_in_alist (&alist, Qname, FGET (f, name));
2209 height = (f->new_text_lines ? f->new_text_lines : FRAME_LINES (f)); 2209 height = (f->new_text_lines ? f->new_text_lines : FRAME_LINES (f));
2210 store_in_alist (&alist, Qheight, make_number (height)); 2210 store_in_alist (&alist, Qheight, make_number (height));
2211 width = (f->new_text_cols ? f->new_text_cols : FRAME_COLS (f)); 2211 width = (f->new_text_cols ? f->new_text_cols : FRAME_COLS (f));
@@ -2218,7 +2218,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)); 2218 store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil));
2219 store_in_alist (&alist, Qbuffer_list, frame_buffer_list (frame)); 2219 store_in_alist (&alist, Qbuffer_list, frame_buffer_list (frame));
2220 store_in_alist (&alist, Qburied_buffer_list, 2220 store_in_alist (&alist, Qburied_buffer_list,
2221 FVAR (XFRAME (frame), buried_buffer_list)); 2221 FGET (XFRAME (frame), buried_buffer_list));
2222 2222
2223 /* I think this should be done with a hook. */ 2223 /* I think this should be done with a hook. */
2224#ifdef HAVE_WINDOW_SYSTEM 2224#ifdef HAVE_WINDOW_SYSTEM
@@ -2259,7 +2259,7 @@ If FRAME is nil, describe the currently selected frame. */)
2259 { 2259 {
2260 /* Avoid consing in frequent cases. */ 2260 /* Avoid consing in frequent cases. */
2261 if (EQ (parameter, Qname)) 2261 if (EQ (parameter, Qname))
2262 value = FVAR (f, name); 2262 value = FGET (f, name);
2263#ifdef HAVE_X_WINDOWS 2263#ifdef HAVE_X_WINDOWS
2264 else if (EQ (parameter, Qdisplay) && FRAME_X_P (f)) 2264 else if (EQ (parameter, Qdisplay) && FRAME_X_P (f))
2265 value = XCAR (FRAME_X_DISPLAY_INFO (f)->name_list_element); 2265 value = XCAR (FRAME_X_DISPLAY_INFO (f)->name_list_element);
@@ -2267,7 +2267,7 @@ If FRAME is nil, describe the currently selected frame. */)
2267 else if (EQ (parameter, Qbackground_color) 2267 else if (EQ (parameter, Qbackground_color)
2268 || EQ (parameter, Qforeground_color)) 2268 || EQ (parameter, Qforeground_color))
2269 { 2269 {
2270 value = Fassq (parameter, FVAR (f, param_alist)); 2270 value = Fassq (parameter, FGET (f, param_alist));
2271 if (CONSP (value)) 2271 if (CONSP (value))
2272 { 2272 {
2273 value = XCDR (value); 2273 value = XCDR (value);
@@ -2305,7 +2305,7 @@ If FRAME is nil, describe the currently selected frame. */)
2305 } 2305 }
2306 else if (EQ (parameter, Qdisplay_type) 2306 else if (EQ (parameter, Qdisplay_type)
2307 || EQ (parameter, Qbackground_mode)) 2307 || EQ (parameter, Qbackground_mode))
2308 value = Fcdr (Fassq (parameter, FVAR (f, param_alist))); 2308 value = Fcdr (Fassq (parameter, FGET (f, param_alist)));
2309 else 2309 else
2310 /* FIXME: Avoid this code path at all (as well as code duplication) 2310 /* FIXME: Avoid this code path at all (as well as code duplication)
2311 by sharing more code with Fframe_parameters. */ 2311 by sharing more code with Fframe_parameters. */
@@ -2891,14 +2891,14 @@ x_set_frame_parameters (FRAME_PTR f, Lisp_Object alist)
2891 if (! TYPE_RANGED_INTEGERP (int, icon_left)) 2891 if (! TYPE_RANGED_INTEGERP (int, icon_left))
2892 { 2892 {
2893 icon_left_no_change = 1; 2893 icon_left_no_change = 1;
2894 icon_left = Fcdr (Fassq (Qicon_left, FVAR (f, param_alist))); 2894 icon_left = Fcdr (Fassq (Qicon_left, FGET (f, param_alist)));
2895 if (NILP (icon_left)) 2895 if (NILP (icon_left))
2896 XSETINT (icon_left, 0); 2896 XSETINT (icon_left, 0);
2897 } 2897 }
2898 if (! TYPE_RANGED_INTEGERP (int, icon_top)) 2898 if (! TYPE_RANGED_INTEGERP (int, icon_top))
2899 { 2899 {
2900 icon_top_no_change = 1; 2900 icon_top_no_change = 1;
2901 icon_top = Fcdr (Fassq (Qicon_top, FVAR (f, param_alist))); 2901 icon_top = Fcdr (Fassq (Qicon_top, FGET (f, param_alist)));
2902 if (NILP (icon_top)) 2902 if (NILP (icon_top))
2903 XSETINT (icon_top, 0); 2903 XSETINT (icon_top, 0);
2904 } 2904 }
@@ -3058,7 +3058,7 @@ x_report_frame_params (struct frame *f, Lisp_Object *alistptr)
3058 store_in_alist (alistptr, Qouter_window_id, 3058 store_in_alist (alistptr, Qouter_window_id,
3059 make_formatted_string (buf, "%lu", w)); 3059 make_formatted_string (buf, "%lu", w));
3060#endif 3060#endif
3061 store_in_alist (alistptr, Qicon_name, FVAR (f, icon_name)); 3061 store_in_alist (alistptr, Qicon_name, FGET (f, icon_name));
3062 FRAME_SAMPLE_VISIBILITY (f); 3062 FRAME_SAMPLE_VISIBILITY (f);
3063 store_in_alist (alistptr, Qvisibility, 3063 store_in_alist (alistptr, Qvisibility,
3064 (FRAME_VISIBLE_P (f) ? Qt 3064 (FRAME_VISIBLE_P (f) ? Qt
@@ -3072,7 +3072,7 @@ x_report_frame_params (struct frame *f, Lisp_Object *alistptr)
3072 XSETFASTINT (tem, FRAME_X_OUTPUT (f)->parent_desc); 3072 XSETFASTINT (tem, FRAME_X_OUTPUT (f)->parent_desc);
3073 store_in_alist (alistptr, Qexplicit_name, (f->explicit_name ? Qt : Qnil)); 3073 store_in_alist (alistptr, Qexplicit_name, (f->explicit_name ? Qt : Qnil));
3074 store_in_alist (alistptr, Qparent_id, tem); 3074 store_in_alist (alistptr, Qparent_id, tem);
3075 store_in_alist (alistptr, Qtool_bar_position, FVAR (f, tool_bar_position)); 3075 store_in_alist (alistptr, Qtool_bar_position, FGET (f, tool_bar_position));
3076} 3076}
3077 3077
3078 3078
@@ -3132,7 +3132,7 @@ x_set_screen_gamma (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
3132 signal_error ("Invalid screen-gamma", new_value); 3132 signal_error ("Invalid screen-gamma", new_value);
3133 3133
3134 /* Apply the new gamma value to the frame background. */ 3134 /* Apply the new gamma value to the frame background. */
3135 bgcolor = Fassq (Qbackground_color, FVAR (f, param_alist)); 3135 bgcolor = Fassq (Qbackground_color, FGET (f, param_alist));
3136 if (CONSP (bgcolor) && (bgcolor = XCDR (bgcolor), STRINGP (bgcolor))) 3136 if (CONSP (bgcolor) && (bgcolor = XCDR (bgcolor), STRINGP (bgcolor)))
3137 { 3137 {
3138 Lisp_Object parm_index = Fget (Qbackground_color, Qx_frame_parameter); 3138 Lisp_Object parm_index = Fget (Qbackground_color, Qx_frame_parameter);
@@ -3461,7 +3461,7 @@ x_icon_type (FRAME_PTR f)
3461{ 3461{
3462 Lisp_Object tem; 3462 Lisp_Object tem;
3463 3463
3464 tem = assq_no_quit (Qicon_type, FVAR (f, param_alist)); 3464 tem = assq_no_quit (Qicon_type, FGET (f, param_alist));
3465 if (CONSP (tem)) 3465 if (CONSP (tem))
3466 return XCDR (tem); 3466 return XCDR (tem);
3467 else 3467 else
diff --git a/src/frame.h b/src/frame.h
index 22c0125ace9..cf9d48f6245 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -80,9 +80,15 @@ struct terminal;
80 80
81struct font_driver_list; 81struct font_driver_list;
82 82
83/* Most code should use this macro to access Lisp fields in struct frame. */ 83/* Most code should use these macros to access Lisp fields
84 in struct frame. FGET should not be used as lvalue. */
84 85
85#define FVAR(frame, field) ((frame)->INTERNAL_FIELD (field)) 86#define FGET(f, field) \
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))
86 92
87struct frame 93struct frame
88{ 94{
@@ -640,13 +646,13 @@ typedef struct frame *FRAME_PTR;
640#define FRAME_WINDOW_SIZES_CHANGED(f) (f)->window_sizes_changed 646#define FRAME_WINDOW_SIZES_CHANGED(f) (f)->window_sizes_changed
641 647
642/* The minibuffer window of frame F, if it has one; otherwise nil. */ 648/* The minibuffer window of frame F, if it has one; otherwise nil. */
643#define FRAME_MINIBUF_WINDOW(f) FVAR (f, minibuffer_window) 649#define FRAME_MINIBUF_WINDOW(f) FGET (f, minibuffer_window)
644 650
645/* The root window of the window tree of frame F. */ 651/* The root window of the window tree of frame F. */
646#define FRAME_ROOT_WINDOW(f) FVAR (f, root_window) 652#define FRAME_ROOT_WINDOW(f) FGET (f, root_window)
647 653
648/* The currently selected window of the window tree of frame F. */ 654/* The currently selected window of the window tree of frame F. */
649#define FRAME_SELECTED_WINDOW(f) FVAR (f, selected_window) 655#define FRAME_SELECTED_WINDOW(f) FGET (f, selected_window)
650 656
651#define FRAME_INSERT_COST(f) (f)->insert_line_cost 657#define FRAME_INSERT_COST(f) (f)->insert_line_cost
652#define FRAME_DELETE_COST(f) (f)->delete_line_cost 658#define FRAME_DELETE_COST(f) (f)->delete_line_cost
@@ -654,7 +660,7 @@ typedef struct frame *FRAME_PTR;
654#define FRAME_DELETEN_COST(f) (f)->delete_n_lines_cost 660#define FRAME_DELETEN_COST(f) (f)->delete_n_lines_cost
655#define FRAME_MESSAGE_BUF(f) (f)->message_buf 661#define FRAME_MESSAGE_BUF(f) (f)->message_buf
656#define FRAME_SCROLL_BOTTOM_VPOS(f) (f)->scroll_bottom_vpos 662#define FRAME_SCROLL_BOTTOM_VPOS(f) (f)->scroll_bottom_vpos
657#define FRAME_FOCUS_FRAME(f) FVAR (f, focus_frame) 663#define FRAME_FOCUS_FRAME(f) FGET (f, focus_frame)
658 664
659/* Nonzero if frame F supports scroll bars. 665/* Nonzero if frame F supports scroll bars.
660 If this is zero, then it is impossible to enable scroll bars 666 If this is zero, then it is impossible to enable scroll bars
@@ -755,10 +761,10 @@ typedef struct frame *FRAME_PTR;
755 761
756/* Nonzero if frame F has scroll bars. */ 762/* Nonzero if frame F has scroll bars. */
757 763
758#define FRAME_SCROLL_BARS(f) (FVAR (f, scroll_bars)) 764#define FRAME_SCROLL_BARS(f) (FGET (f, scroll_bars))
759 765
760#define FRAME_CONDEMNED_SCROLL_BARS(f) (FVAR (f, condemned_scroll_bars)) 766#define FRAME_CONDEMNED_SCROLL_BARS(f) (FGET (f, condemned_scroll_bars))
761#define FRAME_MENU_BAR_ITEMS(f) (FVAR (f, menu_bar_items)) 767#define FRAME_MENU_BAR_ITEMS(f) (FGET (f, menu_bar_items))
762#define FRAME_COST_BAUD_RATE(f) ((f)->cost_calculation_baud_rate) 768#define FRAME_COST_BAUD_RATE(f) ((f)->cost_calculation_baud_rate)
763 769
764#define FRAME_DESIRED_CURSOR(f) ((f)->desired_cursor) 770#define FRAME_DESIRED_CURSOR(f) ((f)->desired_cursor)
diff --git a/src/fringe.c b/src/fringe.c
index 374522989f6..95aec9ebbe7 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, FVAR (f, param_alist)); 1341 Lisp_Object left_fringe = Fassq (Qleft_fringe, FGET (f, param_alist));
1342 Lisp_Object right_fringe = Fassq (Qright_fringe, FVAR (f, param_alist)); 1342 Lisp_Object right_fringe = Fassq (Qright_fringe, FGET (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 aca5d65f0e3..478f9f304c5 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 (FVAR (f, title))) 1151 if (! NILP (FGET (f, title)))
1152 title = SSDATA (ENCODE_UTF_8 (FVAR (f, title))); 1152 title = SSDATA (ENCODE_UTF_8 (FGET (f, title)));
1153 else if (! NILP (FVAR (f, name))) 1153 else if (! NILP (FGET (f, name)))
1154 title = SSDATA (ENCODE_UTF_8 (FVAR (f, name))); 1154 title = SSDATA (ENCODE_UTF_8 (FGET (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 = FVAR (f, menu_bar_vector); 2064 cl_data->menu_bar_vector = FGET (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 = FVAR (f, menu_bar_vector); 2096 cl_data->menu_bar_vector = FGET (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 (FVAR (f, tool_bar_items))) 3813 if (! f || ! f->n_tool_bar_items || NILP (FGET (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 (FVAR (f, tool_bar_items), idx + TOOL_BAR_ITEM_KEY); 3818 key = AREF (FGET (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 (FVAR (f, tool_bar_items))) 4089 if (! f || ! f->n_tool_bar_items || NILP (FGET (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 (FVAR (f, tool_bar_items), idx + TOOL_BAR_ITEM_HELP); 4095 help = AREF (FGET (f, tool_bar_items), idx + TOOL_BAR_ITEM_HELP);
4096 4096
4097 if (NILP (help)) 4097 if (NILP (help))
4098 help = AREF (FVAR (f, tool_bar_items), idx + TOOL_BAR_ITEM_CAPTION); 4098 help = AREF (FGET (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 (FVAR (f, tool_bar_items), i * TOOL_BAR_ITEM_NSLOTS + (IDX)) 4226#define PROP(IDX) AREF (FGET (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, FVAR (f, tool_bar_position)); 4709 xg_pack_tool_bar (f, FGET (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 cfe813f75f4..a5f963de4be 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, FVAR (XFRAME (selected_frame), minibuffer_window))) 105 && !EQ (minibuf_window, FGET (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 (FVAR (sf, minibuffer_window))) 112 if (NILP (FGET (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 = WVAR (XWINDOW (minibuf_window), buffer); 118 buffer = WVAR (XWINDOW (minibuf_window), buffer);
119 if (BUFFERP (buffer)) 119 if (BUFFERP (buffer))
120 Fset_window_buffer (FVAR (sf, minibuffer_window), buffer, Qnil); 120 Fset_window_buffer (FGET (sf, minibuffer_window), buffer, Qnil);
121 minibuf_window = FVAR (sf, minibuffer_window); 121 minibuf_window = FGET (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 93af0d6e26e..8ff038791ca 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 (FVAR (f, selected_window)); 1321 sw = XWINDOW (FGET (f, selected_window));
1322 frame_desired_cursor = Fcdr (Fassq (Qcursor_type, FVAR (f, param_alist))); 1322 frame_desired_cursor = Fcdr (Fassq (Qcursor_type, FGET (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, FVAR (f, param_alist))), Qt); 1601 int reverse = EQ (Fcdr (Fassq (Qreverse, FGET (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 af839589d33..9a5ecd49105 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -448,16 +448,16 @@ x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
448 else if (!STRINGP (oldval) && EQ (oldval, Qnil) == EQ (arg, Qnil)) 448 else if (!STRINGP (oldval) && EQ (oldval, Qnil) == EQ (arg, Qnil))
449 return; 449 return;
450 450
451 FVAR (f, icon_name) = arg; 451 FSET (f, icon_name, arg);
452 452
453 if (NILP (arg)) 453 if (NILP (arg))
454 { 454 {
455 if (!NILP (FVAR (f, title))) 455 if (!NILP (FGET (f, title)))
456 arg = FVAR (f, title); 456 arg = FGET (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 = FVAR (f, name); 460 arg = FGET (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 (FVAR (f, icon_name))) 499 if (!STRINGP (FGET (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 (FVAR (f, icon_name)); 502 encoded_icon_name = ENCODE_UTF_8 (FGET (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, FVAR (f, name)))) 540 if (! NILP (Fstring_equal (name, FGET (f, name))))
541 return; 541 return;
542 542
543 FVAR (f, name) = name; 543 FSET (f, name, name);
544 544
545 /* title overrides explicit name */ 545 /* title overrides explicit name */
546 if (! NILP (FVAR (f, title))) 546 if (! NILP (FGET (f, title)))
547 name = FVAR (f, title); 547 name = FGET (f, title);
548 548
549 ns_set_name_internal (f, name); 549 ns_set_name_internal (f, name);
550} 550}
@@ -586,15 +586,15 @@ 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, FVAR (f, title))) 589 if (EQ (name, FGET (f, title)))
590 return; 590 return;
591 591
592 update_mode_lines = 1; 592 update_mode_lines = 1;
593 593
594 FVAR (f, title) = name; 594 FSET (f, title, name);
595 595
596 if (NILP (name)) 596 if (NILP (name))
597 name = FVAR (f, name); 597 name = FGET (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 = WVAR (XWINDOW (FVAR (f, selected_window)), buffer); 610 Lisp_Object buf = WVAR (XWINDOW (FGET (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 (FVAR (f, title)) || ns_in_resize) 618 if (f->explicit_name || ! NILP (FGET (f, title)) || ns_in_resize)
619 return; 619 return;
620 620
621 BLOCK_INPUT; 621 BLOCK_INPUT;
@@ -677,7 +677,7 @@ ns_set_name_as_filename (struct frame *f)
677 677
678 [[view window] setRepresentedFilename: fstr]; 678 [[view window] setRepresentedFilename: fstr];
679 [[view window] setTitle: str]; 679 [[view window] setTitle: str];
680 FVAR (f, name) = name; 680 FSET (f, name, name);
681 } 681 }
682 682
683 [pool release]; 683 [pool release];
@@ -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 (FVAR (f, selected_window)))) 693 if (!MINI_WINDOW_P (XWINDOW (FGET (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 (FVAR (f, name))] 780 && [[NSString stringWithUTF8String: SSDATA (FGET (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, FVAR (f, param_alist)); 788 tem = assq_no_quit (Qicon_type, FGET (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 (FVAR (f, name))[0] == '/') 802 if (SYMBOLP (elt) && EQ (elt, Qt) && SSDATA (FGET (f, name))[0] == '/')
803 { 803 {
804 NSString *str 804 NSString *str
805 = [NSString stringWithUTF8String: SSDATA (FVAR (f, name))]; 805 = [NSString stringWithUTF8String: SSDATA (FGET (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), FVAR (f, name)) >= 0) 812 fast_string_match (XCAR (elt), FGET (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)
@@ -1205,11 +1205,11 @@ This function is an internal primitive--use `make-frame' instead. */)
1205 1205
1206 FRAME_FONTSET (f) = -1; 1206 FRAME_FONTSET (f) = -1;
1207 1207
1208 FVAR (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 (FVAR (f, icon_name))) 1211 if (! STRINGP (FGET (f, icon_name)))
1212 FVAR (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;
1215 1215
@@ -1232,12 +1232,12 @@ This function is an internal primitive--use `make-frame' instead. */)
1232 be set. */ 1232 be set. */
1233 if (EQ (name, Qunbound) || NILP (name) || ! STRINGP (name)) 1233 if (EQ (name, Qunbound) || NILP (name) || ! STRINGP (name))
1234 { 1234 {
1235 FVAR (f, name) = build_string ([ns_app_name UTF8String]); 1235 FSET (f, name, build_string ([ns_app_name UTF8String]));
1236 f->explicit_name = 0; 1236 f->explicit_name = 0;
1237 } 1237 }
1238 else 1238 else
1239 { 1239 {
1240 FVAR (f, name) = name; 1240 FSET (f, name, name);
1241 f->explicit_name = 1; 1241 f->explicit_name = 1;
1242 specbind (Qx_resource_name, name); 1242 specbind (Qx_resource_name, name);
1243 } 1243 }
@@ -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 FVAR (f, param_alist) = Fcons (XCAR (tem), FVAR (f, param_alist)); 1401 FSET (f, param_alist, Fcons (XCAR (tem), FGET (f, param_alist)));
1402 1402
1403 UNGCPRO; 1403 UNGCPRO;
1404 1404
diff --git a/src/nsmenu.m b/src/nsmenu.m
index dc9b80a3adc..619cd2c1797 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 (FVAR (f, menu_bar_vector), 0), 225 memcpy (previous_items, aref_addr (FGET (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 = FVAR (f, menu_bar_vector); 231 menu_items = FGET (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);
@@ -341,7 +341,7 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu)
341 } 341 }
342 /* The menu items are different, so store them in the frame */ 342 /* The menu items are different, so store them in the frame */
343 /* FIXME: this is not correct for single-submenu case */ 343 /* FIXME: this is not correct for single-submenu case */
344 FVAR (f, menu_bar_vector) = menu_items; 344 FSET (f, menu_bar_vector, menu_items);
345 f->menu_bar_items_used = menu_items_used; 345 f->menu_bar_items_used = menu_items_used;
346 346
347 /* Calls restore_menu_items, etc., as they were outside */ 347 /* Calls restore_menu_items, etc., as they were outside */
@@ -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 (FVAR (f, tool_bar_items), \ 1043#define TOOLPROP(IDX) AREF (FGET (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 4c0e0e57926..d420275f612 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 (FVAR (f, root_window))); 1307 mark_window_cursors_off (XWINDOW (FGET (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 (FVAR (f, tool_bar_window)) 2126 if (WINDOWP (FGET (f, tool_bar_window))
2127 && w == XWINDOW (FVAR (f, tool_bar_window))) 2127 && w == XWINDOW (FGET (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 = FVAR (f, name); 5543 tem = FGET (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 = FVAR (f, icon_name); 5561 tem = FGET (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 FVAR (emacsframe, menu_bar_vector), 5742 FGET (emacsframe, menu_bar_vector),
5743 (void *)tag); 5743 (void *)tag);
5744 } 5744 }
5745 5745
@@ -5773,8 +5773,8 @@ 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 (FVAR (emacsframe, tool_bar_items), 5776 emacs_event->arg = AREF (FGET (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);
5780 return self; 5780 return self;
@@ -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 (WVAR (XWINDOW (FVAR (f, selected_window)), buffer)); 6065 = XBUFFER (WVAR (XWINDOW (FGET (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 d1613390310..8db222334e5 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 = FVAR (XFRAME (obj), name); 1899 Lisp_Object frame_name = FGET (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 64bc88a7cf0..60b963be2ce 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, FVAR (f, param_alist)); 2195 tem = assq_no_quit (Qtty_color_mode, FGET (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 bbcda21adee..be64e27224b 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1489,7 +1489,7 @@ x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
1489 else if (!NILP (arg) || NILP (oldval)) 1489 else if (!NILP (arg) || NILP (oldval))
1490 return; 1490 return;
1491 1491
1492 FVAR (f, icon_name) = arg; 1492 FSET (f, icon_name, arg);
1493 1493
1494#if 0 1494#if 0
1495 if (f->output_data.w32->icon_bitmap != 0) 1495 if (f->output_data.w32->icon_bitmap != 0)
@@ -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 (FVAR (f, icon_name)) 1501 SSDATA ((!NILP (FGET (f, icon_name))
1502 ? FVAR (f, icon_name) 1502 ? FGET (f, icon_name)
1503 : !NILP (FVAR (f, title)) 1503 : !NILP (FGET (f, title))
1504 ? FVAR (f, title) 1504 ? FGET (f, title)
1505 : FVAR (f, name)))); 1505 : FGET (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 (FVAR (f, tool_bar_window))) 1634 if (WINDOWP (FGET (f, tool_bar_window)))
1635 clear_glyph_matrix (XWINDOW (FVAR (f, tool_bar_window))->current_matrix); 1635 clear_glyph_matrix (XWINDOW (FGET (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 (FVAR (f, name)))) 1677 SDATA (FGET (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, FVAR (f, name)))) 1685 if (! NILP (Fstring_equal (name, FGET (f, name))))
1686 return; 1686 return;
1687 1687
1688 FVAR (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 (FVAR (f, title))) 1692 if (! NILP (FGET (f, title)))
1693 name = FVAR (f, title); 1693 name = FGET (f, title);
1694 1694
1695 if (FRAME_W32_WINDOW (f)) 1695 if (FRAME_W32_WINDOW (f))
1696 { 1696 {
@@ -1728,15 +1728,15 @@ 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, FVAR (f, title))) 1731 if (EQ (name, FGET (f, title)))
1732 return; 1732 return;
1733 1733
1734 update_mode_lines = 1; 1734 update_mode_lines = 1;
1735 1735
1736 FVAR (f, title) = name; 1736 FSET (f, title, name);
1737 1737
1738 if (NILP (name)) 1738 if (NILP (name))
1739 name = FVAR (f, name); 1739 name = FGET (f, name);
1740 1740
1741 if (FRAME_W32_WINDOW (f)) 1741 if (FRAME_W32_WINDOW (f))
1742 { 1742 {
@@ -3896,8 +3896,8 @@ 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 = FVAR (f, name); 3899 name = FGET (f, name);
3900 FVAR (f, name) = Qnil; 3900 FSET (f, name, Qnil);
3901 x_set_name (f, name, explicit); 3901 x_set_name (f, name, explicit);
3902 } 3902 }
3903 3903
@@ -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 (FVAR (f, icon_name)) 3947 x_text_icon (f, SSDATA ((!NILP (FGET (f, icon_name))
3948 ? FVAR (f, icon_name) 3948 ? FGET (f, icon_name)
3949 : FVAR (f, name)))); 3949 : FGET (f, name))));
3950#endif 3950#endif
3951 3951
3952 UNBLOCK_INPUT; 3952 UNBLOCK_INPUT;
@@ -4146,11 +4146,11 @@ This function is an internal primitive--use `make-frame' instead. */)
4146 f->output_data.w32 = xzalloc (sizeof (struct w32_output)); 4146 f->output_data.w32 = xzalloc (sizeof (struct w32_output));
4147 FRAME_FONTSET (f) = -1; 4147 FRAME_FONTSET (f) = -1;
4148 4148
4149 FVAR (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 (FVAR (f, icon_name))) 4152 if (! STRINGP (FGET (f, icon_name)))
4153 FVAR (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; */
4156 4156
@@ -4179,12 +4179,12 @@ This function is an internal primitive--use `make-frame' instead. */)
4179 be set. */ 4179 be set. */
4180 if (EQ (name, Qunbound) || NILP (name)) 4180 if (EQ (name, Qunbound) || NILP (name))
4181 { 4181 {
4182 FVAR (f, name) = build_string (dpyinfo->w32_id_name); 4182 FSET (f, name, build_string (dpyinfo->w32_id_name));
4183 f->explicit_name = 0; 4183 f->explicit_name = 0;
4184 } 4184 }
4185 else 4185 else
4186 { 4186 {
4187 FVAR (f, name) = name; 4187 FSET (f, name, name);
4188 f->explicit_name = 1; 4188 f->explicit_name = 1;
4189 /* use the frame's title when getting resources for this frame. */ 4189 /* use the frame's title when getting resources for this frame. */
4190 specbind (Qx_resource_name, name); 4190 specbind (Qx_resource_name, name);
@@ -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 FVAR (f, param_alist) = Fcons (XCAR (tem), FVAR (f, param_alist)); 4362 FSET (f, param_alist, Fcons (XCAR (tem), FGET (f, param_alist)));
4363 4363
4364 UNGCPRO; 4364 UNGCPRO;
4365 4365
@@ -5231,7 +5231,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
5231 f->output_data.w32 = xzalloc (sizeof (struct w32_output)); 5231 f->output_data.w32 = xzalloc (sizeof (struct w32_output));
5232 5232
5233 FRAME_FONTSET (f) = -1; 5233 FRAME_FONTSET (f) = -1;
5234 FVAR (f, icon_name) = Qnil; 5234 FSET (f, icon_name, Qnil);
5235 5235
5236#ifdef GLYPH_DEBUG 5236#ifdef GLYPH_DEBUG
5237 image_cache_refcount = 5237 image_cache_refcount =
@@ -5246,12 +5246,12 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
5246 be set. */ 5246 be set. */
5247 if (EQ (name, Qunbound) || NILP (name)) 5247 if (EQ (name, Qunbound) || NILP (name))
5248 { 5248 {
5249 FVAR (f, name) = build_string (dpyinfo->w32_id_name); 5249 FSET (f, name, build_string (dpyinfo->w32_id_name));
5250 f->explicit_name = 0; 5250 f->explicit_name = 0;
5251 } 5251 }
5252 else 5252 else
5253 { 5253 {
5254 FVAR (f, name) = name; 5254 FSET (f, name, name);
5255 f->explicit_name = 1; 5255 f->explicit_name = 1;
5256 /* use the frame's title when getting resources for this frame. */ 5256 /* use the frame's title when getting resources for this frame. */
5257 specbind (Qx_resource_name, name); 5257 specbind (Qx_resource_name, name);
diff --git a/src/w32menu.c b/src/w32menu.c
index f6b7e62049a..a40bb662af8 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 = FVAR (f, menu_bar_vector); 280 vector = FGET (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 (FVAR (f, menu_bar_vector))->contents, 422 memcpy (previous_items, XVECTOR (FGET (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 = FVAR (f, menu_bar_vector); 429 menu_items = FGET (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));
@@ -500,7 +500,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
500 return; 500 return;
501 } 501 }
502 502
503 FVAR (f, menu_bar_vector) = menu_items; 503 FSET (f, menu_bar_vector, menu_items);
504 f->menu_bar_items_used = menu_items_used; 504 f->menu_bar_items_used = menu_items_used;
505 505
506 /* This undoes save_menu_items. */ 506 /* This undoes save_menu_items. */
diff --git a/src/w32term.c b/src/w32term.c
index 6b87ca4e88c..b00089ca394 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -4189,7 +4189,7 @@ w32_read_socket (struct terminal *terminal, int expected,
4189 /* We may get paint messages even though the client 4189 /* We may get paint messages even though the client
4190 area is clipped - these are not expose events. */ 4190 area is clipped - these are not expose events. */
4191 DebPrint (("clipped frame %p (%s) got WM_PAINT - ignored\n", f, 4191 DebPrint (("clipped frame %p (%s) got WM_PAINT - ignored\n", f,
4192 SDATA (FVAR (f, name)))); 4192 SDATA (FGET (f, name))));
4193 } 4193 }
4194 else if (f->async_visible != 1) 4194 else if (f->async_visible != 1)
4195 { 4195 {
@@ -4198,7 +4198,7 @@ w32_read_socket (struct terminal *terminal, int expected,
4198 f->async_iconified = 0; 4198 f->async_iconified = 0;
4199 SET_FRAME_GARBAGED (f); 4199 SET_FRAME_GARBAGED (f);
4200 DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f, 4200 DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f,
4201 SDATA (FVAR (f, name)))); 4201 SDATA (FGET (f, name))));
4202 4202
4203 /* WM_PAINT serves as MapNotify as well, so report 4203 /* WM_PAINT serves as MapNotify as well, so report
4204 visibility changes properly. */ 4204 visibility changes properly. */
@@ -4254,7 +4254,7 @@ w32_read_socket (struct terminal *terminal, int expected,
4254 if (f && !f->iconified) 4254 if (f && !f->iconified)
4255 { 4255 {
4256 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) 4256 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
4257 && !EQ (FVAR (f, tool_bar_window), hlinfo->mouse_face_window)) 4257 && !EQ (FGET (f, tool_bar_window), hlinfo->mouse_face_window))
4258 { 4258 {
4259 clear_mouse_face (hlinfo); 4259 clear_mouse_face (hlinfo);
4260 hlinfo->mouse_face_hidden = 1; 4260 hlinfo->mouse_face_hidden = 1;
@@ -4279,7 +4279,7 @@ w32_read_socket (struct terminal *terminal, int expected,
4279 if (f && !f->iconified) 4279 if (f && !f->iconified)
4280 { 4280 {
4281 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) 4281 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
4282 && !EQ (FVAR (f, tool_bar_window), hlinfo->mouse_face_window)) 4282 && !EQ (FGET (f, tool_bar_window), hlinfo->mouse_face_window))
4283 { 4283 {
4284 clear_mouse_face (hlinfo); 4284 clear_mouse_face (hlinfo);
4285 hlinfo->mouse_face_hidden = 1; 4285 hlinfo->mouse_face_hidden = 1;
@@ -4357,7 +4357,7 @@ w32_read_socket (struct terminal *terminal, int expected,
4357 if (f && !f->iconified) 4357 if (f && !f->iconified)
4358 { 4358 {
4359 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) 4359 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
4360 && !EQ (FVAR (f, tool_bar_window), hlinfo->mouse_face_window)) 4360 && !EQ (FGET (f, tool_bar_window), hlinfo->mouse_face_window))
4361 { 4361 {
4362 clear_mouse_face (hlinfo); 4362 clear_mouse_face (hlinfo);
4363 hlinfo->mouse_face_hidden = 1; 4363 hlinfo->mouse_face_hidden = 1;
@@ -4481,8 +4481,8 @@ w32_read_socket (struct terminal *terminal, int expected,
4481 construct_mouse_click (&inev, &msg, f); 4481 construct_mouse_click (&inev, &msg, f);
4482 4482
4483 /* Is this in the tool-bar? */ 4483 /* Is this in the tool-bar? */
4484 if (WINDOWP (FVAR (f, tool_bar_window)) 4484 if (WINDOWP (FGET (f, tool_bar_window))
4485 && WINDOW_TOTAL_LINES (XWINDOW (FVAR (f, tool_bar_window)))) 4485 && WINDOW_TOTAL_LINES (XWINDOW (FGET (f, tool_bar_window))))
4486 { 4486 {
4487 Lisp_Object window; 4487 Lisp_Object window;
4488 int x = XFASTINT (inev.x); 4488 int x = XFASTINT (inev.x);
@@ -4490,7 +4490,7 @@ w32_read_socket (struct terminal *terminal, int expected,
4490 4490
4491 window = window_from_coordinates (f, x, y, 0, 1); 4491 window = window_from_coordinates (f, x, y, 0, 1);
4492 4492
4493 if (EQ (window, FVAR (f, tool_bar_window))) 4493 if (EQ (window, FGET (f, tool_bar_window)))
4494 { 4494 {
4495 w32_handle_tool_bar_click (f, &inev); 4495 w32_handle_tool_bar_click (f, &inev);
4496 tool_bar_p = 1; 4496 tool_bar_p = 1;
@@ -4935,7 +4935,7 @@ w32_read_socket (struct terminal *terminal, int expected,
4935 if (!FRAME_OBSCURED_P (f)) 4935 if (!FRAME_OBSCURED_P (f))
4936 { 4936 {
4937 DebPrint (("frame %p (%s) obscured\n", f, 4937 DebPrint (("frame %p (%s) obscured\n", f,
4938 SDATA (FVAR (f, name)))); 4938 SDATA (FGET (f, name))));
4939 } 4939 }
4940 } 4940 }
4941 else 4941 else
@@ -4947,7 +4947,7 @@ w32_read_socket (struct terminal *terminal, int expected,
4947 { 4947 {
4948 SET_FRAME_GARBAGED (f); 4948 SET_FRAME_GARBAGED (f);
4949 DebPrint (("obscured frame %p (%s) found to be visible\n", f, 4949 DebPrint (("obscured frame %p (%s) found to be visible\n", f,
4950 SDATA (FVAR (f, name)))); 4950 SDATA (FGET (f, name))));
4951 4951
4952 /* Force a redisplay sooner or later. */ 4952 /* Force a redisplay sooner or later. */
4953 record_asynch_buffer_change (); 4953 record_asynch_buffer_change ();
@@ -5595,7 +5595,7 @@ x_set_window_size (struct frame *f, int change_gravity, int cols, int rows)
5595 SET_FRAME_GARBAGED (f); 5595 SET_FRAME_GARBAGED (f);
5596 5596
5597 /* If cursor was outside the new size, mark it as off. */ 5597 /* If cursor was outside the new size, mark it as off. */
5598 mark_window_cursors_off (XWINDOW (FVAR (f, root_window))); 5598 mark_window_cursors_off (XWINDOW (FGET (f, root_window)));
5599 5599
5600 /* Clear out any recollection of where the mouse highlighting was, 5600 /* Clear out any recollection of where the mouse highlighting was,
5601 since it might be in a place that's outside the new frame size. 5601 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 f4f6e3c2eee..fcd9c666553 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 = FVAR (SELECTED_FRAME (), root_window); 194 window = FGET (SELECTED_FRAME (), root_window);
195 else if (WINDOWP (frame_or_window)) 195 else if (WINDOWP (frame_or_window))
196 window = FVAR (XFRAME (WINDOW_FRAME (XWINDOW (frame_or_window))), root_window); 196 window = FGET (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 = FVAR (XFRAME (frame_or_window), root_window); 200 window = FGET (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 = FVAR (SELECTED_FRAME (), root_window); 238 window = FGET (SELECTED_FRAME (), root_window);
239 else if (WINDOWP (frame_or_window)) 239 else if (WINDOWP (frame_or_window))
240 window = FVAR (XFRAME (WINDOW_FRAME (XWINDOW (frame_or_window))), root_window); 240 window = FGET (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 = FVAR (XFRAME (frame_or_window), root_window); 244 window = FGET (XFRAME (frame_or_window), root_window);
245 } 245 }
246 246
247 while (NILP (WVAR (XWINDOW (window), buffer))) 247 while (NILP (WVAR (XWINDOW (window), buffer)))
@@ -269,14 +269,14 @@ 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 = FVAR (SELECTED_FRAME (), selected_window); 272 window = FGET (SELECTED_FRAME (), selected_window);
273 else if (WINDOWP (frame_or_window)) 273 else if (WINDOWP (frame_or_window))
274 window = FVAR (XFRAME (WINDOW_FRAME (XWINDOW (frame_or_window))), 274 window = FGET (XFRAME (WINDOW_FRAME (XWINDOW (frame_or_window))),
275 selected_window); 275 selected_window);
276 else 276 else
277 { 277 {
278 CHECK_LIVE_FRAME (frame_or_window); 278 CHECK_LIVE_FRAME (frame_or_window);
279 window = FVAR (XFRAME (frame_or_window), selected_window); 279 window = FGET (XFRAME (frame_or_window), selected_window);
280 } 280 }
281 281
282 return window; 282 return window;
@@ -304,7 +304,7 @@ Return WINDOW. */)
304 if (EQ (frame, selected_frame)) 304 if (EQ (frame, selected_frame))
305 return Fselect_window (window, norecord); 305 return Fselect_window (window, norecord);
306 else 306 else
307 return FVAR (XFRAME (frame), selected_window) = window; 307 return FSET (XFRAME (frame), selected_window, window);
308} 308}
309 309
310DEFUN ("selected-window", Fselected_window, Sselected_window, 0, 0, 0, 310DEFUN ("selected-window", Fselected_window, Sselected_window, 0, 0, 0,
@@ -347,7 +347,7 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
347 sf = SELECTED_FRAME (); 347 sf = SELECTED_FRAME ();
348 if (XFRAME (WINDOW_FRAME (w)) != sf) 348 if (XFRAME (WINDOW_FRAME (w)) != sf)
349 { 349 {
350 FVAR (XFRAME (WINDOW_FRAME (w)), selected_window) = window; 350 FSET (XFRAME (WINDOW_FRAME (w)), selected_window, window);
351 /* Use this rather than Fhandle_switch_frame 351 /* Use this rather than Fhandle_switch_frame
352 so that FRAME_FOCUS_FRAME is moved appropriately as we 352 so that FRAME_FOCUS_FRAME is moved appropriately as we
353 move around in the state where a minibuffer in a separate 353 move around in the state where a minibuffer in a separate
@@ -358,7 +358,7 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
358 return window; 358 return window;
359 } 359 }
360 else 360 else
361 FVAR (sf, selected_window) = window; 361 FSET (sf, selected_window, window);
362 362
363 /* Store the current buffer's actual point into the 363 /* Store the current buffer's actual point into the
364 old selected window. It belongs to that window, 364 old selected window. It belongs to that window,
@@ -1220,13 +1220,13 @@ window_from_coordinates (struct frame *f, int x, int y,
1220 bar exists. */ 1220 bar exists. */
1221 if (NILP (window) 1221 if (NILP (window)
1222 && tool_bar_p 1222 && tool_bar_p
1223 && WINDOWP (FVAR (f, tool_bar_window)) 1223 && WINDOWP (FGET (f, tool_bar_window))
1224 && WINDOW_TOTAL_LINES (XWINDOW (FVAR (f, tool_bar_window))) > 0 1224 && WINDOW_TOTAL_LINES (XWINDOW (FGET (f, tool_bar_window))) > 0
1225 && (coordinates_in_window (XWINDOW (FVAR (f, tool_bar_window)), x, y) 1225 && (coordinates_in_window (XWINDOW (FGET (f, tool_bar_window)), x, y)
1226 != ON_NOTHING)) 1226 != ON_NOTHING))
1227 { 1227 {
1228 *part = ON_TEXT; 1228 *part = ON_TEXT;
1229 window = FVAR (f, tool_bar_window); 1229 window = FGET (f, tool_bar_window);
1230 } 1230 }
1231 1231
1232 return window; 1232 return window;
@@ -1841,7 +1841,7 @@ replace_window (Lisp_Object old, Lisp_Object new, int setflag)
1841 /* If OLD is its frame's root window, then NEW is the new 1841 /* If OLD is its frame's root window, then NEW is the new
1842 root window for that frame. */ 1842 root window for that frame. */
1843 if (EQ (old, FRAME_ROOT_WINDOW (XFRAME (WVAR (o, frame))))) 1843 if (EQ (old, FRAME_ROOT_WINDOW (XFRAME (WVAR (o, frame)))))
1844 FRAME_ROOT_WINDOW (XFRAME (WVAR (o, frame))) = new; 1844 FSET (XFRAME (WVAR (o, frame)), selected_window, new);
1845 1845
1846 if (setflag) 1846 if (setflag)
1847 { 1847 {
@@ -2323,7 +2323,7 @@ MINIBUF neither nil nor t means never include the minibuffer window. */)
2323 (Lisp_Object frame, Lisp_Object minibuf, Lisp_Object window) 2323 (Lisp_Object frame, Lisp_Object minibuf, Lisp_Object window)
2324{ 2324{
2325 if (NILP (window)) 2325 if (NILP (window))
2326 window = FRAMEP (frame) ? FVAR (XFRAME (frame), selected_window) : selected_window; 2326 window = FRAMEP (frame) ? FGET (XFRAME (frame), selected_window) : selected_window;
2327 CHECK_WINDOW (window); 2327 CHECK_WINDOW (window);
2328 if (NILP (frame)) 2328 if (NILP (frame))
2329 frame = selected_frame; 2329 frame = selected_frame;
@@ -2633,7 +2633,7 @@ window-start value is reasonable when this function is called. */)
2633 if (EQ (selected_frame, WVAR (w, frame))) 2633 if (EQ (selected_frame, WVAR (w, frame)))
2634 Fselect_window (window, Qnil); 2634 Fselect_window (window, Qnil);
2635 else 2635 else
2636 FRAME_SELECTED_WINDOW (f) = window; 2636 FSET (f, selected_window, window);
2637 } 2637 }
2638 } 2638 }
2639 else 2639 else
@@ -2663,7 +2663,7 @@ window-start value is reasonable when this function is called. */)
2663 if (EQ (selected_frame, WVAR (w, frame))) 2663 if (EQ (selected_frame, WVAR (w, frame)))
2664 Fselect_window (swindow, Qnil); 2664 Fselect_window (swindow, Qnil);
2665 else 2665 else
2666 FRAME_SELECTED_WINDOW (f) = swindow; 2666 FSET (f, selected_window, swindow);
2667 } 2667 }
2668 } 2668 }
2669 2669
@@ -3562,9 +3562,9 @@ be applied on the Elisp level. */)
3562void 3562void
3563resize_frame_windows (struct frame *f, int size, int horflag) 3563resize_frame_windows (struct frame *f, int size, int horflag)
3564{ 3564{
3565 Lisp_Object root = FVAR (f, root_window); 3565 Lisp_Object root = FGET (f, root_window);
3566 struct window *r = XWINDOW (root); 3566 struct window *r = XWINDOW (root);
3567 Lisp_Object mini = FVAR (f, minibuffer_window); 3567 Lisp_Object mini = FGET (f, minibuffer_window);
3568 struct window *m; 3568 struct window *m;
3569 /* new_size is the new size of the frame's root window. */ 3569 /* new_size is the new size of the frame's root window. */
3570 int new_size = (horflag 3570 int new_size = (horflag
@@ -3612,7 +3612,7 @@ resize_frame_windows (struct frame *f, int size, int horflag)
3612 { 3612 {
3613 /* We lost. Delete all windows but the frame's 3613 /* We lost. Delete all windows but the frame's
3614 selected one. */ 3614 selected one. */
3615 root = FVAR (f, selected_window); 3615 root = FGET (f, selected_window);
3616 Fdelete_other_windows_internal (root, Qnil); 3616 Fdelete_other_windows_internal (root, Qnil);
3617 if (horflag) 3617 if (horflag)
3618 XSETFASTINT (WVAR (XWINDOW (root), total_cols), new_size); 3618 XSETFASTINT (WVAR (XWINDOW (root), total_cols), new_size);
@@ -3971,7 +3971,7 @@ Signal an error when WINDOW is the only window on its frame. */)
3971 if (EQ (FRAME_SELECTED_WINDOW (f), selected_window)) 3971 if (EQ (FRAME_SELECTED_WINDOW (f), selected_window))
3972 Fselect_window (new_selected_window, Qt); 3972 Fselect_window (new_selected_window, Qt);
3973 else 3973 else
3974 FRAME_SELECTED_WINDOW (f) = new_selected_window; 3974 FSET (f, selected_window, new_selected_window);
3975 3975
3976 UNBLOCK_INPUT; 3976 UNBLOCK_INPUT;
3977 3977
@@ -3985,7 +3985,7 @@ Signal an error when WINDOW is the only window on its frame. */)
3985 if (EQ (FRAME_SELECTED_WINDOW (f), selected_window)) 3985 if (EQ (FRAME_SELECTED_WINDOW (f), selected_window))
3986 Fselect_window (new_selected_window, Qnil); 3986 Fselect_window (new_selected_window, Qnil);
3987 else 3987 else
3988 FRAME_SELECTED_WINDOW (f) = new_selected_window; 3988 FSET (f, selected_window, new_selected_window);
3989 } 3989 }
3990 else 3990 else
3991 UNBLOCK_INPUT; 3991 UNBLOCK_INPUT;
@@ -5660,7 +5660,7 @@ the return value is nil. Otherwise the value is t. */)
5660 } 5660 }
5661 } 5661 }
5662 5662
5663 FRAME_ROOT_WINDOW (f) = data->root_window; 5663 FSET (f, root_window, data->root_window);
5664 /* Arrange *not* to restore point in the buffer that was 5664 /* Arrange *not* to restore point in the buffer that was
5665 current when the window configuration was saved. */ 5665 current when the window configuration was saved. */
5666 if (EQ (WVAR (XWINDOW (data->current_window), buffer), new_current_buffer)) 5666 if (EQ (WVAR (XWINDOW (data->current_window), buffer), new_current_buffer))
@@ -6490,8 +6490,8 @@ init_window_once (void)
6490 struct frame *f = make_initial_frame (); 6490 struct frame *f = make_initial_frame ();
6491 XSETFRAME (selected_frame, f); 6491 XSETFRAME (selected_frame, f);
6492 Vterminal_frame = selected_frame; 6492 Vterminal_frame = selected_frame;
6493 minibuf_window = FVAR (f, minibuffer_window); 6493 minibuf_window = FGET (f, minibuffer_window);
6494 selected_window = FVAR (f, selected_window); 6494 selected_window = FGET (f, selected_window);
6495 last_nonminibuf_frame = f; 6495 last_nonminibuf_frame = f;
6496 6496
6497 window_initialized = 1; 6497 window_initialized = 1;
diff --git a/src/window.h b/src/window.h
index ece58d2cf97..da42250befa 100644
--- a/src/window.h
+++ b/src/window.h
@@ -468,14 +468,14 @@ struct window
468/* 1 if W is a menu bar window. */ 468/* 1 if W is a menu bar window. */
469 469
470#define WINDOW_MENU_BAR_P(W) \ 470#define WINDOW_MENU_BAR_P(W) \
471 (WINDOWP (FVAR (WINDOW_XFRAME (W), menu_bar_window)) \ 471 (WINDOWP (FGET (WINDOW_XFRAME (W), menu_bar_window)) \
472 && (W) == XWINDOW (FVAR (WINDOW_XFRAME (W), menu_bar_window))) 472 && (W) == XWINDOW (FGET (WINDOW_XFRAME (W), menu_bar_window)))
473 473
474/* 1 if W is a tool bar window. */ 474/* 1 if W is a tool bar window. */
475 475
476#define WINDOW_TOOL_BAR_P(W) \ 476#define WINDOW_TOOL_BAR_P(W) \
477 (WINDOWP (FVAR (WINDOW_XFRAME (W), tool_bar_window)) \ 477 (WINDOWP (FGET (WINDOW_XFRAME (W), tool_bar_window)) \
478 && (W) == XWINDOW (FVAR (WINDOW_XFRAME (W), tool_bar_window))) 478 && (W) == XWINDOW (FGET (WINDOW_XFRAME (W), tool_bar_window)))
479 479
480/* Return the frame y-position at which window W starts. 480/* Return the frame y-position at which window W starts.
481 This includes a header line, if any. */ 481 This includes a header line, if any. */
diff --git a/src/xdisp.c b/src/xdisp.c
index 300e16bb4a8..314fb44e230 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, FVAR (target_frame, selected_window)); 10894 ASET (vector, 8, FGET (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 (FVAR (f, selected_window), Qt); 11054 Fselect_window (FGET (f, selected_window), Qt);
11055 set_buffer_internal_1 11055 set_buffer_internal_1
11056 (XBUFFER (WVAR (XWINDOW (FVAR (f, selected_window)), buffer))); 11056 (XBUFFER (WVAR (XWINDOW (FGET (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 (FVAR (f, selected_window)), -1, -1, 11061 init_iterator (&it, XWINDOW (FGET (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 (FVAR (f, name)) 11073 if (! STRINGP (FGET (f, name))
11074 || SBYTES (FVAR (f, name)) != len 11074 || SBYTES (FGET (f, name)) != len
11075 || memcmp (title, SDATA (FVAR (f, name)), len) != 0) 11075 || memcmp (title, SDATA (FGET (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 (WVAR (XWINDOW (FVAR (f, selected_window)), buffer))); 11176 (WVAR (XWINDOW (FGET (f, selected_window)), buffer)));
11177#endif 11177#endif
11178 UNGCPRO; 11178 UNGCPRO;
11179 } 11179 }
@@ -11275,7 +11275,7 @@ update_menu_bar (struct frame *f, int save_match_data, int hooks_run)
11275 } 11275 }
11276 11276
11277 XSETFRAME (Vmenu_updating_frame, f); 11277 XSETFRAME (Vmenu_updating_frame, f);
11278 FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (FRAME_MENU_BAR_ITEMS (f)); 11278 FSET (f, menu_bar_items, menu_bar_items (FRAME_MENU_BAR_ITEMS (f)));
11279 11279
11280 /* Redisplay the menu bar in case we changed it. */ 11280 /* Redisplay the menu bar in case we changed it. */
11281#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ 11281#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
@@ -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 (FVAR (f, tool_bar_window)) 11417 int do_update = WINDOWP (FGET (f, tool_bar_window))
11418 && WINDOW_TOTAL_LINES (XWINDOW (FVAR (f, tool_bar_window))) > 0; 11418 && WINDOW_TOTAL_LINES (XWINDOW (FGET (f, tool_bar_window))) > 0;
11419#endif 11419#endif
11420 11420
11421 if (do_update) 11421 if (do_update)
@@ -11477,18 +11477,18 @@ 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 (FVAR (f, tool_bar_items)), 11480 = tool_bar_items (Fcopy_sequence (FGET (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, FVAR (f, tool_bar_items)))) 11485 || NILP (Fequal (new_tool_bar, FGET (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
11489 variables within BLOCK_INPUT so no such event interrupts. */ 11489 variables within BLOCK_INPUT so no such event interrupts. */
11490 BLOCK_INPUT; 11490 BLOCK_INPUT;
11491 FVAR (f, tool_bar_items) = new_tool_bar; 11491 FSET (f, tool_bar_items, new_tool_bar);
11492 f->n_tool_bar_items = new_n_tool_bar; 11492 f->n_tool_bar_items = new_n_tool_bar;
11493 w->update_mode_line = 1; 11493 w->update_mode_line = 1;
11494 UNBLOCK_INPUT; 11494 UNBLOCK_INPUT;
@@ -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 (FVAR (f, desired_tool_bar_string)) 11524 size = (STRINGP (FGET (f, desired_tool_bar_string))
11525 ? SCHARS (FVAR (f, desired_tool_bar_string)) 11525 ? SCHARS (FGET (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 (FVAR (f, desired_tool_bar_string))) 11532 if (size < size_needed || NILP (FGET (f, desired_tool_bar_string)))
11533 FVAR (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, FVAR (f, desired_tool_bar_string)); 11539 props, FGET (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 (FVAR (f, tool_bar_items), i * TOOL_BAR_ITEM_NSLOTS + (IDX)) 11548 AREF (FGET (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 (FVAR (f, desired_tool_bar_string)); 11657 end = SCHARS (FGET (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, FVAR (f, desired_tool_bar_string)); 11661 props, FGET (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 (FVAR (f, tool_bar_window)); 11811 struct window *w = XWINDOW (FGET (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, FVAR (f, desired_tool_bar_string), 0, 0, 0, -1); 11823 reseat_to_string (&it, NULL, FGET (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 (FVAR (f, tool_bar_window)) 11857 if (WINDOWP (FGET (f, tool_bar_window))
11858 && (w = XWINDOW (FVAR (f, tool_bar_window)), 11858 && (w = XWINDOW (FGET (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 (FVAR (f, tool_bar_window)) 11893 if (!WINDOWP (FGET (f, tool_bar_window))
11894 || (w = XWINDOW (FVAR (f, tool_bar_window)), 11894 || (w = XWINDOW (FGET (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, FVAR (f, desired_tool_bar_string), 0, 0, 0, -1); 11906 reseat_to_string (&it, NULL, FGET (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 (FVAR (f, current_tool_bar_string)), glyph->charpos); 12063 charpos = min (SCHARS (FGET (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, FVAR (f, current_tool_bar_string)); 12070 Qmenu_item, FGET (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 (FVAR (f, tool_bar_window)); 12098 struct window *w = XWINDOW (FGET (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 (FVAR (f, tool_bar_window), hlinfo->mouse_face_window) 12112 if (EQ (FGET (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 (FVAR (f, tool_bar_window)); 12137 struct window *w = XWINDOW (FGET (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 (FVAR (f, tool_bar_items), prop_idx + TOOL_BAR_ITEM_ENABLED_P); 12148 enabled_p = AREF (FGET (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 (FVAR (f, tool_bar_items), prop_idx + TOOL_BAR_ITEM_KEY); 12169 key = AREF (FGET (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 = FVAR (f, tool_bar_window); 12194 Lisp_Object window = FGET (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 (FVAR (f, tool_bar_items), prop_idx + TOOL_BAR_ITEM_ENABLED_P); 12240 enabled_p = AREF (FGET (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 (FVAR (f, tool_bar_items), prop_idx + TOOL_BAR_ITEM_HELP); 12274 help_echo_string = AREF (FGET (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 (FVAR (f, tool_bar_items), prop_idx + TOOL_BAR_ITEM_CAPTION); 12276 help_echo_string = AREF (FGET (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 = FVAR (XFRAME (frame), param_alist); 12857 for (tail = FGET (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 (FVAR (f, root_window))) 13431 if (hscroll_windows (FGET (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 (FVAR (f, root_window)), 1); 13444 set_window_update_flags (XWINDOW (FGET (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 (FVAR (XFRAME (selected_frame), selected_window), 13457 eassert (EQ (FGET (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 (FVAR (f, root_window), 1); 13470 mark_window_display_accurate (FGET (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 (FVAR (f, tool_bar_window)) 16166 if (WINDOWP (FGET (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))
@@ -18119,7 +18119,7 @@ GLYPH > 1 or omitted means dump glyphs in long form. */)
18119 (Lisp_Object row, Lisp_Object glyphs) 18119 (Lisp_Object row, Lisp_Object glyphs)
18120{ 18120{
18121 struct frame *sf = SELECTED_FRAME (); 18121 struct frame *sf = SELECTED_FRAME ();
18122 struct glyph_matrix *m = XWINDOW (FVAR (sf, tool_bar_window))->current_matrix; 18122 struct glyph_matrix *m = XWINDOW (FGET (sf, tool_bar_window))->current_matrix;
18123 EMACS_INT vpos; 18123 EMACS_INT vpos;
18124 18124
18125 CHECK_NUMBER (row); 18125 CHECK_NUMBER (row);
@@ -20104,8 +20104,8 @@ display_menu_bar (struct window *w)
20104 /* Menu bar lines are displayed in the desired matrix of the 20104 /* Menu bar lines are displayed in the desired matrix of the
20105 dummy window menu_bar_window. */ 20105 dummy window menu_bar_window. */
20106 struct window *menu_w; 20106 struct window *menu_w;
20107 eassert (WINDOWP (FVAR (f, menu_bar_window))); 20107 eassert (WINDOWP (FGET (f, menu_bar_window)));
20108 menu_w = XWINDOW (FVAR (f, menu_bar_window)); 20108 menu_w = XWINDOW (FGET (f, menu_bar_window));
20109 init_iterator (&it, menu_w, -1, -1, menu_w->desired_matrix->rows, 20109 init_iterator (&it, menu_w, -1, -1, menu_w->desired_matrix->rows,
20110 MENU_FACE_ID); 20110 MENU_FACE_ID);
20111 it.first_visible_x = 0; 20111 it.first_visible_x = 0;
@@ -21409,10 +21409,10 @@ decode_mode_spec (struct window *w, register int c, int field_width,
21409 21409
21410 case 'F': 21410 case 'F':
21411 /* %F displays the frame name. */ 21411 /* %F displays the frame name. */
21412 if (!NILP (FVAR (f, title))) 21412 if (!NILP (FGET (f, title)))
21413 return SSDATA (FVAR (f, title)); 21413 return SSDATA (FGET (f, title));
21414 if (f->explicit_name || ! FRAME_WINDOW_P (f)) 21414 if (f->explicit_name || ! FRAME_WINDOW_P (f))
21415 return SSDATA (FVAR (f, name)); 21415 return SSDATA (FGET (f, name));
21416 return "Emacs"; 21416 return "Emacs";
21417 21417
21418 case 'f': 21418 case 'f':
@@ -25576,7 +25576,7 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width,
25576 } 25576 }
25577 25577
25578 /* Detect a nonselected window or nonselected frame. */ 25578 /* Detect a nonselected window or nonselected frame. */
25579 else if (w != XWINDOW (FVAR (f, selected_window)) 25579 else if (w != XWINDOW (FGET (f, selected_window))
25580 || f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame) 25580 || f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame)
25581 { 25581 {
25582 *active_cursor = 0; 25582 *active_cursor = 0;
@@ -26118,7 +26118,7 @@ update_cursor_in_window_tree (struct window *w, int on_p)
26118void 26118void
26119x_update_cursor (struct frame *f, int on_p) 26119x_update_cursor (struct frame *f, int on_p)
26120{ 26120{
26121 update_cursor_in_window_tree (XWINDOW (FVAR (f, root_window)), on_p); 26121 update_cursor_in_window_tree (XWINDOW (FGET (f, root_window)), on_p);
26122} 26122}
26123 26123
26124 26124
@@ -26277,7 +26277,7 @@ show_mouse_face (Mouse_HLInfo *hlinfo, enum draw_glyphs_face draw)
26277 if (FRAME_WINDOW_P (f)) 26277 if (FRAME_WINDOW_P (f))
26278 { 26278 {
26279 if (draw == DRAW_NORMAL_TEXT 26279 if (draw == DRAW_NORMAL_TEXT
26280 && !EQ (hlinfo->mouse_face_window, FVAR (f, tool_bar_window))) 26280 && !EQ (hlinfo->mouse_face_window, FGET (f, tool_bar_window)))
26281 FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->text_cursor); 26281 FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->text_cursor);
26282 else if (draw == DRAW_MOUSE_FACE) 26282 else if (draw == DRAW_MOUSE_FACE)
26283 FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->hand_cursor); 26283 FRAME_RIF (f)->define_frame_cursor (f, FRAME_X_OUTPUT (f)->hand_cursor);
@@ -27633,7 +27633,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
27633#ifdef HAVE_WINDOW_SYSTEM 27633#ifdef HAVE_WINDOW_SYSTEM
27634 /* Handle tool-bar window differently since it doesn't display a 27634 /* Handle tool-bar window differently since it doesn't display a
27635 buffer. */ 27635 buffer. */
27636 if (EQ (window, FVAR (f, tool_bar_window))) 27636 if (EQ (window, FGET (f, tool_bar_window)))
27637 { 27637 {
27638 note_tool_bar_highlight (f, x, y); 27638 note_tool_bar_highlight (f, x, y);
27639 return; 27639 return;
@@ -28543,18 +28543,18 @@ expose_frame (struct frame *f, int x, int y, int w, int h)
28543 } 28543 }
28544 28544
28545 TRACE ((stderr, "(%d, %d, %d, %d)\n", r.x, r.y, r.width, r.height)); 28545 TRACE ((stderr, "(%d, %d, %d, %d)\n", r.x, r.y, r.width, r.height));
28546 mouse_face_overwritten_p = expose_window_tree (XWINDOW (FVAR (f, root_window)), &r); 28546 mouse_face_overwritten_p = expose_window_tree (XWINDOW (FGET (f, root_window)), &r);
28547 28547
28548 if (WINDOWP (FVAR (f, tool_bar_window))) 28548 if (WINDOWP (FGET (f, tool_bar_window)))
28549 mouse_face_overwritten_p 28549 mouse_face_overwritten_p
28550 |= expose_window (XWINDOW (FVAR (f, tool_bar_window)), &r); 28550 |= expose_window (XWINDOW (FGET (f, tool_bar_window)), &r);
28551 28551
28552#ifdef HAVE_X_WINDOWS 28552#ifdef HAVE_X_WINDOWS
28553#ifndef MSDOS 28553#ifndef MSDOS
28554#ifndef USE_X_TOOLKIT 28554#ifndef USE_X_TOOLKIT
28555 if (WINDOWP (FVAR (f, menu_bar_window))) 28555 if (WINDOWP (FGET (f, menu_bar_window)))
28556 mouse_face_overwritten_p 28556 mouse_face_overwritten_p
28557 |= expose_window (XWINDOW (FVAR (f, menu_bar_window)), &r); 28557 |= expose_window (XWINDOW (FGET (f, menu_bar_window)), &r);
28558#endif /* not USE_X_TOOLKIT */ 28558#endif /* not USE_X_TOOLKIT */
28559#endif 28559#endif
28560#endif 28560#endif
diff --git a/src/xfaces.c b/src/xfaces.c
index 6aab7edd5f2..bdee8fdd4a1 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, FVAR (f, face_alist)); 2056 lface = assq_no_quit (face_name, FGET (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,8 @@ 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 FVAR (f, face_alist) = Fcons (Fcons (face, lface), FVAR (f, 2683 FSET (f, face_alist,
2684 face_alist)); 2684 Fcons (Fcons (face, lface), FGET (f, face_alist)));
2685 } 2685 }
2686 else 2686 else
2687 for (i = 1; i < LFACE_VECTOR_SIZE; ++i) 2687 for (i = 1; i < LFACE_VECTOR_SIZE; ++i)
@@ -3360,7 +3360,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 3360 /* 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 3361 from Fx_create_frame, and we do the necessary things later in
3362 face-set-after-frame-defaults. */ 3362 face-set-after-frame-defaults. */
3363 if (NILP (FVAR (f, face_alist))) 3363 if (NILP (FGET (f, face_alist)))
3364 return; 3364 return;
3365 3365
3366 if (EQ (param, Qforeground_color)) 3366 if (EQ (param, Qforeground_color))
@@ -4046,7 +4046,7 @@ For internal use only. */)
4046 (Lisp_Object frame) 4046 (Lisp_Object frame)
4047{ 4047{
4048 struct frame *f = frame_or_selected_frame (frame, 0); 4048 struct frame *f = frame_or_selected_frame (frame, 0);
4049 return FVAR (f, face_alist); 4049 return FGET (f, face_alist);
4050} 4050}
4051 4051
4052 4052
@@ -4337,7 +4337,7 @@ free_realized_faces (struct face_cache *c)
4337 matrices as invalid because they will reference faces freed 4337 matrices as invalid because they will reference faces freed
4338 above. This function is also called when a frame is 4338 above. This function is also called when a frame is
4339 destroyed. In this case, the root window of F is nil. */ 4339 destroyed. In this case, the root window of F is nil. */
4340 if (WINDOWP (FVAR (f, root_window))) 4340 if (WINDOWP (FGET (f, root_window)))
4341 { 4341 {
4342 clear_current_matrices (f); 4342 clear_current_matrices (f);
4343 ++windows_or_buffers_changed; 4343 ++windows_or_buffers_changed;
@@ -5110,7 +5110,7 @@ face for italic. */)
5110 { 5110 {
5111 frame = XCAR (fl_tail); 5111 frame = XCAR (fl_tail);
5112 if (!NILP (Fequal (Fcdr (Fassq (Qdisplay, 5112 if (!NILP (Fequal (Fcdr (Fassq (Qdisplay,
5113 FVAR (XFRAME (frame), param_alist))), 5113 FGET (XFRAME (frame), param_alist))),
5114 display))) 5114 display)))
5115 break; 5115 break;
5116 } 5116 }
@@ -5406,7 +5406,7 @@ realize_default_face (struct frame *f)
5406 { 5406 {
5407 /* This function is called so early that colors are not yet 5407 /* This function is called so early that colors are not yet
5408 set in the frame parameter list. */ 5408 set in the frame parameter list. */
5409 Lisp_Object color = Fassq (Qforeground_color, FVAR (f, param_alist)); 5409 Lisp_Object color = Fassq (Qforeground_color, FGET (f, param_alist));
5410 5410
5411 if (CONSP (color) && STRINGP (XCDR (color))) 5411 if (CONSP (color) && STRINGP (XCDR (color)))
5412 ASET (lface, LFACE_FOREGROUND_INDEX, XCDR (color)); 5412 ASET (lface, LFACE_FOREGROUND_INDEX, XCDR (color));
@@ -5422,7 +5422,7 @@ realize_default_face (struct frame *f)
5422 { 5422 {
5423 /* This function is called so early that colors are not yet 5423 /* This function is called so early that colors are not yet
5424 set in the frame parameter list. */ 5424 set in the frame parameter list. */
5425 Lisp_Object color = Fassq (Qbackground_color, FVAR (f, param_alist)); 5425 Lisp_Object color = Fassq (Qbackground_color, FGET (f, param_alist));
5426 if (CONSP (color) && STRINGP (XCDR (color))) 5426 if (CONSP (color) && STRINGP (XCDR (color)))
5427 ASET (lface, LFACE_BACKGROUND_INDEX, XCDR (color)); 5427 ASET (lface, LFACE_BACKGROUND_INDEX, XCDR (color));
5428 else if (FRAME_WINDOW_P (f)) 5428 else if (FRAME_WINDOW_P (f))
diff --git a/src/xfns.c b/src/xfns.c
index 8bbb4e1ca51..e92b0e58f63 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -665,7 +665,7 @@ x_set_tool_bar_position (struct frame *f,
665 665
666#ifdef USE_GTK 666#ifdef USE_GTK
667 if (xg_change_toolbar_position (f, new_value)) 667 if (xg_change_toolbar_position (f, new_value))
668 FVAR (f, tool_bar_position) = new_value; 668 FSET (f, tool_bar_position, new_value);
669#endif 669#endif
670} 670}
671 671
@@ -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 (FVAR (f, icon_name)) 1126 SSDATA ((!NILP (FGET (f, icon_name))
1127 ? FVAR (f, icon_name) 1127 ? FGET (f, icon_name)
1128 : FVAR (f, name)))); 1128 : FGET (f, name))));
1129 else 1129 else
1130 result = x_bitmap_icon (f, arg); 1130 result = x_bitmap_icon (f, arg);
1131 1131
@@ -1152,7 +1152,7 @@ x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
1152 else if (!NILP (arg) || NILP (oldval)) 1152 else if (!NILP (arg) || NILP (oldval))
1153 return; 1153 return;
1154 1154
1155 FVAR (f, icon_name) = arg; 1155 FSET (f, icon_name, arg);
1156 1156
1157 if (f->output_data.x->icon_bitmap != 0) 1157 if (f->output_data.x->icon_bitmap != 0)
1158 return; 1158 return;
@@ -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 (FVAR (f, icon_name)) 1163 SSDATA ((!NILP (FGET (f, icon_name))
1164 ? FVAR (f, icon_name) 1164 ? FGET (f, icon_name)
1165 : !NILP (FVAR (f, title)) 1165 : !NILP (FGET (f, title))
1166 ? FVAR (f, title) 1166 ? FGET (f, title)
1167 : FVAR (f, name)))); 1167 : FGET (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 (FVAR (f, menu_bar_window))) 1256 if (nlines == 0 && WINDOWP (FGET (f, menu_bar_window)))
1257 clear_glyph_matrix (XWINDOW (FVAR (f, menu_bar_window))->current_matrix); 1257 clear_glyph_matrix (XWINDOW (FGET (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 (FVAR (f, tool_bar_window))) 1355 if (WINDOWP (FGET (f, tool_bar_window)))
1356 clear_glyph_matrix (XWINDOW (FVAR (f, tool_bar_window))->current_matrix); 1356 clear_glyph_matrix (XWINDOW (FGET (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 (FVAR (f, icon_name))) 1551 if (!STRINGP (FGET (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 (FVAR (f, icon_name), coding_system, 0, 1559 icon.value = x_encode_text (FGET (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 (FVAR (f, icon_name)); 1568 encoded_icon_name = ENCODE_UTF_8 (FGET (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 (FVAR (f, name)))) 1635 SSDATA (FGET (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, FVAR (f, name)))) 1643 if (! NILP (Fstring_equal (name, FGET (f, name))))
1644 return; 1644 return;
1645 1645
1646 FVAR (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 (FVAR (f, title))) 1650 if (! NILP (FGET (f, title)))
1651 name = FVAR (f, title); 1651 name = FGET (f, title);
1652 1652
1653 x_set_name_internal (f, name); 1653 x_set_name_internal (f, name);
1654} 1654}
@@ -1678,15 +1678,15 @@ 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, FVAR (f, title))) 1681 if (EQ (name, FGET (f, title)))
1682 return; 1682 return;
1683 1683
1684 update_mode_lines = 1; 1684 update_mode_lines = 1;
1685 1685
1686 FVAR (f, title) = name; 1686 FSET (f, title, name);
1687 1687
1688 if (NILP (name)) 1688 if (NILP (name))
1689 name = FVAR (f, name); 1689 name = FGET (f, name);
1690 else 1690 else
1691 CHECK_STRING (name); 1691 CHECK_STRING (name);
1692 1692
@@ -2571,8 +2571,8 @@ 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 = FVAR (f, name); 2574 name = FGET (f, name);
2575 FVAR (f, name) = Qnil; 2575 FSET (f, name, Qnil);
2576 x_set_name (f, name, explicit); 2576 x_set_name (f, name, explicit);
2577 } 2577 }
2578 2578
@@ -2714,8 +2714,8 @@ 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 = FVAR (f, name); 2717 name = FGET (f, name);
2718 FVAR (f, name) = Qnil; 2718 FSET (f, name, Qnil);
2719 x_set_name (f, name, explicit); 2719 x_set_name (f, name, explicit);
2720 } 2720 }
2721 2721
@@ -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 (FVAR (f, icon_name)) 2794 x_text_icon (f, SSDATA ((!NILP (FGET (f, icon_name))
2795 ? FVAR (f, icon_name) 2795 ? FGET (f, icon_name)
2796 : FVAR (f, name)))); 2796 : FGET (f, name))));
2797 2797
2798 UNBLOCK_INPUT; 2798 UNBLOCK_INPUT;
2799} 2799}
@@ -3135,11 +3135,11 @@ This function is an internal primitive--use `make-frame' instead. */)
3135 f->output_data.x->scroll_bar_bottom_shadow_pixel = -1; 3135 f->output_data.x->scroll_bar_bottom_shadow_pixel = -1;
3136#endif /* USE_TOOLKIT_SCROLL_BARS */ 3136#endif /* USE_TOOLKIT_SCROLL_BARS */
3137 3137
3138 FVAR (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 (FVAR (f, icon_name))) 3141 if (! STRINGP (FGET (f, icon_name)))
3142 FVAR (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;
3145 3145
@@ -3196,12 +3196,12 @@ This function is an internal primitive--use `make-frame' instead. */)
3196 be set. */ 3196 be set. */
3197 if (EQ (name, Qunbound) || NILP (name)) 3197 if (EQ (name, Qunbound) || NILP (name))
3198 { 3198 {
3199 FVAR (f, name) = build_string (dpyinfo->x_id_name); 3199 FSET (f, name, build_string (dpyinfo->x_id_name));
3200 f->explicit_name = 0; 3200 f->explicit_name = 0;
3201 } 3201 }
3202 else 3202 else
3203 { 3203 {
3204 FVAR (f, name) = name; 3204 FSET (f, name, name);
3205 f->explicit_name = 1; 3205 f->explicit_name = 1;
3206 /* use the frame's title when getting resources for this frame. */ 3206 /* use the frame's title when getting resources for this frame. */
3207 specbind (Qx_resource_name, name); 3207 specbind (Qx_resource_name, name);
@@ -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 FVAR (f, tool_bar_position), 0, 0, RES_TYPE_SYMBOL); 3343 FGET (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 FVAR (f, param_alist) = Fcons (XCAR (tem), FVAR (f, param_alist)); 3471 FSET (f, param_alist, Fcons (XCAR (tem), FGET (f, param_alist)));
3472 3472
3473 UNGCPRO; 3473 UNGCPRO;
3474 3474
@@ -4621,7 +4621,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
4621 f->output_data.x->scroll_bar_top_shadow_pixel = -1; 4621 f->output_data.x->scroll_bar_top_shadow_pixel = -1;
4622 f->output_data.x->scroll_bar_bottom_shadow_pixel = -1; 4622 f->output_data.x->scroll_bar_bottom_shadow_pixel = -1;
4623#endif /* USE_TOOLKIT_SCROLL_BARS */ 4623#endif /* USE_TOOLKIT_SCROLL_BARS */
4624 FVAR (f, icon_name) = Qnil; 4624 FSET (f, icon_name, Qnil);
4625 FRAME_X_DISPLAY_INFO (f) = dpyinfo; 4625 FRAME_X_DISPLAY_INFO (f) = dpyinfo;
4626 f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window; 4626 f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
4627 f->output_data.x->explicit_parent = 0; 4627 f->output_data.x->explicit_parent = 0;
@@ -4663,12 +4663,12 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
4663 be set. */ 4663 be set. */
4664 if (EQ (name, Qunbound) || NILP (name)) 4664 if (EQ (name, Qunbound) || NILP (name))
4665 { 4665 {
4666 FVAR (f, name) = build_string (dpyinfo->x_id_name); 4666 FSET (f, name, build_string (dpyinfo->x_id_name));
4667 f->explicit_name = 0; 4667 f->explicit_name = 0;
4668 } 4668 }
4669 else 4669 else
4670 { 4670 {
4671 FVAR (f, name) = name; 4671 FSET (f, name, name);
4672 f->explicit_name = 1; 4672 f->explicit_name = 1;
4673 /* use the frame's title when getting resources for this frame. */ 4673 /* use the frame's title when getting resources for this frame. */
4674 specbind (Qx_resource_name, name); 4674 specbind (Qx_resource_name, name);
diff --git a/src/xmenu.c b/src/xmenu.c
index eff4bb1ccd0..17d493b6343 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 FVAR (f, menu_bar_vector), client_data); 838 FGET (f, menu_bar_vector), client_data);
839} 839}
840#endif /* not USE_GTK */ 840#endif /* not USE_GTK */
841 841
@@ -1008,20 +1008,20 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
1008 if (! NILP (Vlucid_menu_bar_dirty_flag)) 1008 if (! NILP (Vlucid_menu_bar_dirty_flag))
1009 call0 (Qrecompute_lucid_menubar); 1009 call0 (Qrecompute_lucid_menubar);
1010 safe_run_hooks (Qmenu_bar_update_hook); 1010 safe_run_hooks (Qmenu_bar_update_hook);
1011 FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (FRAME_MENU_BAR_ITEMS (f)); 1011 FSET (f, menu_bar_items, menu_bar_items (FRAME_MENU_BAR_ITEMS (f)));
1012 1012
1013 items = FRAME_MENU_BAR_ITEMS (f); 1013 items = FRAME_MENU_BAR_ITEMS (f);
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 (FVAR (f, menu_bar_vector))->contents, 1017 memcpy (previous_items, XVECTOR (FGET (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 = FVAR (f, menu_bar_vector); 1024 menu_items = FGET (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);
@@ -1100,7 +1100,7 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
1100 } 1100 }
1101 1101
1102 /* The menu items are different, so store them in the frame. */ 1102 /* The menu items are different, so store them in the frame. */
1103 FVAR (f, menu_bar_vector) = menu_items; 1103 FSET (f, menu_bar_vector, menu_items);
1104 f->menu_bar_items_used = menu_items_used; 1104 f->menu_bar_items_used = menu_items_used;
1105 1105
1106 /* This undoes save_menu_items. */ 1106 /* This undoes save_menu_items. */
@@ -1283,7 +1283,7 @@ initialize_frame_menubar (FRAME_PTR f)
1283{ 1283{
1284 /* This function is called before the first chance to redisplay 1284 /* This function is called before the first chance to redisplay
1285 the frame. It has to be, so the frame will have the right size. */ 1285 the frame. It has to be, so the frame will have the right size. */
1286 FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (FRAME_MENU_BAR_ITEMS (f)); 1286 FSET (f, menu_bar_items, menu_bar_items (FRAME_MENU_BAR_ITEMS (f)));
1287 set_frame_menubar (f, 1, 1); 1287 set_frame_menubar (f, 1, 1);
1288} 1288}
1289 1289
diff --git a/src/xterm.c b/src/xterm.c
index ac846f23e95..ea74c2c86b6 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3585,7 +3585,7 @@ x_frame_rehighlight (struct x_display_info *dpyinfo)
3585 : dpyinfo->x_focus_frame); 3585 : dpyinfo->x_focus_frame);
3586 if (! FRAME_LIVE_P (dpyinfo->x_highlight_frame)) 3586 if (! FRAME_LIVE_P (dpyinfo->x_highlight_frame))
3587 { 3587 {
3588 FRAME_FOCUS_FRAME (dpyinfo->x_focus_frame) = Qnil; 3588 FSET (dpyinfo->x_focus_frame, focus_frame, Qnil);
3589 dpyinfo->x_highlight_frame = dpyinfo->x_focus_frame; 3589 dpyinfo->x_highlight_frame = dpyinfo->x_focus_frame;
3590 } 3590 }
3591 } 3591 }
@@ -4957,6 +4957,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
4957 struct frame *f = XFRAME (WVAR (w, frame)); 4957 struct frame *f = XFRAME (WVAR (w, frame));
4958 struct scroll_bar *bar 4958 struct scroll_bar *bar
4959 = ALLOCATE_PSEUDOVECTOR (struct scroll_bar, x_window, PVEC_OTHER); 4959 = ALLOCATE_PSEUDOVECTOR (struct scroll_bar, x_window, PVEC_OTHER);
4960 Lisp_Object barobj;
4960 4961
4961 BLOCK_INPUT; 4962 BLOCK_INPUT;
4962 4963
@@ -5017,7 +5018,8 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
5017 /* Add bar to its frame's list of scroll bars. */ 5018 /* Add bar to its frame's list of scroll bars. */
5018 bar->next = FRAME_SCROLL_BARS (f); 5019 bar->next = FRAME_SCROLL_BARS (f);
5019 bar->prev = Qnil; 5020 bar->prev = Qnil;
5020 XSETVECTOR (FRAME_SCROLL_BARS (f), bar); 5021 XSETVECTOR (barobj, bar);
5022 FSET (f, scroll_bars, barobj);
5021 if (!NILP (bar->next)) 5023 if (!NILP (bar->next))
5022 XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar); 5024 XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar);
5023 5025
@@ -5416,12 +5418,12 @@ XTcondemn_scroll_bars (FRAME_PTR frame)
5416 { 5418 {
5417 Lisp_Object bar; 5419 Lisp_Object bar;
5418 bar = FRAME_SCROLL_BARS (frame); 5420 bar = FRAME_SCROLL_BARS (frame);
5419 FRAME_SCROLL_BARS (frame) = XSCROLL_BAR (bar)->next; 5421 FSET (frame, scroll_bars, XSCROLL_BAR (bar)->next);
5420 XSCROLL_BAR (bar)->next = FRAME_CONDEMNED_SCROLL_BARS (frame); 5422 XSCROLL_BAR (bar)->next = FRAME_CONDEMNED_SCROLL_BARS (frame);
5421 XSCROLL_BAR (bar)->prev = Qnil; 5423 XSCROLL_BAR (bar)->prev = Qnil;
5422 if (! NILP (FRAME_CONDEMNED_SCROLL_BARS (frame))) 5424 if (! NILP (FRAME_CONDEMNED_SCROLL_BARS (frame)))
5423 XSCROLL_BAR (FRAME_CONDEMNED_SCROLL_BARS (frame))->prev = bar; 5425 XSCROLL_BAR (FRAME_CONDEMNED_SCROLL_BARS (frame))->prev = bar;
5424 FRAME_CONDEMNED_SCROLL_BARS (frame) = bar; 5426 FSET (frame, condemned_scroll_bars, bar);
5425 } 5427 }
5426} 5428}
5427 5429
@@ -5434,6 +5436,7 @@ XTredeem_scroll_bar (struct window *window)
5434{ 5436{
5435 struct scroll_bar *bar; 5437 struct scroll_bar *bar;
5436 struct frame *f; 5438 struct frame *f;
5439 Lisp_Object barobj;
5437 5440
5438 /* We can't redeem this window's scroll bar if it doesn't have one. */ 5441 /* We can't redeem this window's scroll bar if it doesn't have one. */
5439 if (NILP (WVAR (window, vertical_scroll_bar))) 5442 if (NILP (WVAR (window, vertical_scroll_bar)))
@@ -5452,7 +5455,7 @@ XTredeem_scroll_bar (struct window *window)
5452 return; 5455 return;
5453 else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f), 5456 else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f),
5454 WVAR (window, vertical_scroll_bar))) 5457 WVAR (window, vertical_scroll_bar)))
5455 FRAME_CONDEMNED_SCROLL_BARS (f) = bar->next; 5458 FSET (f, condemned_scroll_bars, bar->next);
5456 else 5459 else
5457 /* If its prev pointer is nil, it must be at the front of 5460 /* If its prev pointer is nil, it must be at the front of
5458 one or the other! */ 5461 one or the other! */
@@ -5466,7 +5469,8 @@ XTredeem_scroll_bar (struct window *window)
5466 5469
5467 bar->next = FRAME_SCROLL_BARS (f); 5470 bar->next = FRAME_SCROLL_BARS (f);
5468 bar->prev = Qnil; 5471 bar->prev = Qnil;
5469 XSETVECTOR (FRAME_SCROLL_BARS (f), bar); 5472 XSETVECTOR (barobj, bar);
5473 FSET (f, scroll_bars, barobj);
5470 if (! NILP (bar->next)) 5474 if (! NILP (bar->next))
5471 XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar); 5475 XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar);
5472} 5476}
@@ -5483,7 +5487,7 @@ XTjudge_scroll_bars (FRAME_PTR f)
5483 5487
5484 /* Clear out the condemned list now so we won't try to process any 5488 /* Clear out the condemned list now so we won't try to process any
5485 more events on the hapless scroll bars. */ 5489 more events on the hapless scroll bars. */
5486 FRAME_CONDEMNED_SCROLL_BARS (f) = Qnil; 5490 FSET (f, condemned_scroll_bars, Qnil);
5487 5491
5488 for (; ! NILP (bar); bar = next) 5492 for (; ! NILP (bar); bar = next)
5489 { 5493 {
@@ -6357,7 +6361,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
6357 mouse highlighting. */ 6361 mouse highlighting. */
6358 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) 6362 if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
6359 && (f == 0 6363 && (f == 0
6360 || !EQ (FVAR (f, tool_bar_window), hlinfo->mouse_face_window))) 6364 || !EQ (FGET (f, tool_bar_window), hlinfo->mouse_face_window)))
6361 { 6365 {
6362 clear_mouse_face (hlinfo); 6366 clear_mouse_face (hlinfo);
6363 hlinfo->mouse_face_hidden = 1; 6367 hlinfo->mouse_face_hidden = 1;
@@ -6904,15 +6908,15 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
6904 if (f) 6908 if (f)
6905 { 6909 {
6906 /* Is this in the tool-bar? */ 6910 /* Is this in the tool-bar? */
6907 if (WINDOWP (FVAR (f, tool_bar_window)) 6911 if (WINDOWP (FGET (f, tool_bar_window))
6908 && WINDOW_TOTAL_LINES (XWINDOW (FVAR (f, tool_bar_window)))) 6912 && WINDOW_TOTAL_LINES (XWINDOW (FGET (f, tool_bar_window))))
6909 { 6913 {
6910 Lisp_Object window; 6914 Lisp_Object window;
6911 int x = event.xbutton.x; 6915 int x = event.xbutton.x;
6912 int y = event.xbutton.y; 6916 int y = event.xbutton.y;
6913 6917
6914 window = window_from_coordinates (f, x, y, 0, 1); 6918 window = window_from_coordinates (f, x, y, 0, 1);
6915 tool_bar_p = EQ (window, FVAR (f, tool_bar_window)); 6919 tool_bar_p = EQ (window, FGET (f, tool_bar_window));
6916 6920
6917 if (tool_bar_p && event.xbutton.button < 4) 6921 if (tool_bar_p && event.xbutton.button < 4)
6918 { 6922 {
@@ -7503,7 +7507,7 @@ x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x, int
7503 } 7507 }
7504 7508
7505#ifdef HAVE_X_I18N 7509#ifdef HAVE_X_I18N
7506 if (w == XWINDOW (FVAR (f, selected_window))) 7510 if (w == XWINDOW (FGET (f, selected_window)))
7507 if (FRAME_XIC (f) && (FRAME_XIC_STYLE (f) & XIMPreeditPosition)) 7511 if (FRAME_XIC (f) && (FRAME_XIC_STYLE (f) & XIMPreeditPosition))
7508 xic_set_preeditarea (w, x, y); 7512 xic_set_preeditarea (w, x, y);
7509#endif 7513#endif
@@ -8154,7 +8158,7 @@ xim_instantiate_callback (Display *display, XPointer client_data, XPointer call_
8154 xic_set_statusarea (f); 8158 xic_set_statusarea (f);
8155 if (FRAME_XIC_STYLE (f) & XIMPreeditPosition) 8159 if (FRAME_XIC_STYLE (f) & XIMPreeditPosition)
8156 { 8160 {
8157 struct window *w = XWINDOW (FVAR (f, selected_window)); 8161 struct window *w = XWINDOW (FGET (f, selected_window));
8158 xic_set_preeditarea (w, w->cursor.x, w->cursor.y); 8162 xic_set_preeditarea (w, w->cursor.x, w->cursor.y);
8159 } 8163 }
8160 } 8164 }
@@ -8942,7 +8946,7 @@ x_set_window_size (struct frame *f, int change_gravity, int cols, int rows)
8942#endif /* not USE_GTK */ 8946#endif /* not USE_GTK */
8943 8947
8944 /* If cursor was outside the new size, mark it as off. */ 8948 /* If cursor was outside the new size, mark it as off. */
8945 mark_window_cursors_off (XWINDOW (FVAR (f, root_window))); 8949 mark_window_cursors_off (XWINDOW (FGET (f, root_window)));
8946 8950
8947 /* Clear out any recollection of where the mouse highlighting was, 8951 /* Clear out any recollection of where the mouse highlighting was,
8948 since it might be in a place that's outside the new frame size. 8952 since it might be in a place that's outside the new frame size.