emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109670: * window.h (WSET): Remove.


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109670: * window.h (WSET): Remove.
Date: Fri, 17 Aug 2012 18:42:52 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109670
fixes bug: http://debbugs.gnu.org/12215
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Fri 2012-08-17 18:42:52 -0700
message:
  * window.h (WSET): Remove.
  
  Replace all uses with calls to new setter functions.
  Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
  (WINDOW_INLINE): New macro.
  (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
  (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
  (wset_total_lines, wset_vertical_scroll_bar)
  (wset_window_end_pos, wset_window_end_valid)
  (wset_window_end_vpos): New setter functions.
  * window.c (WINDOW_INLINE):
  Define to EXTERN_INLINE, so that the corresponding functions
  are compiled into code.
  (wset_combination_limit, wset_dedicated, wset_display_table)
  (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
  (wset_new_normal, wset_new_total, wset_next_buffers)
  (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
  (wset_prev_buffers, wset_right_fringe_width)
  (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
  (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
  (wset_window_parameters):
  * xdisp.c (wset_base_line_number, wset_base_line_pos)
  (wset_column_number_displayed, wset_region_showing):
  New setter functions.
modified:
  src/ChangeLog
  src/dispnew.c
  src/frame.c
  src/indent.c
  src/nsterm.m
  src/w32fns.c
  src/w32term.c
  src/window.c
  src/window.h
  src/xdisp.c
  src/xfns.c
  src/xterm.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-08-18 00:07:52 +0000
+++ b/src/ChangeLog     2012-08-18 01:42:52 +0000
@@ -1,5 +1,29 @@
 2012-08-18  Paul Eggert  <address@hidden>
 
+       * window.h (WSET): Remove (Bug#12215).
+       Replace all uses with calls to new setter functions.
+       Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
+       (WINDOW_INLINE): New macro.
+       (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
+       (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
+       (wset_total_lines, wset_vertical_scroll_bar)
+       (wset_window_end_pos, wset_window_end_valid)
+       (wset_window_end_vpos): New setter functions.
+       * window.c (WINDOW_INLINE):
+       Define to EXTERN_INLINE, so that the corresponding functions
+       are compiled into code.
+       (wset_combination_limit, wset_dedicated, wset_display_table)
+       (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
+       (wset_new_normal, wset_new_total, wset_next_buffers)
+       (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
+       (wset_prev_buffers, wset_right_fringe_width)
+       (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
+       (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
+       (wset_window_parameters):
+       * xdisp.c (wset_base_line_number, wset_base_line_pos)
+       (wset_column_number_displayed, wset_region_showing):
+       New setter functions.
+
        * termhooks.h (TSET): Remove (Bug#12215).
        Replace all uses with calls to new setter functions.
        Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.

=== modified file 'src/dispnew.c'
--- a/src/dispnew.c     2012-08-17 21:52:15 +0000
+++ b/src/dispnew.c     2012-08-18 01:42:52 +0000
@@ -621,7 +621,7 @@
                 are invalidated below.  */
              if (INTEGERP (w->window_end_vpos)
                  && XFASTINT (w->window_end_vpos) >= i)
-               WSET (w, window_end_valid, Qnil);
+               wset_window_end_valid (w, Qnil);
 
              while (i < matrix->nrows)
                matrix->rows[i++].enabled_p = 0;
@@ -878,7 +878,7 @@
          else
            {
              clear_glyph_matrix (w->current_matrix);
-             WSET (w, window_end_valid, Qnil);
+             wset_window_end_valid (w, Qnil);
            }
        }
 
@@ -1887,14 +1887,14 @@
   int top_margin = FRAME_TOP_MARGIN (sf);
 
   /* Do it for the root window.  */
-  WSET (root, top_line, make_number (top_margin));
-  WSET (root, total_lines, make_number (frame_lines - 1 - top_margin));
-  WSET (root, total_cols, make_number (frame_cols));
+  wset_top_line (root, make_number (top_margin));
+  wset_total_lines (root, make_number (frame_lines - 1 - top_margin));
+  wset_total_cols (root, make_number (frame_cols));
 
   /* Do it for the mini-buffer window.  */
-  WSET (mini, top_line, make_number (frame_lines - 1));
-  WSET (mini, total_lines, make_number (1));
-  WSET (mini, total_cols, make_number (frame_cols));
+  wset_top_line (mini, make_number (frame_lines - 1));
+  wset_total_lines (mini, make_number (1));
+  wset_total_cols (mini, make_number (frame_cols));
 
   adjust_frame_glyphs (sf);
   glyphs_initialized_initially_p = 1;
@@ -2169,7 +2169,7 @@
        fset_menu_bar_window (f, make_window ());
        w = XWINDOW (f->menu_bar_window);
        XSETFRAME (frame, f);
-       WSET (w, frame, frame);
+       wset_frame (w, frame);
        w->pseudo_window_p = 1;
       }
     else
@@ -2177,10 +2177,10 @@
 
     /* Set window dimensions to frame dimensions and allocate or
        adjust glyph matrices of W.  */
-    WSET (w, top_line, make_number (0));
-    WSET (w, left_col, make_number (0));
-    WSET (w, total_lines, make_number (FRAME_MENU_BAR_LINES (f)));
-    WSET (w, total_cols, make_number (FRAME_TOTAL_COLS (f)));
+    wset_top_line (w, make_number (0));
+    wset_left_col (w, make_number (0));
+    wset_total_lines (w, make_number (FRAME_MENU_BAR_LINES (f)));
+    wset_total_cols (w, make_number (FRAME_TOTAL_COLS (f)));
     allocate_matrices_for_window_redisplay (w);
   }
 #endif /* not USE_X_TOOLKIT && not USE_GTK */
@@ -2197,16 +2197,16 @@
        fset_tool_bar_window (f, make_window ());
        w = XWINDOW (f->tool_bar_window);
        XSETFRAME (frame, f);
-       WSET (w, frame, frame);
+       wset_frame (w, frame);
        w->pseudo_window_p = 1;
       }
     else
       w = XWINDOW (f->tool_bar_window);
 
-    WSET (w, top_line, make_number (FRAME_MENU_BAR_LINES (f)));
-    WSET (w, left_col, make_number (0));
-    WSET (w, total_lines, make_number (FRAME_TOOL_BAR_LINES (f)));
-    WSET (w, total_cols, make_number (FRAME_TOTAL_COLS (f)));
+    wset_top_line (w, make_number (FRAME_MENU_BAR_LINES (f)));
+    wset_left_col (w, make_number (0));
+    wset_total_lines (w, make_number (FRAME_TOOL_BAR_LINES (f)));
+    wset_total_cols (w, make_number (FRAME_TOTAL_COLS (f)));
     allocate_matrices_for_window_redisplay (w);
   }
 #endif
@@ -5744,7 +5744,7 @@
        FrameCols (FRAME_TTY (f)) = newwidth;
 
       if (WINDOWP (f->tool_bar_window))
-       WSET (XWINDOW (f->tool_bar_window), total_cols, make_number (newwidth));
+       wset_total_cols (XWINDOW (f->tool_bar_window), make_number (newwidth));
     }
 
   FRAME_LINES (f) = newheight;

=== modified file 'src/frame.c'
--- a/src/frame.c       2012-08-17 23:38:43 +0000
+++ b/src/frame.c       2012-08-18 01:42:52 +0000
@@ -148,8 +148,8 @@
   struct window *w = XWINDOW (window);
 
   w->last_modified = 0;
-  WSET (w, top_line, make_number (XFASTINT (w->top_line) + n));
-  WSET (w, total_lines, make_number (XFASTINT (w->total_lines) - n));
+  wset_top_line (w, make_number (XFASTINT (w->top_line) + n));
+  wset_total_lines (w, make_number (XFASTINT (w->total_lines) - n));
 
   /* Handle just the top child in a vertical split.  */
   if (!NILP (w->vchild))
@@ -305,20 +305,20 @@
   if (mini_p)
     {
       mini_window = make_window ();
-      WSET (XWINDOW (root_window), next, mini_window);
-      WSET (XWINDOW (mini_window), prev, root_window);
+      wset_next (XWINDOW (root_window), mini_window);
+      wset_prev (XWINDOW (mini_window), root_window);
       XWINDOW (mini_window)->mini = 1;
-      WSET (XWINDOW (mini_window), frame, frame);
+      wset_frame (XWINDOW (mini_window), frame);
       fset_minibuffer_window (f, mini_window);
     }
   else
     {
       mini_window = Qnil;
-      WSET (XWINDOW (root_window), next, Qnil);
+      wset_next (XWINDOW (root_window), Qnil);
       fset_minibuffer_window (f, Qnil);
     }
 
-  WSET (XWINDOW (root_window), frame, frame);
+  wset_frame (XWINDOW (root_window), frame);
 
   /* 10 is arbitrary,
      just so that there is "something there."
@@ -327,21 +327,21 @@
   SET_FRAME_COLS (f, 10);
   FRAME_LINES (f) = 10;
 
-  WSET (XWINDOW (root_window), total_cols, make_number (10));
-  WSET (XWINDOW (root_window), total_lines, make_number (mini_p ? 9 : 10));
+  wset_total_cols (XWINDOW (root_window), make_number (10));
+  wset_total_lines (XWINDOW (root_window), make_number (mini_p ? 9 : 10));
 
   if (mini_p)
     {
-      WSET (XWINDOW (mini_window), total_cols, make_number (10));
-      WSET (XWINDOW (mini_window), top_line, make_number (9));
-      WSET (XWINDOW (mini_window), total_lines, make_number (1));
+      wset_total_cols (XWINDOW (mini_window), make_number (10));
+      wset_top_line (XWINDOW (mini_window), make_number (9));
+      wset_total_lines (XWINDOW (mini_window), make_number (1));
     }
 
   /* Choose a buffer for the frame's root window.  */
   {
     Lisp_Object buf;
 
-    WSET (XWINDOW (root_window), buffer, Qt);
+    wset_buffer (XWINDOW (root_window), Qt);
     buf = Fcurrent_buffer ();
     /* If buf is a 'hidden' buffer (i.e. one whose name starts with
        a space), try to find another one.  */
@@ -360,7 +360,7 @@
 
   if (mini_p)
     {
-      WSET (XWINDOW (mini_window), buffer, Qt);
+      wset_buffer (XWINDOW (mini_window), Qt);
       set_window_buffer (mini_window,
                         (NILP (Vminibuffer_list)
                          ? get_minibuffer (0)
@@ -458,9 +458,9 @@
   mini_window = f->root_window;
   fset_minibuffer_window (f, mini_window);
   XWINDOW (mini_window)->mini = 1;
-  WSET (XWINDOW (mini_window), next, Qnil);
-  WSET (XWINDOW (mini_window), prev, Qnil);
-  WSET (XWINDOW (mini_window), frame, frame);
+  wset_next (XWINDOW (mini_window), Qnil);
+  wset_prev (XWINDOW (mini_window), Qnil);
+  wset_frame (XWINDOW (mini_window), frame);
 
   /* Put the proper buffer in that window.  */
 

=== modified file 'src/indent.c'
--- a/src/indent.c      2012-08-17 21:12:11 +0000
+++ b/src/indent.c      2012-08-18 01:42:52 +0000
@@ -2003,7 +2003,7 @@
       old_buffer = w->buffer;
       old_charpos = XMARKER (w->pointm)->charpos;
       old_bytepos = XMARKER (w->pointm)->bytepos;
-      WSET (w, buffer, Fcurrent_buffer ());
+      wset_buffer (w, Fcurrent_buffer ());
       set_marker_both (w->pointm, w->buffer,
                       BUF_PT (current_buffer), BUF_PT_BYTE (current_buffer));
     }
@@ -2146,7 +2146,7 @@
 
   if (BUFFERP (old_buffer))
     {
-      WSET (w, buffer, old_buffer);
+      wset_buffer (w, old_buffer);
       set_marker_both (w->pointm, w->buffer,
                       old_charpos, old_bytepos);
     }

=== modified file 'src/nsterm.m'
--- a/src/nsterm.m      2012-08-17 23:38:43 +0000
+++ b/src/nsterm.m      2012-08-18 01:42:52 +0000
@@ -3698,7 +3698,7 @@
         {
           bar = XNS_SCROLL_BAR (window->vertical_scroll_bar);
           [bar removeFromSuperview];
-          WSET (window, vertical_scroll_bar, Qnil);
+          wset_vertical_scroll_bar (window, Qnil);
         }
       ns_clear_frame_area (f, sb_left, top, width, height);
       UNBLOCK_INPUT;
@@ -3709,7 +3709,7 @@
     {
       ns_clear_frame_area (f, sb_left, top, width, height);
       bar = [[EmacsScroller alloc] initFrame: r window: win];
-      WSET (window, vertical_scroll_bar, make_save_value (bar, 0));
+      wset_vertical_scroll_bar (window, make_save_value (bar, 0));
     }
   else
     {
@@ -6388,7 +6388,7 @@
 {
   NSTRACE (EmacsScroller_dealloc);
   if (!NILP (win))
-    WSET (XWINDOW (win), vertical_scroll_bar, Qnil);
+    wset_vertical_scroll_bar (XWINDOW (win), Qnil);
   [super dealloc];
 }
 

=== modified file 'src/w32fns.c'
--- a/src/w32fns.c      2012-08-17 23:38:43 +0000
+++ b/src/w32fns.c      2012-08-18 01:42:52 +0000
@@ -5647,8 +5647,8 @@
 
   /* Set up the frame's root window.  */
   w = XWINDOW (FRAME_ROOT_WINDOW (f));
-  WSET (w, left_col, make_number (0));
-  WSET (w, top_line, make_number (0));
+  wset_left_col (w, make_number (0));
+  wset_top_line (w, make_number (0));
 
   if (CONSP (Vx_max_tooltip_size)
       && INTEGERP (XCAR (Vx_max_tooltip_size))
@@ -5656,13 +5656,13 @@
       && INTEGERP (XCDR (Vx_max_tooltip_size))
       && XINT (XCDR (Vx_max_tooltip_size)) > 0)
     {
-      WSET (w, total_cols, XCAR (Vx_max_tooltip_size));
-      WSET (w, total_lines, XCDR (Vx_max_tooltip_size));
+      wset_total_cols (w, XCAR (Vx_max_tooltip_size));
+      wset_total_lines (w, XCDR (Vx_max_tooltip_size));
     }
   else
     {
-      WSET (w, total_cols, make_number (80));
-      WSET (w, total_lines, make_number (40));
+      wset_total_cols (w, make_number (80));
+      wset_total_lines (w, make_number (40));
     }
 
   FRAME_TOTAL_COLS (f) = XINT (w->total_cols);
@@ -5733,7 +5733,7 @@
       /* w->total_cols and FRAME_TOTAL_COLS want the width in columns,
         not in pixels.  */
       width /= WINDOW_FRAME_COLUMN_WIDTH (w);
-      WSET (w, total_cols, make_number (width));
+      wset_total_cols (w, make_number (width));
       FRAME_TOTAL_COLS (f) = width;
       adjust_glyphs (f);
       w->pseudo_window_p = 1;

=== modified file 'src/w32term.c'
--- a/src/w32term.c     2012-08-17 23:38:43 +0000
+++ b/src/w32term.c     2012-08-18 01:42:52 +0000
@@ -3670,7 +3670,7 @@
   my_destroy_window (f, SCROLL_BAR_W32_WINDOW (bar));
 
   /* Dissociate this scroll bar from its window.  */
-  WSET (XWINDOW (bar->window), vertical_scroll_bar, Qnil);
+  wset_vertical_scroll_bar (XWINDOW (bar->window), Qnil);
 
   UNBLOCK_INPUT;
 }
@@ -3808,7 +3808,7 @@
 
   w32_set_scroll_bar_thumb (bar, portion, position, whole);
   XSETVECTOR (barobj, bar);
-  WSET (w, vertical_scroll_bar, barobj);
+  wset_vertical_scroll_bar (w, barobj);
 }
 
 

=== modified file 'src/window.c'
--- a/src/window.c      2012-08-17 21:52:15 +0000
+++ b/src/window.c      2012-08-18 01:42:52 +0000
@@ -19,6 +19,9 @@
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
+
+#define WINDOW_INLINE EXTERN_INLINE
+
 #include <stdio.h>
 #include <setjmp.h>
 
@@ -130,6 +133,118 @@
 static EMACS_INT window_scroll_preserve_hpos;
 static EMACS_INT window_scroll_preserve_vpos;
 
+/* These setters are used only in this file, so they can be private.  */
+static inline void
+wset_combination_limit (struct window *w, Lisp_Object val)
+{
+  w->combination_limit = val;
+}
+static inline void
+wset_dedicated (struct window *w, Lisp_Object val)
+{
+  w->dedicated = val;
+}
+static inline void
+wset_display_table (struct window *w, Lisp_Object val)
+{
+  w->display_table = val;
+}
+static inline void
+wset_hchild (struct window *w, Lisp_Object val)
+{
+  w->hchild = val;
+}
+static inline void
+wset_left_fringe_width (struct window *w, Lisp_Object val)
+{
+  w->left_fringe_width = val;
+}
+static inline void
+wset_left_margin_cols (struct window *w, Lisp_Object val)
+{
+  w->left_margin_cols = val;
+}
+static inline void
+wset_new_normal (struct window *w, Lisp_Object val)
+{
+  w->new_normal = val;
+}
+static inline void
+wset_new_total (struct window *w, Lisp_Object val)
+{
+  w->new_total = val;
+}
+static inline void
+wset_next_buffers (struct window *w, Lisp_Object val)
+{
+  w->next_buffers = val;
+}
+static inline void
+wset_normal_cols (struct window *w, Lisp_Object val)
+{
+  w->normal_cols = val;
+}
+static inline void
+wset_normal_lines (struct window *w, Lisp_Object val)
+{
+  w->normal_lines = val;
+}
+static inline void
+wset_parent (struct window *w, Lisp_Object val)
+{
+  w->parent = val;
+}
+static inline void
+wset_pointm (struct window *w, Lisp_Object val)
+{
+  w->pointm = val;
+}
+static inline void
+wset_prev_buffers (struct window *w, Lisp_Object val)
+{
+  w->prev_buffers = val;
+}
+static inline void
+wset_right_fringe_width (struct window *w, Lisp_Object val)
+{
+  w->right_fringe_width = val;
+}
+static inline void
+wset_right_margin_cols (struct window *w, Lisp_Object val)
+{
+  w->right_margin_cols = val;
+}
+static inline void
+wset_scroll_bar_width (struct window *w, Lisp_Object val)
+{
+  w->scroll_bar_width = val;
+}
+static inline void
+wset_start (struct window *w, Lisp_Object val)
+{
+  w->start = val;
+}
+static inline void
+wset_temslot (struct window *w, Lisp_Object val)
+{
+  w->temslot = val;
+}
+static inline void
+wset_vchild (struct window *w, Lisp_Object val)
+{
+  w->vchild = val;
+}
+static inline void
+wset_vertical_scroll_bar_type (struct window *w, Lisp_Object val)
+{
+  w->vertical_scroll_bar_type = val;
+}
+static inline void
+wset_window_parameters (struct window *w, Lisp_Object val)
+{
+  w->window_parameters = val;
+}
+
 struct window *
 decode_live_window (register Lisp_Object window)
 {
@@ -514,7 +629,8 @@
 for future use.  */)
   (Lisp_Object window, Lisp_Object limit)
 {
-  return WSET (decode_valid_window (window), combination_limit, limit);
+  wset_combination_limit (decode_valid_window (window), limit);
+  return limit;
 }
 
 DEFUN ("window-use-time", Fwindow_use_time, Swindow_use_time, 0, 1, 0,
@@ -753,7 +869,8 @@
 end-trigger value is reset to nil.  */)
   (register Lisp_Object window, Lisp_Object value)
 {
-  return WSET (decode_live_window (window), redisplay_end_trigger, value);
+  wset_redisplay_end_trigger (decode_live_window (window), value);
+  return value;
 }
 
 DEFUN ("window-edges", Fwindow_edges, Swindow_edges, 0, 1, 0,
@@ -1674,7 +1791,8 @@
 window, it also makes sure that the window is no more dedicated.  */)
   (Lisp_Object window, Lisp_Object flag)
 {
-  return WSET (decode_live_window (window), dedicated, flag);
+  wset_dedicated (decode_live_window (window), flag);
+  return flag;
 }
 
 DEFUN ("window-prev-buffers", Fwindow_prev_buffers, Swindow_prev_buffers,
@@ -1700,7 +1818,8 @@
 window for that buffer, and POS is a window-specific point value.  */)
      (Lisp_Object window, Lisp_Object prev_buffers)
 {
-  return WSET (decode_live_window (window), prev_buffers, prev_buffers);
+  wset_prev_buffers (decode_live_window (window), prev_buffers);
+  return prev_buffers;
 }
 
 DEFUN ("window-next-buffers", Fwindow_next_buffers, Swindow_next_buffers,
@@ -1719,7 +1838,8 @@
 NEXT-BUFFERS should be a list of buffers.  */)
      (Lisp_Object window, Lisp_Object next_buffers)
 {
-  return WSET (decode_live_window (window), next_buffers, next_buffers);
+  wset_next_buffers (decode_live_window (window), next_buffers);
+  return next_buffers;
 }
 
 DEFUN ("window-parameters", Fwindow_parameters, Swindow_parameters,
@@ -1756,8 +1876,8 @@
 
   old_alist_elt = Fassq (parameter, w->window_parameters);
   if (NILP (old_alist_elt))
-    WSET (w, window_parameters,
-         Fcons (Fcons (parameter, value), w->window_parameters));
+    wset_window_parameters
+      (w, Fcons (Fcons (parameter, value), w->window_parameters));
   else
     Fsetcdr (old_alist_elt, value);
   return value;
@@ -1802,7 +1922,8 @@
 WINDOW must be a live window and defaults to the selected one.  */)
   (register Lisp_Object window, Lisp_Object table)
 {
-  return WSET (decode_live_window (window), display_table, table);
+  wset_display_table (decode_live_window (window), table);
+  return table;
 }
 
 /* Record info on buffer window W is displaying
@@ -1870,14 +1991,14 @@
 
    if (setflag)
      {
-      WSET (n, left_col, o->left_col);
-      WSET (n, top_line, o->top_line);
-      WSET (n, total_cols, o->total_cols);
-      WSET (n, total_lines, o->total_lines);
-      WSET (n, normal_cols, o->normal_cols);
-      WSET (o, normal_cols, make_float (1.0));
-      WSET (n, normal_lines, o->normal_lines);
-      WSET (o, normal_lines, make_float (1.0));
+      wset_left_col (n, o->left_col);
+      wset_top_line (n, o->top_line);
+      wset_total_cols (n, o->total_cols);
+      wset_total_lines (n, o->total_lines);
+      wset_normal_cols (n, o->normal_cols);
+      wset_normal_cols (o, make_float (1.0));
+      wset_normal_lines (n, o->normal_lines);
+      wset_normal_lines (o, make_float (1.0));
       n->desired_matrix = n->current_matrix = 0;
       n->vscroll = 0;
       memset (&n->cursor, 0, sizeof (n->cursor));
@@ -1887,30 +2008,30 @@
       n->phys_cursor_width = -1;
       n->must_be_updated_p = 0;
       n->pseudo_window_p = 0;
-      WSET (n, window_end_vpos, make_number (0));
-      WSET (n, window_end_pos, make_number (0));
-      WSET (n, window_end_valid, Qnil);
+      wset_window_end_vpos (n, make_number (0));
+      wset_window_end_pos (n, make_number (0));
+      wset_window_end_valid (n, Qnil);
       n->frozen_window_start_p = 0;
     }
 
   tem = o->next;
-  WSET (n, next, tem);
+  wset_next (n, tem);
   if (!NILP (tem))
-    WSET (XWINDOW (tem), prev, new);
+    wset_prev (XWINDOW (tem), new);
 
   tem = o->prev;
-  WSET (n, prev, tem);
+  wset_prev (n, tem);
   if (!NILP (tem))
-    WSET (XWINDOW (tem), next, new);
+    wset_next (XWINDOW (tem), new);
 
   tem = o->parent;
-  WSET (n, parent, tem);
+  wset_parent (n, tem);
   if (!NILP (tem))
     {
       if (EQ (XWINDOW (tem)->vchild, old))
-       WSET (XWINDOW (tem), vchild, new);
+       wset_vchild (XWINDOW (tem), new);
       if (EQ (XWINDOW (tem)->hchild, old))
-       WSET (XWINDOW (tem), hchild, new);
+       wset_hchild (XWINDOW (tem), new);
     }
 }
 
@@ -1943,34 +2064,34 @@
             assign new normal sizes.  */
          if (NILP (w->prev))
            if (horflag)
-             WSET (p, hchild, child);
+             wset_hchild (p, child);
            else
-             WSET (p, vchild, child);
+             wset_vchild (p, child);
          else
            {
-             WSET (c, prev, w->prev);
-             WSET (XWINDOW (w->prev), next, child);
+             wset_prev (c, w->prev);
+             wset_next (XWINDOW (w->prev), child);
            }
 
          while (c)
            {
-             WSET (c, parent, parent);
+             wset_parent (c, parent);
 
              if (horflag)
-               WSET (c, normal_cols,
-                     make_float (XFLOATINT (c->total_cols)
-                                 / XFLOATINT (p->total_cols)));
+               wset_normal_cols (c,
+                                 make_float (XFLOATINT (c->total_cols)
+                                             / XFLOATINT (p->total_cols)));
              else
-               WSET (c, normal_lines,
-                     make_float (XFLOATINT (c->total_lines)
-                                 / XFLOATINT (p->total_lines)));
+               wset_normal_lines (c,
+                                  make_float (XFLOATINT (c->total_lines)
+                                              / XFLOATINT (p->total_lines)));
 
              if (NILP (c->next))
                {
                  if (!NILP (w->next))
                    {
-                     WSET (c, next, w->next);
-                     WSET (XWINDOW (c->next), prev, child);
+                     wset_next (c, w->next);
+                     wset_prev (XWINDOW (c->next), child);
                    }
 
                  c = 0;
@@ -1983,8 +2104,8 @@
            }
 
          /* WINDOW can be deleted now.  */
-         WSET (w, vchild, Qnil);
-         WSET (w, hchild, Qnil);
+         wset_vchild (w, Qnil);
+         wset_hchild (w, Qnil);
        }
     }
 }
@@ -2505,7 +2626,7 @@
            if (EQ (w->buffer, obj))
              {
                /* Undedicate WINDOW.  */
-               WSET (w, dedicated, Qnil);
+               wset_dedicated (w, Qnil);
                /* Make WINDOW show the buffer returned by
                   other_buffer_safely, don't run any hooks.  */
                set_window_buffer
@@ -2727,7 +2848,7 @@
       /* Resize child windows vertically.  */
       XSETINT (delta, XINT (r->total_lines)
               - XINT (w->total_lines));
-      WSET (w, top_line, r->top_line);
+      wset_top_line (w, r->top_line);
       resize_root_window (window, delta, Qnil, Qnil);
       if (window_resize_check (w, 0))
        window_resize_apply (w, 0);
@@ -2743,10 +2864,10 @@
       /* Resize child windows horizontally.  */
       if (!resize_failed)
        {
-         WSET (w, left_col, r->left_col);
+         wset_left_col (w, r->left_col);
          XSETINT (delta,
                   XINT (r->total_cols) - XINT (w->total_cols));
-         WSET (w, left_col, r->left_col);
+         wset_left_col (w, r->left_col);
          resize_root_window (window, delta, Qt, Qnil);
          if (window_resize_check (w, 1))
            window_resize_apply (w, 1);
@@ -2774,32 +2895,32 @@
     {
       sibling = w->prev;
       s = XWINDOW (sibling);
-      WSET (s, next, w->next);
+      wset_next (s, w->next);
       if (!NILP (s->next))
-       WSET (XWINDOW (s->next), prev, sibling);
+       wset_prev (XWINDOW (s->next), sibling);
     }
   else
     /* Get SIBLING below (on the right of) WINDOW.  */
     {
       sibling = w->next;
       s = XWINDOW (sibling);
-      WSET (s, prev, Qnil);
+      wset_prev (s, Qnil);
       if (!NILP (XWINDOW (w->parent)->vchild))
-       WSET (XWINDOW (w->parent), vchild, sibling);
+       wset_vchild (XWINDOW (w->parent), sibling);
       else
-       WSET (XWINDOW (w->parent), hchild, sibling);
+       wset_hchild (XWINDOW (w->parent), sibling);
     }
 
   /* Delete ROOT and all child windows of ROOT.  */
   if (!NILP (r->vchild))
     {
       delete_all_child_windows (r->vchild);
-      WSET (r, vchild, Qnil);
+      wset_vchild (r, Qnil);
     }
   else if (!NILP (r->hchild))
     {
       delete_all_child_windows (r->hchild);
-      WSET (r, hchild, Qnil);
+      wset_hchild (r, Qnil);
     }
 
   replace_window (root, window, 1);
@@ -2826,7 +2947,7 @@
          pos = *vmotion (startpos, -top, w);
 
          set_marker_both (w->start, w->buffer, pos.bufpos, pos.bytepos);
-         WSET (w, window_end_valid, Qnil);
+         wset_window_end_valid (w, Qnil);
          w->start_at_line_beg = (pos.bytepos == BEGV_BYTE
                                    || FETCH_BYTE (pos.bytepos - 1) == '\n');
          /* We need to do this, so that the window-scroll-functions
@@ -2917,14 +3038,14 @@
     {
       if (WINDOW_LEFT_MARGIN_COLS (w) > 0)
        {
-         WSET (w, left_margin_cols, make_number (margin_cols / 2));
-         WSET (w, right_margin_cols, make_number (margin_cols / 2));
+         wset_left_margin_cols (w, make_number (margin_cols / 2));
+         wset_right_margin_cols (w, make_number (margin_cols / 2));
        }
       else
-       WSET (w, right_margin_cols, make_number (margin_cols));
+       wset_right_margin_cols (w, make_number (margin_cols));
     }
   else
-    WSET (w, left_margin_cols, make_number (margin_cols));
+    wset_left_margin_cols (w, make_number (margin_cols));
   return 1;
 }
 
@@ -3024,7 +3145,7 @@
   ptrdiff_t count = SPECPDL_INDEX ();
   int samebuf = EQ (buffer, w->buffer);
 
-  WSET (w, buffer, buffer);
+  wset_buffer (w, buffer);
 
   if (EQ (window, selected_window))
     BSET (b, last_selected_window, window);
@@ -3037,10 +3158,10 @@
     BSET (b, display_count, make_number (XINT (BVAR (b, display_count)) + 1));
   BSET (b, display_time, Fcurrent_time ());
 
-  WSET (w, window_end_pos, make_number (0));
-  WSET (w, window_end_vpos, make_number (0));
+  wset_window_end_pos (w, make_number (0));
+  wset_window_end_vpos (w, make_number (0));
   memset (&w->last_cursor, 0, sizeof w->last_cursor);
-  WSET (w, window_end_valid, Qnil);
+  wset_window_end_valid (w, Qnil);
   if (!(keep_margins_p && samebuf))
     { /* If we're not actually changing the buffer, don't reset hscroll and
         vscroll.  This case happens for example when called from
@@ -3085,8 +3206,8 @@
       Lisp_Object save_left = w->left_margin_cols;
       Lisp_Object save_right = w->right_margin_cols;
 
-      WSET (w, left_margin_cols, Qnil);
-      WSET (w, right_margin_cols, Qnil);
+      wset_left_margin_cols (w, Qnil);
+      wset_right_margin_cols (w, Qnil);
 
       Fset_window_fringes (window,
                           BVAR (b, left_fringe_width), BVAR (b, 
right_fringe_width),
@@ -3096,8 +3217,8 @@
                               BVAR (b, scroll_bar_width),
                               BVAR (b, vertical_scroll_bar_type), Qnil);
 
-      WSET (w, left_margin_cols, save_left);
-      WSET (w, right_margin_cols, save_right);
+      wset_left_margin_cols (w, save_left);
+      wset_right_margin_cols (w, save_right);
 
       Fset_window_margins (window,
                           BVAR (b, left_margin_cols), BVAR (b, 
right_margin_cols));
@@ -3156,7 +3277,7 @@
          else
            /* WINDOW is weakly dedicated to its buffer, reset
               dedication.  */
-           WSET (w, dedicated, Qnil);
+           wset_dedicated (w, Qnil);
 
          call1 (Qrecord_window_buffer, window);
        }
@@ -3302,17 +3423,17 @@
 
   replace_window (window, parent, 1);
 
-  WSET (o, next, Qnil);
-  WSET (o, prev, Qnil);
-  WSET (o, parent, parent);
+  wset_next (o, Qnil);
+  wset_prev (o, Qnil);
+  wset_parent (o, parent);
 
-  WSET (p, hchild, horflag ? window : Qnil);
-  WSET (p, vchild, horflag ? Qnil : window);
-  WSET (p, start, Qnil);
-  WSET (p, pointm, Qnil);
-  WSET (p, buffer, Qnil);
-  WSET (p, combination_limit, Qnil);
-  WSET (p, window_parameters, Qnil);
+  wset_hchild (p, horflag ? window : Qnil);
+  wset_vchild (p, horflag ? Qnil : window);
+  wset_start (p, Qnil);
+  wset_pointm (p, Qnil);
+  wset_buffer (p, Qnil);
+  wset_combination_limit (p, Qnil);
+  wset_window_parameters (p, Qnil);
 }
 
 /* Make new window from scratch.  */
@@ -3325,19 +3446,19 @@
   w = allocate_window ();
   /* Initialize Lisp data.  Note that allocate_window initializes all
      Lisp data to nil, so do it only for slots which should not be nil.  */
-  WSET (w, left_col, make_number (0));
-  WSET (w, top_line, make_number (0));
-  WSET (w, total_lines, make_number (0));
-  WSET (w, total_cols, make_number (0));
-  WSET (w, normal_lines, make_float (1.0));
-  WSET (w, normal_cols, make_float (1.0));
-  WSET (w, new_total, make_number (0));
-  WSET (w, new_normal, make_number (0));
-  WSET (w, start, Fmake_marker ());
-  WSET (w, pointm, Fmake_marker ());
-  WSET (w, vertical_scroll_bar_type, Qt);
-  WSET (w, window_end_pos, make_number (0));
-  WSET (w, window_end_vpos, make_number (0));
+  wset_left_col (w, make_number (0));
+  wset_top_line (w, make_number (0));
+  wset_total_lines (w, make_number (0));
+  wset_total_cols (w, make_number (0));
+  wset_normal_lines (w, make_float (1.0));
+  wset_normal_cols (w, make_float (1.0));
+  wset_new_total (w, make_number (0));
+  wset_new_normal (w, make_number (0));
+  wset_start (w, Fmake_marker ());
+  wset_pointm (w, Fmake_marker ());
+  wset_vertical_scroll_bar_type (w, Qt);
+  wset_window_end_pos (w, make_number (0));
+  wset_window_end_vpos (w, make_number (0));
 
   /* Initialize non-Lisp data.  Note that allocate_window zeroes out all
      non-Lisp data, so do it only for slots which should not be zero.  */
@@ -3368,9 +3489,9 @@
 
   CHECK_NUMBER (size);
   if (NILP (add))
-    WSET (w, new_total, size);
+    wset_new_total (w, size);
   else
-    WSET (w, new_total, make_number (XINT (w->new_total) + XINT (size)));
+    wset_new_total (w, make_number (XINT (w->new_total) + XINT (size)));
 
   return w->new_total;
 }
@@ -3383,7 +3504,8 @@
 Note: This function does not operate on any child windows of WINDOW.  */)
      (Lisp_Object window, Lisp_Object size)
 {
-  return WSET (decode_valid_window (window), new_normal, size);
+  wset_new_normal (decode_valid_window (window), size);
+  return size;
 }
 
 /* Return 1 if setting w->total_lines (w->total_cols if HORFLAG is
@@ -3484,17 +3606,17 @@
      parent window has been set *before*.  */
   if (horflag)
     {
-      WSET (w, total_cols, w->new_total);
+      wset_total_cols (w, w->new_total);
       if (NUMBERP (w->new_normal))
-       WSET (w, normal_cols, w->new_normal);
+       wset_normal_cols (w, w->new_normal);
 
       pos = XINT (w->left_col);
     }
   else
     {
-      WSET (w, total_lines, w->new_total);
+      wset_total_lines (w, w->new_total);
       if (NUMBERP (w->new_normal))
-       WSET (w, normal_lines, w->new_normal);
+       wset_normal_lines (w, w->new_normal);
 
       pos = XINT (w->top_line);
     }
@@ -3506,9 +3628,9 @@
       while (c)
        {
          if (horflag)
-           WSET (c, left_col, make_number (pos));
+           wset_left_col (c, make_number (pos));
          else
-           WSET (c, top_line, make_number (pos));
+           wset_top_line (c, make_number (pos));
          window_resize_apply (c, horflag);
          if (!horflag)
            pos = pos + XINT (c->total_lines);
@@ -3522,9 +3644,9 @@
       while (c)
        {
          if (horflag)
-           WSET (c, left_col, make_number (pos));
+           wset_left_col (c, make_number (pos));
          else
-           WSET (c, top_line, make_number (pos));
+           wset_top_line (c, make_number (pos));
          window_resize_apply (c, horflag);
          if (horflag)
            pos = pos + XINT (c->total_cols);
@@ -3605,13 +3727,13 @@
                     - ((FRAME_HAS_MINIBUF_P (f) && !FRAME_MINIBUF_ONLY_P (f))
                        ? 1 : 0)));
 
-  WSET (r, top_line, make_number (FRAME_TOP_MARGIN (f)));
+  wset_top_line (r, make_number (FRAME_TOP_MARGIN (f)));
   if (NILP (r->vchild) && NILP (r->hchild))
     /* For a leaf root window just set the size.  */
     if (horflag)
-      WSET (r, total_cols, make_number (new_size));
+      wset_total_cols (r, make_number (new_size));
     else
-      WSET (r, total_lines, make_number (new_size));
+      wset_total_lines (r, make_number (new_size));
   else
     {
       /* old_size is the old size of the frame's root window.  */
@@ -3646,9 +3768,9 @@
                  root = f->selected_window;
                  Fdelete_other_windows_internal (root, Qnil);
                  if (horflag)
-                   WSET (XWINDOW (root), total_cols, make_number (new_size));
+                   wset_total_cols (XWINDOW (root), make_number (new_size));
                  else
-                   WSET (XWINDOW (root), total_lines, make_number (new_size));
+                   wset_total_lines (XWINDOW (root), make_number (new_size));
                }
            }
        }
@@ -3658,13 +3780,13 @@
     {
       m = XWINDOW (mini);
       if (horflag)
-       WSET (m, total_cols, make_number (size));
+       wset_total_cols (m, make_number (size));
       else
        {
          /* Are we sure we always want 1 line here?  */
-         WSET (m, total_lines, make_number (1));
-         WSET (m, top_line,
-               make_number (XINT (r->top_line) + XINT (r->total_lines)));
+         wset_total_lines (m, make_number (1));
+         wset_top_line
+           (m, make_number (XINT (r->top_line) + XINT (r->total_lines)));
        }
     }
 }
@@ -3745,15 +3867,14 @@
     {
       p = XWINDOW (o->parent);
       /* Temporarily pretend we split the parent window.  */
-      WSET (p, new_total,
-           make_number (XINT (horflag ? p->total_cols : p->total_lines)
+      wset_new_total
+       (p, make_number (XINT (horflag ? p->total_cols : p->total_lines)
                         - XINT (total_size)));
       if (!window_resize_check (p, horflag))
        error ("Window sizes don't fit");
       else
        /* Undo the temporary pretension.  */
-       WSET (p, new_total,
-             horflag ? p->total_cols : p->total_lines);
+       wset_new_total (p, horflag ? p->total_cols : p->total_lines);
     }
   else
     {
@@ -3777,10 +3898,10 @@
       p = XWINDOW (o->parent);
       /* Store value of `window-combination-limit' in new parent's
         combination_limit slot.  */
-      WSET (p, combination_limit, Vwindow_combination_limit);
+      wset_combination_limit (p, Vwindow_combination_limit);
       /* These get applied below.  */
-      WSET (p, new_total, horflag ? o->total_cols : o->total_lines);
-      WSET (p, new_normal, new_normal);
+      wset_new_total (p, horflag ? o->total_cols : o->total_lines);
+      wset_new_normal (p, new_normal);
     }
   else
     p = XWINDOW (o->parent);
@@ -3789,62 +3910,62 @@
   FRAME_WINDOW_SIZES_CHANGED (f) = 1;
   new = make_window ();
   n = XWINDOW (new);
-  WSET (n, frame, frame);
-  WSET (n, parent, o->parent);
-  WSET (n, vchild, Qnil);
-  WSET (n, hchild, Qnil);
+  wset_frame (n, frame);
+  wset_parent (n, o->parent);
+  wset_vchild (n, Qnil);
+  wset_hchild (n, Qnil);
 
   if (EQ (side, Qabove) || EQ (side, Qleft))
     {
-      WSET (n, prev, o->prev);
+      wset_prev (n, o->prev);
       if (NILP (n->prev))
        if (horflag)
-         WSET (p, hchild, new);
+         wset_hchild (p, new);
        else
-         WSET (p, vchild, new);
+         wset_vchild (p, new);
       else
-       WSET (XWINDOW (n->prev), next, new);
-      WSET (n, next, old);
-      WSET (o, prev, new);
+       wset_next (XWINDOW (n->prev), new);
+      wset_next (n, old);
+      wset_prev (o, new);
     }
   else
     {
-      WSET (n, next, o->next);
+      wset_next (n, o->next);
       if (!NILP (n->next))
-       WSET (XWINDOW (n->next), prev, new);
-      WSET (n, prev, old);
-      WSET (o, next, new);
+       wset_prev (XWINDOW (n->next), new);
+      wset_prev (n, old);
+      wset_next (o, new);
     }
 
-  WSET (n, buffer, Qt);
-  WSET (n, window_end_valid, Qnil);
+  wset_buffer (n, Qt);
+  wset_window_end_valid (n, Qnil);
   memset (&n->last_cursor, 0, sizeof n->last_cursor);
 
   /* Get special geometry settings from reference window.  */
-  WSET (n, left_margin_cols, r->left_margin_cols);
-  WSET (n, right_margin_cols, r->right_margin_cols);
-  WSET (n, left_fringe_width, r->left_fringe_width);
-  WSET (n, right_fringe_width, r->right_fringe_width);
+  wset_left_margin_cols (n, r->left_margin_cols);
+  wset_right_margin_cols (n, r->right_margin_cols);
+  wset_left_fringe_width (n, r->left_fringe_width);
+  wset_right_fringe_width (n, r->right_fringe_width);
   n->fringes_outside_margins = r->fringes_outside_margins;
-  WSET (n, scroll_bar_width, r->scroll_bar_width);
-  WSET (n, vertical_scroll_bar_type, r->vertical_scroll_bar_type);
+  wset_scroll_bar_width (n, r->scroll_bar_width);
+  wset_vertical_scroll_bar_type (n, r->vertical_scroll_bar_type);
 
   /* Directly assign orthogonal coordinates and sizes.  */
   if (horflag)
     {
-      WSET (n, top_line, o->top_line);
-      WSET (n, total_lines, o->total_lines);
+      wset_top_line (n, o->top_line);
+      wset_total_lines (n, o->total_lines);
     }
   else
     {
-      WSET (n, left_col, o->left_col);
-      WSET (n, total_cols, o->total_cols);
+      wset_left_col (n, o->left_col);
+      wset_total_cols (n, o->total_cols);
     }
 
   /* Iso-coordinates and sizes are assigned by window_resize_apply,
      get them ready here.  */
-  WSET (n, new_total, total_size);
-  WSET (n, new_normal, normal_size);
+  wset_new_total (n, total_size);
+  wset_new_normal (n, normal_size);
 
   BLOCK_INPUT;
   window_resize_apply (p, horflag);
@@ -3910,20 +4031,20 @@
       before_sibling = 1;
       sibling = w->next;
       s = XWINDOW (sibling);
-      WSET (s, prev, Qnil);
+      wset_prev (s, Qnil);
       if (horflag)
-       WSET (p, hchild, sibling);
+       wset_hchild (p, sibling);
       else
-       WSET (p, vchild, sibling);
+       wset_vchild (p, sibling);
     }
   else
     /* Get SIBLING above (on the left of) WINDOW.  */
     {
       sibling = w->prev;
       s = XWINDOW (sibling);
-      WSET (s, next, w->next);
+      wset_next (s, w->next);
       if (!NILP (s->next))
-       WSET (XWINDOW (s->next), prev, sibling);
+       wset_prev (XWINDOW (s->next), sibling);
     }
 
   if (window_resize_check (r, horflag)
@@ -3950,25 +4071,25 @@
       Vwindow_list = Qnil;
       FRAME_WINDOW_SIZES_CHANGED (f) = 1;
 
-      WSET (w, next, Qnil);  /* Don't delete w->next too.  */
+      wset_next (w, Qnil);  /* Don't delete w->next too.  */
       free_window_matrices (w);
 
       if (!NILP (w->vchild))
        {
          delete_all_child_windows (w->vchild);
-         WSET (w, vchild, Qnil);
+         wset_vchild (w, Qnil);
        }
       else if (!NILP (w->hchild))
        {
          delete_all_child_windows (w->hchild);
-         WSET (w, hchild, Qnil);
+         wset_hchild (w, Qnil);
        }
       else if (!NILP (w->buffer))
        {
          unshow_buffer (w);
          unchain_marker (XMARKER (w->pointm));
          unchain_marker (XMARKER (w->start));
-         WSET (w, buffer, Qnil);
+         wset_buffer (w, Qnil);
        }
 
       if (NILP (s->prev) && NILP (s->next))
@@ -3979,11 +4100,11 @@
          replace_window (parent, sibling, 0);
          /* Have SIBLING inherit the following three slot values from
             PARENT (the combination_limit slot is not inherited).  */
-         WSET (s, normal_cols, p->normal_cols);
-         WSET (s, normal_lines, p->normal_lines);
+         wset_normal_cols (s, p->normal_cols);
+         wset_normal_lines (s, p->normal_lines);
          /* Mark PARENT as deleted.  */
-         WSET (p, vchild, Qnil);
-         WSET (p, hchild, Qnil);
+         wset_vchild (p, Qnil);
+         wset_hchild (p, Qnil);
          /* Try to merge SIBLING into its new parent.  */
          recombine_windows (sibling);
        }
@@ -4030,17 +4151,17 @@
     {
       if (before_sibling)
        {
-         WSET (s, prev, window);
+         wset_prev (s, window);
          if (horflag)
-           WSET (p, hchild, window);
+           wset_hchild (p, window);
          else
-           WSET (p, vchild, window);
+           wset_vchild (p, window);
        }
       else
        {
-         WSET (s, next, window);
+         wset_next (s, window);
          if (!NILP (w->next))
-           WSET (XWINDOW (w->next), prev, window);
+           wset_prev (XWINDOW (w->next), window);
        }
       error ("Deletion failed");
     }
@@ -4074,10 +4195,10 @@
       window_resize_apply (r, 0);
 
       /* Grow the mini-window.  */
-      WSET (w, top_line,
-           make_number (XFASTINT (r->top_line) + XFASTINT (r->total_lines)));
-      WSET (w, total_lines,
-           make_number (XFASTINT (w->total_lines) - XINT (value)));
+      wset_top_line
+       (w, make_number (XFASTINT (r->top_line) + XFASTINT (r->total_lines)));
+      wset_total_lines
+       (w, make_number (XFASTINT (w->total_lines) - XINT (value)));
       w->last_modified = 0;
       w->last_overlay_modified = 0;
 
@@ -4111,9 +4232,9 @@
          window_resize_apply (r, 0);
 
          /* Shrink the mini-window.  */
-         WSET (w, top_line,
-               make_number (XFASTINT (r->top_line) + XFASTINT 
(r->total_lines)));
-         WSET (w, total_lines, make_number (1));
+         wset_top_line (w, make_number (XFASTINT (r->top_line)
+                                        + XFASTINT (r->total_lines)));
+         wset_total_lines (w, make_number (1));
 
          w->last_modified = 0;
          w->last_overlay_modified = 0;
@@ -4154,9 +4275,9 @@
       BLOCK_INPUT;
       window_resize_apply (r, 0);
 
-      WSET (w, total_lines, w->new_total);
-      WSET (w, top_line,
-           make_number (XINT (r->top_line) + XINT (r->total_lines)));
+      wset_total_lines (w, w->new_total);
+      wset_top_line (w, make_number (XINT (r->top_line)
+                                    + XINT (r->total_lines)));
 
       windows_or_buffers_changed++;
       FRAME_WINDOW_SIZES_CHANGED (f) = 1;
@@ -5224,7 +5345,7 @@
 
   /* Set the new window start.  */
   set_marker_both (w->start, w->buffer, charpos, bytepos);
-  WSET (w, window_end_valid, Qnil);
+  wset_window_end_valid (w, Qnil);
 
   w->optional_new_start = 1;
 
@@ -5542,34 +5663,34 @@
          p = SAVED_WINDOW_N (saved_windows, k);
          window = p->window;
          w = XWINDOW (window);
-         WSET (w, next, Qnil);
+         wset_next (w, Qnil);
 
          if (!NILP (p->parent))
-           WSET (w, parent, SAVED_WINDOW_N
-                 (saved_windows, XFASTINT (p->parent))->window);
+           wset_parent
+             (w, SAVED_WINDOW_N (saved_windows, XFASTINT (p->parent))->window);
          else
-           WSET (w, parent, Qnil);
+           wset_parent (w, Qnil);
 
          if (!NILP (p->prev))
            {
-             WSET (w, prev, SAVED_WINDOW_N
-                   (saved_windows, XFASTINT (p->prev))->window);
-             WSET (XWINDOW (w->prev), next, p->window);
+             wset_prev
+               (w, SAVED_WINDOW_N (saved_windows, XFASTINT (p->prev))->window);
+             wset_next (XWINDOW (w->prev), p->window);
            }
          else
            {
-             WSET (w, prev, Qnil);
+             wset_prev (w, Qnil);
              if (!NILP (w->parent))
                {
                  if (EQ (p->total_cols, XWINDOW (w->parent)->total_cols))
                    {
-                     WSET (XWINDOW (w->parent), vchild, p->window);
-                     WSET (XWINDOW (w->parent), hchild, Qnil);
+                     wset_vchild (XWINDOW (w->parent), p->window);
+                     wset_hchild (XWINDOW (w->parent), Qnil);
                    }
                  else
                    {
-                     WSET (XWINDOW (w->parent), hchild, p->window);
-                     WSET (XWINDOW (w->parent), vchild, Qnil);
+                     wset_hchild (XWINDOW (w->parent), p->window);
+                     wset_vchild (XWINDOW (w->parent), Qnil);
                    }
                }
            }
@@ -5577,25 +5698,25 @@
          /* If we squirreled away the buffer in the window's height,
             restore it now.  */
          if (BUFFERP (w->total_lines))
-           WSET (w, buffer, w->total_lines);
-         WSET (w, left_col, p->left_col);
-         WSET (w, top_line, p->top_line);
-         WSET (w, total_cols, p->total_cols);
-         WSET (w, total_lines, p->total_lines);
-         WSET (w, normal_cols, p->normal_cols);
-         WSET (w, normal_lines, p->normal_lines);
+           wset_buffer (w, w->total_lines);
+         wset_left_col (w, p->left_col);
+         wset_top_line (w, p->top_line);
+         wset_total_cols (w, p->total_cols);
+         wset_total_lines (w, p->total_lines);
+         wset_normal_cols (w, p->normal_cols);
+         wset_normal_lines (w, p->normal_lines);
          w->hscroll = XFASTINT (p->hscroll);
          w->min_hscroll = XFASTINT (p->min_hscroll);
-         WSET (w, display_table, p->display_table);
-         WSET (w, left_margin_cols, p->left_margin_cols);
-         WSET (w, right_margin_cols, p->right_margin_cols);
-         WSET (w, left_fringe_width, p->left_fringe_width);
-         WSET (w, right_fringe_width, p->right_fringe_width);
+         wset_display_table (w, p->display_table);
+         wset_left_margin_cols (w, p->left_margin_cols);
+         wset_right_margin_cols (w, p->right_margin_cols);
+         wset_left_fringe_width (w, p->left_fringe_width);
+         wset_right_fringe_width (w, p->right_fringe_width);
          w->fringes_outside_margins = !NILP (p->fringes_outside_margins);
-         WSET (w, scroll_bar_width, p->scroll_bar_width);
-         WSET (w, vertical_scroll_bar_type, p->vertical_scroll_bar_type);
-         WSET (w, dedicated, p->dedicated);
-         WSET (w, combination_limit, p->combination_limit);
+         wset_scroll_bar_width (w, p->scroll_bar_width);
+         wset_vertical_scroll_bar_type (w, p->vertical_scroll_bar_type);
+         wset_dedicated (w, p->dedicated);
+         wset_combination_limit (w, p->combination_limit);
          /* Restore any window parameters that have been saved.
             Parameters that have not been saved are left alone.  */
          for (tem = p->window_parameters; CONSP (tem); tem = XCDR (tem))
@@ -5624,24 +5745,24 @@
          /* Reinstall the saved buffer and pointers into it.  */
          if (NILP (p->buffer))
            /* An internal window.  */
-           WSET (w, buffer, p->buffer);
+           wset_buffer (w, p->buffer);
          else if (!NILP (BVAR (XBUFFER (p->buffer), name)))
            /* If saved buffer is alive, install it.  */
            {
-             WSET (w, buffer, p->buffer);
-              w->start_at_line_beg = !NILP (p->start_at_line_beg);
-              set_marker_restricted (w->start, p->start, w->buffer);
-              set_marker_restricted (w->pointm, p->pointm,
-                                     w->buffer);
-              Fset_marker (BVAR (XBUFFER (w->buffer), mark),
-                           p->mark, w->buffer);
+             wset_buffer (w, p->buffer);
+             w->start_at_line_beg = !NILP (p->start_at_line_beg);
+             set_marker_restricted (w->start, p->start, w->buffer);
+             set_marker_restricted (w->pointm, p->pointm,
+                                    w->buffer);
+             Fset_marker (BVAR (XBUFFER (w->buffer), mark),
+                          p->mark, w->buffer);
 
-              /* As documented in Fcurrent_window_configuration, don't
-                 restore the location of point in the buffer which was
-                 current when the window configuration was recorded.  */
-              if (!EQ (p->buffer, new_current_buffer)
-                  && XBUFFER (p->buffer) == current_buffer)
-                Fgoto_char (w->pointm);
+             /* As documented in Fcurrent_window_configuration, don't
+                restore the location of point in the buffer which was
+                current when the window configuration was recorded.  */
+             if (!EQ (p->buffer, new_current_buffer)
+                 && XBUFFER (p->buffer) == current_buffer)
+               Fgoto_char (w->pointm);
             }
           else if (!NILP (w->buffer)
                    && !NILP (BVAR (XBUFFER (w->buffer), name)))
@@ -5662,7 +5783,8 @@
           else if (STRINGP (auto_buffer_name =
                             Fwindow_parameter (window, Qauto_buffer_name))
                    && SCHARS (auto_buffer_name) != 0
-                   && !NILP (WSET (w, buffer, Fget_buffer_create 
(auto_buffer_name))))
+                   && (wset_buffer (w, Fget_buffer_create (auto_buffer_name)),
+                       !NILP (w->buffer)))
            {
              set_marker_restricted (w->start,
                                     make_number (0), w->buffer);
@@ -5677,7 +5799,7 @@
              avoid showing an unimportant buffer and, if necessary, to
              recreate *scratch* in the course (part of Juanma's bs-show
              scenario from March 2011).  */
-             WSET (w, buffer, other_buffer_safely (Fcurrent_buffer ()));
+             wset_buffer (w, other_buffer_safely (Fcurrent_buffer ()));
              /* This will set the markers to beginning of visible
                 range.  */
              set_marker_restricted (w->start,
@@ -5689,7 +5811,7 @@
                /* Record this window as dead.  */
                dead_windows = Fcons (window, dead_windows);
              /* Make sure window is no more dedicated.  */
-             WSET (w, dedicated, Qnil);
+             wset_dedicated (w, Qnil);
            }
        }
 
@@ -5789,24 +5911,25 @@
     /* Delete WINDOW's siblings (we traverse postorderly).  */
     delete_all_child_windows (w->next);
 
-  WSET (w, total_lines, w->buffer);       /* See Fset_window_configuration for 
excuse.  */
+  /* See Fset_window_configuration for excuse.  */
+  wset_total_lines (w, w->buffer);
 
   if (!NILP (w->vchild))
     {
       delete_all_child_windows (w->vchild);
-      WSET (w, vchild, Qnil);
+      wset_vchild (w, Qnil);
     }
   else if (!NILP (w->hchild))
     {
       delete_all_child_windows (w->hchild);
-      WSET (w, hchild, Qnil);
+      wset_hchild (w, Qnil);
     }
   else if (!NILP (w->buffer))
     {
       unshow_buffer (w);
       unchain_marker (XMARKER (w->pointm));
       unchain_marker (XMARKER (w->start));
-      WSET (w, buffer, Qnil);
+      wset_buffer (w, Qnil);
     }
 
   Vwindow_list = Qnil;
@@ -5898,7 +6021,7 @@
       p = SAVED_WINDOW_N (vector, i);
       w = XWINDOW (window);
 
-      WSET (w, temslot, make_number (i)); i++;
+      wset_temslot (w, make_number (i)); i++;
       p->window = window;
       p->buffer = w->buffer;
       p->left_col = w->left_col;
@@ -6101,8 +6224,8 @@
   if (!EQ (w->left_margin_cols, left_width)
       || !EQ (w->right_margin_cols, right_width))
     {
-      WSET (w, left_margin_cols, left_width);
-      WSET (w, right_margin_cols, right_width);
+      wset_left_margin_cols (w, left_width);
+      wset_right_margin_cols (w, right_width);
 
       adjust_window_margins (w);
 
@@ -6163,14 +6286,14 @@
          || !EQ (w->right_fringe_width, right_width)
          || w->fringes_outside_margins != outside))
     {
-      WSET (w, left_fringe_width, left_width);
-      WSET (w, right_fringe_width, right_width);
+      wset_left_fringe_width (w, left_width);
+      wset_right_fringe_width (w, right_width);
       w->fringes_outside_margins = outside;
 
       adjust_window_margins (w);
 
       clear_glyph_matrix (w->current_matrix);
-      WSET (w, window_end_valid, Qnil);
+      wset_window_end_valid (w, Qnil);
 
       ++windows_or_buffers_changed;
       adjust_glyphs (XFRAME (WINDOW_FRAME (w)));
@@ -6235,13 +6358,13 @@
   if (!EQ (w->scroll_bar_width, width)
       || !EQ (w->vertical_scroll_bar_type, vertical_type))
     {
-      WSET (w, scroll_bar_width, width);
-      WSET (w, vertical_scroll_bar_type, vertical_type);
+      wset_scroll_bar_width (w, width);
+      wset_vertical_scroll_bar_type (w, vertical_type);
 
       adjust_window_margins (w);
 
       clear_glyph_matrix (w->current_matrix);
-      WSET (w, window_end_valid, Qnil);
+      wset_window_end_valid (w, Qnil);
 
       ++windows_or_buffers_changed;
       adjust_glyphs (XFRAME (WINDOW_FRAME (w)));

=== modified file 'src/window.h'
--- a/src/window.h      2012-08-16 07:58:24 +0000
+++ b/src/window.h      2012-08-18 01:42:52 +0000
@@ -22,6 +22,11 @@
 
 #include "dispextern.h"
 
+INLINE_HEADER_BEGIN
+#ifndef WINDOW_INLINE
+# define WINDOW_INLINE INLINE
+#endif
+
 extern Lisp_Object Qleft, Qright;
 
 /* Windows are allocated as if they were vectors, but then the
@@ -86,10 +91,6 @@
   int hpos, vpos;
 };
 
-/* Most code should use this macro to set Lisp fields in struct window.  */
-
-#define WSET(w, field, value) ((w)->field = (value))
-
 struct window
   {
     /* This is for Lisp; the terminal code does not refer to it.  */
@@ -348,6 +349,75 @@
     ptrdiff_t window_end_bytepos;
 };
 
+/* Most code should use these functions to set Lisp fields in struct
+   window.  */
+WINDOW_INLINE void
+wset_buffer (struct window *w, Lisp_Object val)
+{
+  w->buffer = val;
+}
+WINDOW_INLINE void
+wset_frame (struct window *w, Lisp_Object val)
+{
+  w->frame = val;
+}
+WINDOW_INLINE void
+wset_left_col (struct window *w, Lisp_Object val)
+{
+  w->left_col = val;
+}
+WINDOW_INLINE void
+wset_next (struct window *w, Lisp_Object val)
+{
+  w->next = val;
+}
+WINDOW_INLINE void
+wset_prev (struct window *w, Lisp_Object val)
+{
+  w->prev = val;
+}
+WINDOW_INLINE void
+wset_redisplay_end_trigger (struct window *w, Lisp_Object val)
+{
+  w->redisplay_end_trigger = val;
+}
+WINDOW_INLINE void
+wset_top_line (struct window *w, Lisp_Object val)
+{
+  w->top_line = val;
+}
+WINDOW_INLINE void
+wset_total_cols (struct window *w, Lisp_Object val)
+{
+  w->total_cols = val;
+}
+WINDOW_INLINE void
+wset_total_lines (struct window *w, Lisp_Object val)
+{
+  w->total_lines = val;
+}
+WINDOW_INLINE void
+wset_vertical_scroll_bar (struct window *w, Lisp_Object val)
+{
+  w->vertical_scroll_bar = val;
+}
+WINDOW_INLINE void
+wset_window_end_pos (struct window *w, Lisp_Object val)
+{
+  w->window_end_pos = val;
+}
+WINDOW_INLINE void
+wset_window_end_valid (struct window *w, Lisp_Object val)
+{
+  w->window_end_valid = val;
+}
+WINDOW_INLINE void
+wset_window_end_vpos (struct window *w, Lisp_Object val)
+{
+  w->window_end_vpos = val;
+}
+
+
 /* 1 if W is a minibuffer window.  */
 
 #define MINI_WINDOW_P(W)       ((W)->mini)
@@ -916,4 +986,6 @@
 extern void syms_of_window (void);
 extern void keys_of_window (void);
 
+INLINE_HEADER_END
+
 #endif /* not WINDOW_H_INCLUDED */

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2012-08-17 21:52:15 +0000
+++ b/src/xdisp.c       2012-08-18 01:42:52 +0000
@@ -365,6 +365,28 @@
 static Lisp_Object Qmargin, Qpointer;
 static Lisp_Object Qline_height;
 
+/* These setters are used only in this file, so they can be private.  */
+static inline void
+wset_base_line_number (struct window *w, Lisp_Object val)
+{
+  w->base_line_number = val;
+}
+static inline void
+wset_base_line_pos (struct window *w, Lisp_Object val)
+{
+  w->base_line_pos = val;
+}
+static inline void
+wset_column_number_displayed (struct window *w, Lisp_Object val)
+{
+  w->column_number_displayed = val;
+}
+static inline void
+wset_region_showing (struct window *w, Lisp_Object val)
+{
+  w->region_showing = val;
+}
+
 #ifdef HAVE_WINDOW_SYSTEM
 
 /* Test if overflow newline into fringe.  Called with iterator IT
@@ -7981,7 +8003,7 @@
 
   /* Since we are *trying* to run these functions, don't try to run
      them again, even if they get an error.  */
-  WSET (it->w, redisplay_end_trigger, Qnil);
+  wset_redisplay_end_trigger (it->w, Qnil);
   Frun_hook_with_args (3, args);
 
   /* Notice if it changed the face of the character we are on.  */
@@ -9969,7 +9991,7 @@
   set_buffer_internal_1 (XBUFFER (buffer));
   if (w)
     {
-      WSET (w, buffer, buffer);
+      wset_buffer (w, buffer);
       set_marker_both (w->pointm, buffer, BEG, BEG_BYTE);
     }
 
@@ -10054,7 +10076,7 @@
       charpos = AREF (vector, 5);
       bytepos = AREF (vector, 6);
 
-      WSET (w, buffer, buffer);
+      wset_buffer (w, buffer);
       set_marker_both (w->pointm, buffer,
                       XFASTINT (charpos), XFASTINT (bytepos));
     }
@@ -13266,12 +13288,12 @@
              if ((it.glyph_row - 1)->displays_text_p)
                {
                  if (XFASTINT (w->window_end_vpos) < this_line_vpos)
-                   WSET (w, window_end_vpos, make_number (this_line_vpos));
+                   wset_window_end_vpos (w, make_number (this_line_vpos));
                }
              else if (XFASTINT (w->window_end_vpos) == this_line_vpos
                       && this_line_vpos > 0)
-               WSET (w, window_end_vpos, make_number (this_line_vpos - 1));
-             WSET (w, window_end_valid, Qnil);
+               wset_window_end_vpos (w, make_number (this_line_vpos - 1));
+             wset_window_end_valid (w, Qnil);
 
              /* Update hint: No need to try to scroll in update_window.  */
              w->desired_matrix->no_scrolling_p = 1;
@@ -13737,7 +13759,7 @@
 
   if (accurate_p)
     {
-      WSET (w, window_end_valid, w->buffer);
+      wset_window_end_valid (w, w->buffer);
       w->update_mode_line = 0;
     }
 }
@@ -14845,7 +14867,7 @@
       if (!just_this_one_p
          || current_buffer->clip_changed
          || BEG_UNCHANGED < CHARPOS (startp))
-       WSET (w, base_line_number, Qnil);
+       wset_base_line_number (w, Qnil);
 
       /* If cursor ends up on a partially visible line,
         treat that as being off the bottom of the screen.  */
@@ -15470,7 +15492,7 @@
       if (XMARKER (w->start)->buffer == current_buffer)
        compute_window_start_on_continuation_line (w);
 
-      WSET (w, window_end_valid, Qnil);
+      wset_window_end_valid (w, Qnil);
     }
 
   /* Some sanity checks.  */
@@ -15581,11 +15603,11 @@
 
       w->force_start = 0;
       w->vscroll = 0;
-      WSET (w, window_end_valid, Qnil);
+      wset_window_end_valid (w, Qnil);
 
       /* Forget any recorded base line for line number display.  */
       if (!buffer_unchanged_p)
-       WSET (w, base_line_number, Qnil);
+       wset_base_line_number (w, Qnil);
 
       /* Redisplay the mode line.  Select the buffer properly for that.
         Also, run the hook window-scroll-functions
@@ -15799,7 +15821,7 @@
              || current_buffer->clip_changed
              || BEG_UNCHANGED < CHARPOS (startp))
            /* Forget any recorded base line for line number display.  */
-           WSET (w, base_line_number, Qnil);
+           wset_base_line_number (w, Qnil);
 
          if (!cursor_row_fully_visible_p (w, 1, 0))
            {
@@ -15870,7 +15892,7 @@
 
   /* Forget any previously recorded base line for line number display.  */
   if (!buffer_unchanged_p)
-    WSET (w, base_line_number, Qnil);
+    wset_base_line_number (w, Qnil);
 
   /* Determine the window start relative to point.  */
   init_iterator (&it, w, PT, PT_BYTE, NULL, DEFAULT_FACE_ID);
@@ -16128,8 +16150,8 @@
   if (!line_number_displayed
       && !BUFFERP (w->base_line_pos))
     {
-      WSET (w, base_line_pos, Qnil);
-      WSET (w, base_line_number, Qnil);
+      wset_base_line_pos (w, Qnil);
+      wset_base_line_number (w, Qnil);
     }
 
  finish_menu_bars:
@@ -16306,10 +16328,10 @@
       eassert (MATRIX_ROW_DISPLAYS_TEXT_P (last_text_row));
       w->window_end_bytepos
        = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row);
-      WSET (w, window_end_pos,
-           make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)));
-      WSET (w, window_end_vpos,
-           make_number (MATRIX_ROW_VPOS (last_text_row, w->desired_matrix)));
+      wset_window_end_pos
+       (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)));
+      wset_window_end_vpos
+       (w, make_number (MATRIX_ROW_VPOS (last_text_row, w->desired_matrix)));
       eassert
        (MATRIX_ROW (w->desired_matrix,
                     XFASTINT (w->window_end_vpos))->displays_text_p);
@@ -16317,12 +16339,12 @@
   else
     {
       w->window_end_bytepos = Z_BYTE - ZV_BYTE;
-      WSET (w, window_end_pos, make_number (Z - ZV));
-      WSET (w, window_end_vpos, make_number (0));
+      wset_window_end_pos (w, make_number (Z - ZV));
+      wset_window_end_vpos (w, make_number (0));
     }
 
   /* But that is not valid info until redisplay finishes.  */
-  WSET (w, window_end_valid, Qnil);
+  wset_window_end_valid (w, Qnil);
   return 1;
 }
 
@@ -16546,28 +16568,31 @@
        {
          w->window_end_bytepos
            = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_reused_text_row);
-         WSET (w, window_end_pos,
-               make_number (Z - MATRIX_ROW_END_CHARPOS 
(last_reused_text_row)));
-         WSET (w, window_end_vpos,
-               make_number (MATRIX_ROW_VPOS (last_reused_text_row, 
w->current_matrix)));
+         wset_window_end_pos
+           (w, make_number (Z
+                            - MATRIX_ROW_END_CHARPOS (last_reused_text_row)));
+         wset_window_end_vpos
+           (w, make_number (MATRIX_ROW_VPOS (last_reused_text_row,
+                                             w->current_matrix)));
        }
       else if (last_text_row)
        {
          w->window_end_bytepos
            = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row);
-         WSET (w, window_end_pos,
-               make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)));
-         WSET (w, window_end_vpos,
-               make_number (MATRIX_ROW_VPOS (last_text_row, 
w->desired_matrix)));
+         wset_window_end_pos
+           (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)));
+         wset_window_end_vpos
+           (w, make_number (MATRIX_ROW_VPOS (last_text_row,
+                                             w->desired_matrix)));
        }
       else
        {
          /* This window must be completely empty.  */
          w->window_end_bytepos = Z_BYTE - ZV_BYTE;
-         WSET (w, window_end_pos, make_number (Z - ZV));
-         WSET (w, window_end_vpos, make_number (0));
+         wset_window_end_pos (w, make_number (Z - ZV));
+         wset_window_end_vpos (w, make_number (0));
        }
-      WSET (w, window_end_valid, Qnil);
+      wset_window_end_valid (w, Qnil);
 
       /* Update hint: don't try scrolling again in update_window.  */
       w->desired_matrix->no_scrolling_p = 1;
@@ -16748,18 +16773,19 @@
        {
          w->window_end_bytepos
            = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row);
-         WSET (w, window_end_pos,
-               make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)));
-         WSET (w, window_end_vpos,
-               make_number (MATRIX_ROW_VPOS (last_text_row, 
w->desired_matrix)));
+         wset_window_end_pos
+           (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)));
+         wset_window_end_vpos
+           (w, make_number (MATRIX_ROW_VPOS (last_text_row,
+                                             w->desired_matrix)));
        }
       else
        {
-         WSET (w, window_end_vpos,
-               make_number (XFASTINT (w->window_end_vpos) - nrows_scrolled));
+         wset_window_end_vpos
+           (w, make_number (XFASTINT (w->window_end_vpos) - nrows_scrolled));
        }
 
-      WSET (w, window_end_valid, Qnil);
+      wset_window_end_valid (w, Qnil);
       w->desired_matrix->no_scrolling_p = 1;
 
 #ifdef GLYPH_DEBUG
@@ -17331,8 +17357,8 @@
        {
          /* We have to compute the window end anew since text
             could have been added/removed after it.  */
-         WSET (w, window_end_pos,
-               make_number (Z - MATRIX_ROW_END_CHARPOS (row)));
+         wset_window_end_pos
+           (w, make_number (Z - MATRIX_ROW_END_CHARPOS (row)));
          w->window_end_bytepos
            = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row);
 
@@ -17766,21 +17792,22 @@
                                           first_unchanged_at_end_row);
       eassert (row && MATRIX_ROW_DISPLAYS_TEXT_P (row));
 
-      WSET (w, window_end_pos, make_number (Z - MATRIX_ROW_END_CHARPOS (row)));
+      wset_window_end_pos (w, make_number (Z - MATRIX_ROW_END_CHARPOS (row)));
       w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row);
-      WSET (w, window_end_vpos,
-           make_number (MATRIX_ROW_VPOS (row, w->current_matrix)));
+      wset_window_end_vpos
+       (w, make_number (MATRIX_ROW_VPOS (row, w->current_matrix)));
       eassert (w->window_end_bytepos >= 0);
       IF_DEBUG (debug_method_add (w, "A"));
     }
   else if (last_text_row_at_end)
     {
-      WSET (w, window_end_pos,
-           make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row_at_end)));
+      wset_window_end_pos
+       (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row_at_end)));
       w->window_end_bytepos
        = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row_at_end);
-      WSET (w, window_end_vpos,
-           make_number (MATRIX_ROW_VPOS (last_text_row_at_end, 
desired_matrix)));
+      wset_window_end_vpos
+       (w, make_number (MATRIX_ROW_VPOS (last_text_row_at_end,
+                                         desired_matrix)));
       eassert (w->window_end_bytepos >= 0);
       IF_DEBUG (debug_method_add (w, "B"));
     }
@@ -17789,12 +17816,12 @@
       /* We have displayed either to the end of the window or at the
         end of the window, i.e. the last row with text is to be found
         in the desired matrix.  */
-      WSET (w, window_end_pos,
-           make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)));
+      wset_window_end_pos
+       (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)));
       w->window_end_bytepos
        = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row);
-      WSET (w, window_end_vpos,
-           make_number (MATRIX_ROW_VPOS (last_text_row, desired_matrix)));
+      wset_window_end_vpos
+       (w, make_number (MATRIX_ROW_VPOS (last_text_row, desired_matrix)));
       eassert (w->window_end_bytepos >= 0);
     }
   else if (first_unchanged_at_end_row == NULL
@@ -17822,8 +17849,8 @@
        }
 
       eassert (row != NULL);
-      WSET (w, window_end_vpos, make_number (vpos + 1));
-      WSET (w, window_end_pos, make_number (Z - MATRIX_ROW_END_CHARPOS (row)));
+      wset_window_end_vpos (w, make_number (vpos + 1));
+      wset_window_end_pos (w, make_number (Z - MATRIX_ROW_END_CHARPOS (row)));
       w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row);
       eassert (w->window_end_bytepos >= 0);
       IF_DEBUG (debug_method_add (w, "C"));
@@ -17835,7 +17862,7 @@
            debug_end_vpos = XFASTINT (w->window_end_vpos));
 
   /* Record that display has not been completed.  */
-  WSET (w, window_end_valid, Qnil);
+  wset_window_end_valid (w, Qnil);
   w->desired_matrix->no_scrolling_p = 1;
   return 3;
 
@@ -19248,7 +19275,7 @@
     }
 
   /* Is IT->w showing the region?  */
-  WSET (it->w, region_showing, it->region_beg_charpos > 0 ? Qt : Qnil);
+  wset_region_showing (it->w, it->region_beg_charpos > 0 ? Qt : Qnil);
 
   /* Clear the result glyph row and enable it.  */
   prepare_desired_row (row);
@@ -20252,7 +20279,7 @@
 
   /* These will be set while the mode line specs are processed.  */
   line_number_displayed = 0;
-  WSET (w, column_number_displayed, Qnil);
+  wset_column_number_displayed (w, Qnil);
 
   if (WINDOW_WANTS_MODELINE_P (w))
     {
@@ -21388,7 +21415,7 @@
       else
        {
          ptrdiff_t col = current_column ();
-         WSET (w, column_number_displayed, make_number (col));
+         wset_column_number_displayed (w, make_number (col));
          pint2str (decode_mode_spec_buf, field_width, col);
          return decode_mode_spec_buf;
        }
@@ -21451,14 +21478,14 @@
          goto no_value;
        /* But do forget it, if the window shows a different buffer now.  */
        else if (BUFFERP (w->base_line_pos))
-         WSET (w, base_line_pos, Qnil);
+         wset_base_line_pos (w, Qnil);
 
        /* If the buffer is very big, don't waste time.  */
        if (INTEGERP (Vline_number_display_limit)
            && BUF_ZV (b) - BUF_BEGV (b) > XINT (Vline_number_display_limit))
          {
-           WSET (w, base_line_pos, Qnil);
-           WSET (w, base_line_number, Qnil);
+           wset_base_line_pos (w, Qnil);
+           wset_base_line_number (w, Qnil);
            goto no_value;
          }
 
@@ -21490,8 +21517,8 @@
           go back past it.  */
        if (startpos == BUF_BEGV (b))
          {
-           WSET (w, base_line_number, make_number (topline));
-           WSET (w, base_line_pos, make_number (BUF_BEGV (b)));
+           wset_base_line_number (w, make_number (topline));
+           wset_base_line_pos (w, make_number (BUF_BEGV (b)));
          }
        else if (nlines < height + 25 || nlines > height * 3 + 50
                 || linepos == BUF_BEGV (b))
@@ -21517,13 +21544,13 @@
               give up on line numbers for this window.  */
            if (position == limit_byte && limit == startpos - distance)
              {
-               WSET (w, base_line_pos, w->buffer);
-               WSET (w, base_line_number, Qnil);
+               wset_base_line_pos (w, w->buffer);
+               wset_base_line_number (w, Qnil);
                goto no_value;
              }
 
-           WSET (w, base_line_number, make_number (topline - nlines));
-           WSET (w, base_line_pos, make_number (BYTE_TO_CHAR (position)));
+           wset_base_line_number (w, make_number (topline - nlines));
+           wset_base_line_pos (w, make_number (BYTE_TO_CHAR (position)));
          }
 
        /* Now count lines from the start pos to point.  */
@@ -29288,12 +29315,13 @@
 
       echo_area_window = minibuf_window;
 
-      WSET (r, top_line, make_number (FRAME_TOP_MARGIN (f)));
-      WSET (r, total_lines, make_number (FRAME_LINES (f) - 1 - 
FRAME_TOP_MARGIN (f)));
-      WSET (r, total_cols, make_number (FRAME_COLS (f)));
-      WSET (m, top_line, make_number (FRAME_LINES (f) - 1));
-      WSET (m, total_lines, make_number (1));
-      WSET (m, total_cols, make_number (FRAME_COLS (f)));
+      wset_top_line (r, make_number (FRAME_TOP_MARGIN (f)));
+      wset_total_lines
+       (r, make_number (FRAME_LINES (f) - 1 - FRAME_TOP_MARGIN (f)));
+      wset_total_cols (r, make_number (FRAME_COLS (f)));
+      wset_top_line (m, make_number (FRAME_LINES (f) - 1));
+      wset_total_lines (m, make_number (1));
+      wset_total_cols (m, make_number (FRAME_COLS (f)));
 
       scratch_glyph_row.glyphs[TEXT_AREA] = scratch_glyphs;
       scratch_glyph_row.glyphs[TEXT_AREA + 1]

=== modified file 'src/xfns.c'
--- a/src/xfns.c        2012-08-17 23:38:43 +0000
+++ b/src/xfns.c        2012-08-18 01:42:52 +0000
@@ -5064,20 +5064,20 @@
 
   /* Set up the frame's root window.  */
   w = XWINDOW (FRAME_ROOT_WINDOW (f));
-  WSET (w, left_col, make_number (0));
-  WSET (w, top_line, make_number (0));
+  wset_left_col (w, make_number (0));
+  wset_top_line (w, make_number (0));
 
   if (CONSP (Vx_max_tooltip_size)
       && RANGED_INTEGERP (1, XCAR (Vx_max_tooltip_size), INT_MAX)
       && RANGED_INTEGERP (1, XCDR (Vx_max_tooltip_size), INT_MAX))
     {
-      WSET (w, total_cols, XCAR (Vx_max_tooltip_size));
-      WSET (w, total_lines, XCDR (Vx_max_tooltip_size));
+      wset_total_cols (w, XCAR (Vx_max_tooltip_size));
+      wset_total_lines (w, XCDR (Vx_max_tooltip_size));
     }
   else
     {
-      WSET (w, total_cols, make_number (80));
-      WSET (w, total_lines, make_number (40));
+      wset_total_cols (w, make_number (80));
+      wset_total_lines (w, make_number (40));
     }
 
   FRAME_TOTAL_COLS (f) = XINT (w->total_cols);
@@ -5147,7 +5147,7 @@
       /* w->total_cols and FRAME_TOTAL_COLS want the width in columns,
         not in pixels.  */
       width /= WINDOW_FRAME_COLUMN_WIDTH (w);
-      WSET (w, total_cols, make_number (width));
+      wset_total_cols (w, make_number (width));
       FRAME_TOTAL_COLS (f) = width;
       adjust_glyphs (f);
       clear_glyph_matrix (w->desired_matrix);

=== modified file 'src/xterm.c'
--- a/src/xterm.c       2012-08-17 23:38:43 +0000
+++ b/src/xterm.c       2012-08-18 01:42:52 +0000
@@ -5181,7 +5181,7 @@
 #endif
 
   /* Dissociate this scroll bar from its window.  */
-  WSET (XWINDOW (bar->window), vertical_scroll_bar, Qnil);
+  wset_vertical_scroll_bar (XWINDOW (bar->window), Qnil);
 
   UNBLOCK_INPUT;
 }
@@ -5395,7 +5395,7 @@
 #endif /* not USE_TOOLKIT_SCROLL_BARS */
 
   XSETVECTOR (barobj, bar);
-  WSET (w, vertical_scroll_bar, barobj);
+  wset_vertical_scroll_bar (w, barobj);
 }
 
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]