emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r109489: Drop WGET and revert read ac


From: Dmitry Antipov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109489: Drop WGET and revert read access to Lisp_Objects slots of struct window.
Date: Tue, 07 Aug 2012 11:33:18 +0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109489
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Tue 2012-08-07 11:33:18 +0400
message:
  Drop WGET and revert read access to Lisp_Objects slots of struct window.
  * window.h (WGET): Remove.
  (struct window): Do not use INTERNAL_FIELD.
  * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
  * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
  * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
  * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
  * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
  Adjust users.
modified:
  src/ChangeLog
  src/alloc.c
  src/buffer.c
  src/composite.c
  src/dispextern.h
  src/dispnew.c
  src/editfns.c
  src/fileio.c
  src/font.c
  src/fontset.c
  src/frame.c
  src/frame.h
  src/fringe.c
  src/indent.c
  src/insdel.c
  src/keyboard.c
  src/keymap.c
  src/lisp.h
  src/minibuf.c
  src/msdos.c
  src/nsfns.m
  src/nsmenu.m
  src/nsterm.m
  src/print.c
  src/textprop.c
  src/w32fns.c
  src/w32menu.c
  src/w32term.c
  src/window.c
  src/window.h
  src/xdisp.c
  src/xfaces.c
  src/xfns.c
  src/xmenu.c
  src/xterm.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-08-07 07:02:04 +0000
+++ b/src/ChangeLog     2012-08-07 07:33:18 +0000
@@ -1,3 +1,15 @@
+2012-08-07  Dmitry Antipov  <address@hidden>
+
+       Drop WGET and revert read access to Lisp_Objects slots of struct window.
+       * window.h (WGET): Remove.
+       (struct window): Do not use INTERNAL_FIELD.
+       * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
+       * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
+       * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
+       * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
+       * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
+       Adjust users.
+
 2012-08-07  Chong Yidong  <address@hidden>
 
        * window.c (Fwindow_edges, Fwindow_pixel_edges)

=== modified file 'src/alloc.c'
--- a/src/alloc.c       2012-08-06 16:55:46 +0000
+++ b/src/alloc.c       2012-08-07 07:33:18 +0000
@@ -6014,7 +6014,7 @@
              /* Mark glyphs for leaf windows.  Marking window
                 matrices is sufficient because frame matrices
                 use the same glyph memory.  */
-             if (NILP (WGET (w, hchild)) && NILP (WGET (w, vchild))
+             if (NILP (w->hchild) && NILP (w->vchild)
                  && w->current_matrix)
                {
                  mark_glyph_matrix (w->current_matrix);

=== modified file 'src/buffer.c'
--- a/src/buffer.c      2012-08-07 05:29:25 +0000
+++ b/src/buffer.c      2012-08-07 07:33:18 +0000
@@ -1560,7 +1560,7 @@
      since anything can happen within do_yes_or_no_p.  */
 
   /* Don't kill the minibuffer now current.  */
-  if (EQ (buffer, WGET (XWINDOW (minibuf_window), buffer)))
+  if (EQ (buffer, XWINDOW (minibuf_window)->buffer))
     return Qnil;
 
   /* When we kill an ordinary buffer which shares it's buffer text
@@ -1611,7 +1611,7 @@
   /* If the buffer now current is shown in the minibuffer and our buffer
      is the sole other buffer give up.  */
   XSETBUFFER (tem, current_buffer);
-  if (EQ (tem, WGET (XWINDOW (minibuf_window), buffer))
+  if (EQ (tem, XWINDOW (minibuf_window)->buffer)
       && EQ (buffer, Fother_buffer (buffer, Qnil, Qnil)))
     return Qnil;
 
@@ -2193,13 +2193,13 @@
     while (NILP (Fmemq (w, ws)))
       {
        ws = Fcons (w, ws);
-       if (MARKERP (WGET (XWINDOW (w), pointm))
-           && (EQ (WGET (XWINDOW (w), buffer), buf1)
-               || EQ (WGET (XWINDOW (w), buffer), buf2)))
-         Fset_marker (WGET (XWINDOW (w), pointm),
+       if (MARKERP (XWINDOW (w)->pointm)
+           && (EQ (XWINDOW (w)->buffer, buf1)
+               || EQ (XWINDOW (w)->buffer, buf2)))
+         Fset_marker (XWINDOW (w)->pointm,
                       make_number
-                      (BUF_BEGV (XBUFFER (WGET (XWINDOW (w), buffer)))),
-                      WGET (XWINDOW (w), buffer));
+                      (BUF_BEGV (XBUFFER (XWINDOW (w)->buffer))),
+                      XWINDOW (w)->buffer);
        w = Fnext_window (w, Qt, Qt);
       }
   }
@@ -3675,7 +3675,7 @@
 
   /* If this is a buffer not in the selected window,
      we must do other windows.  */
-  if (buf != XBUFFER (WGET (XWINDOW (selected_window), buffer)))
+  if (buf != XBUFFER (XWINDOW (selected_window)->buffer))
     windows_or_buffers_changed = 1;
   /* If multiple windows show this buffer, we must do other windows.  */
   else if (buffer_shared > 1)

=== modified file 'src/composite.c'
--- a/src/composite.c   2012-08-06 10:24:26 +0000
+++ b/src/composite.c   2012-08-07 07:33:18 +0000
@@ -909,7 +909,7 @@
 autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos, 
ptrdiff_t limit, struct window *win, struct face *face, Lisp_Object string)
 {
   ptrdiff_t count = SPECPDL_INDEX ();
-  FRAME_PTR f = XFRAME (WGET (win, frame));
+  FRAME_PTR f = XFRAME (win->frame);
   Lisp_Object pos = make_number (charpos);
   ptrdiff_t to;
   ptrdiff_t pt = PT, pt_byte = PT_BYTE;
@@ -945,7 +945,7 @@
     }
   else
 #endif /* not HAVE_WINDOW_SYSTEM */
-    font_object = WGET (win, frame);
+    font_object = win->frame;
   lgstring = Fcomposition_get_gstring (pos, make_number (to), font_object,
                                       string);
   if (NILP (LGSTRING_ID (lgstring)))

=== modified file 'src/dispextern.h'
--- a/src/dispextern.h  2012-08-06 10:24:26 +0000
+++ b/src/dispextern.h  2012-08-07 07:33:18 +0000
@@ -1379,7 +1379,7 @@
       ? current_mode_line_height                               \
       : (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix)         \
         ? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix)        \
-        : estimate_mode_line_height (XFRAME (WGET (W, frame)), \
+        : estimate_mode_line_height (XFRAME (W->frame),        \
                                      CURRENT_MODE_LINE_FACE_ID (W))))
 
 /* Return the current height of the header line of window W.  If not
@@ -1392,7 +1392,7 @@
        ? current_header_line_height                            \
        : (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix)      \
          ? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix)     \
-         : estimate_mode_line_height (XFRAME (WGET (W, frame)),\
+         : estimate_mode_line_height (XFRAME (W->frame),\
                                       HEADER_LINE_FACE_ID)))
 
 /* Return the height of the desired mode line of window W.  */
@@ -1411,8 +1411,8 @@
      (!MINI_WINDOW_P ((W))                                             \
       && !(W)->pseudo_window_p                                         \
       && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W))))          \
-      && BUFFERP (WGET (W, buffer))                                    \
-      && !NILP (BVAR (XBUFFER (WGET (W, buffer)), mode_line_format))   \
+      && BUFFERP (W->buffer)                                   \
+      && !NILP (BVAR (XBUFFER (W->buffer), mode_line_format))  \
       && WINDOW_TOTAL_LINES (W) > 1)
 
 /* Value is non-zero if window W wants a header line.  */
@@ -1421,10 +1421,10 @@
      (!MINI_WINDOW_P ((W))                                             \
       && !(W)->pseudo_window_p                                         \
       && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W))))          \
-      && BUFFERP (WGET (W, buffer))                                    \
-      && !NILP (BVAR (XBUFFER (WGET (W, buffer)), header_line_format)) \
+      && BUFFERP (W->buffer)                                   \
+      && !NILP (BVAR (XBUFFER (W->buffer), header_line_format))        \
       && WINDOW_TOTAL_LINES (W) > 1                                    \
-      + !NILP (BVAR (XBUFFER (WGET (W, buffer)), mode_line_format)))
+      + !NILP (BVAR (XBUFFER (W->buffer), mode_line_format)))
 
 
 /* Return proper value to be used as baseline offset of font that has

=== modified file 'src/dispnew.c'
--- a/src/dispnew.c     2012-08-07 05:29:25 +0000
+++ b/src/dispnew.c     2012-08-07 07:33:18 +0000
@@ -245,9 +245,9 @@
            "%"pMu": window %p (`%s')%s\n%s",
            history_tick++,
            w,
-           ((BUFFERP (WGET (w, buffer))
-             && STRINGP (BVAR (XBUFFER (WGET (w, buffer)), name)))
-            ? SSDATA (BVAR (XBUFFER (WGET (w, buffer)), name))
+           ((BUFFERP (w->buffer)
+             && STRINGP (BVAR (XBUFFER (w->buffer), name)))
+            ? SSDATA (BVAR (XBUFFER (w->buffer), name))
             : "???"),
            paused_p ? " ***paused***" : "",
            msg);
@@ -385,7 +385,7 @@
 
   if (NUMBERP (margin))
     {
-      int width = XFASTINT (WGET (w, total_cols));
+      int width = XFASTINT (w->total_cols);
       double d = max (0, XFLOATINT (margin));
       d = min (width / 2 - 1, d);
       n = (int) ((double) total_glyphs / width * d);
@@ -455,8 +455,8 @@
      the matrix means preventing redisplay.  */
   if (matrix->pool == NULL)
     {
-      left = margin_glyphs_to_reserve (w, dim.width, WGET (w, 
left_margin_cols));
-      right = margin_glyphs_to_reserve (w, dim.width, WGET (w, 
right_margin_cols));
+      left = margin_glyphs_to_reserve (w, dim.width, w->left_margin_cols);
+      right = margin_glyphs_to_reserve (w, dim.width, w->right_margin_cols);
       eassert (left >= 0 && right >= 0);
       marginal_areas_changed_p = (left != matrix->left_margin_glyphs
                                  || right != matrix->right_margin_glyphs);
@@ -495,9 +495,9 @@
       if (w)
        {
          left = margin_glyphs_to_reserve (w, dim.width,
-                                          WGET (w, left_margin_cols));
+                                          w->left_margin_cols);
          right = margin_glyphs_to_reserve (w, dim.width,
-                                           WGET (w, right_margin_cols));
+                                           w->right_margin_cols);
        }
       else
        left = right = 0;
@@ -620,8 +620,8 @@
 
              /* Window end is invalid, if inside of the rows that
                 are invalidated below.  */
-             if (INTEGERP (WGET (w, window_end_vpos))
-                 && XFASTINT (WGET (w, window_end_vpos)) >= i)
+             if (INTEGERP (w->window_end_vpos)
+                 && XFASTINT (w->window_end_vpos) >= i)
                WSET (w, window_end_valid, Qnil);
 
              while (i < matrix->nrows)
@@ -862,15 +862,15 @@
 {
   while (w)
     {
-      if (!NILP (WGET (w, hchild)))
+      if (!NILP (w->hchild))
        {
-         eassert (WINDOWP (WGET (w, hchild)));
-         clear_window_matrices (XWINDOW (WGET (w, hchild)), desired_p);
+         eassert (WINDOWP (w->hchild));
+         clear_window_matrices (XWINDOW (w->hchild), desired_p);
        }
-      else if (!NILP (WGET (w, vchild)))
+      else if (!NILP (w->vchild))
        {
-         eassert (WINDOWP (WGET (w, vchild)));
-         clear_window_matrices (XWINDOW (WGET (w, vchild)), desired_p);
+         eassert (WINDOWP (w->vchild));
+         clear_window_matrices (XWINDOW (w->vchild), desired_p);
        }
       else
        {
@@ -883,7 +883,7 @@
            }
        }
 
-      w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
+      w = NILP (w->next) ? 0 : XWINDOW (w->next);
     }
 }
 
@@ -947,7 +947,7 @@
   clear_glyph_row (row);
   row->y = y;
   row->ascent = row->phys_ascent = 0;
-  row->height = row->phys_height = FRAME_LINE_HEIGHT (XFRAME (WGET (w, 
frame)));
+  row->height = row->phys_height = FRAME_LINE_HEIGHT (XFRAME (w->frame));
   row->visible_height = row->height;
 
   if (row->y < min_y)
@@ -1493,7 +1493,7 @@
   struct glyph_row *row = matrix->rows;
   struct glyph_row *last_text_row = NULL;
   struct buffer *saved = current_buffer;
-  struct buffer *buffer = XBUFFER (WGET (w, buffer));
+  struct buffer *buffer = XBUFFER (w->buffer);
   int c;
 
   /* This can sometimes happen for a fresh window.  */
@@ -1656,8 +1656,8 @@
      points to the mini-buffer window, if any, which is arranged
      vertically below other windows.  */
   in_horz_combination_p
-    = (!NILP (WGET (XWINDOW (window), parent))
-       && !NILP (WGET (XWINDOW (WGET (XWINDOW (window), parent)), hchild)));
+    = (!NILP (XWINDOW (window)->parent)
+       && !NILP (XWINDOW (XWINDOW (window)->parent)->hchild));
 
   /* For WINDOW and all windows on the same level.  */
   do
@@ -1666,12 +1666,12 @@
 
       /* Get the dimension of the window sub-matrix for W, depending
         on whether this is a combination or a leaf window.  */
-      if (!NILP (WGET (w, hchild)))
-       dim = allocate_matrices_for_frame_redisplay (WGET (w, hchild), x, y,
+      if (!NILP (w->hchild))
+       dim = allocate_matrices_for_frame_redisplay (w->hchild, x, y,
                                                     dim_only_p,
                                                     window_change_flags);
-      else if (!NILP (WGET (w, vchild)))
-       dim = allocate_matrices_for_frame_redisplay (WGET (w, vchild), x, y,
+      else if (!NILP (w->vchild))
+       dim = allocate_matrices_for_frame_redisplay (w->vchild, x, y,
                                                     dim_only_p,
                                                     window_change_flags);
       else
@@ -1695,10 +1695,10 @@
              || dim.width != w->desired_matrix->matrix_w
              || dim.height != w->desired_matrix->matrix_h
              || (margin_glyphs_to_reserve (w, dim.width,
-                                           WGET (w, left_margin_cols))
+                                           w->left_margin_cols)
                  != w->desired_matrix->left_margin_glyphs)
              || (margin_glyphs_to_reserve (w, dim.width,
-                                           WGET (w, right_margin_cols))
+                                           w->right_margin_cols)
                  != w->desired_matrix->right_margin_glyphs))
            *window_change_flags |= CHANGED_LEAF_MATRIX;
 
@@ -1727,7 +1727,7 @@
       hmax = max (hmax, dim.height);
 
       /* Next window on same level.  */
-      window = WGET (w, next);
+      window = w->next;
     }
   while (!NILP (window));
 
@@ -1758,7 +1758,7 @@
 required_matrix_height (struct window *w)
 {
 #ifdef HAVE_WINDOW_SYSTEM
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
 
   if (FRAME_WINDOW_P (f))
     {
@@ -1784,7 +1784,7 @@
 required_matrix_width (struct window *w)
 {
 #ifdef HAVE_WINDOW_SYSTEM
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   if (FRAME_WINDOW_P (f))
     {
       int ch_width = FRAME_SMALLEST_CHAR_WIDTH (f);
@@ -1801,7 +1801,7 @@
     }
 #endif /* HAVE_WINDOW_SYSTEM */
 
-  return XINT (WGET (w, total_cols));
+  return XINT (w->total_cols);
 }
 
 
@@ -1813,10 +1813,10 @@
 {
   while (w)
     {
-      if (!NILP (WGET (w, vchild)))
-       allocate_matrices_for_window_redisplay (XWINDOW (WGET (w, vchild)));
-      else if (!NILP (WGET (w, hchild)))
-       allocate_matrices_for_window_redisplay (XWINDOW (WGET (w, hchild)));
+      if (!NILP (w->vchild))
+       allocate_matrices_for_window_redisplay (XWINDOW (w->vchild));
+      else if (!NILP (w->hchild))
+       allocate_matrices_for_window_redisplay (XWINDOW (w->hchild));
       else
        {
          /* W is a leaf window.  */
@@ -1835,7 +1835,7 @@
          adjust_glyph_matrix (w, w->current_matrix, 0, 0, dim);
        }
 
-      w = NILP (WGET (w, next)) ? NULL : XWINDOW (WGET (w, next));
+      w = NILP (w->next) ? NULL : XWINDOW (w->next);
     }
 }
 
@@ -1882,7 +1882,7 @@
 {
   struct frame *sf = SELECTED_FRAME ();
   struct window *root = XWINDOW (sf->root_window);
-  struct window *mini = XWINDOW (WGET (root, next));
+  struct window *mini = XWINDOW (root->next);
   int frame_lines = FRAME_LINES (sf);
   int frame_cols = FRAME_COLS (sf);
   int top_margin = FRAME_TOP_MARGIN (sf);
@@ -1927,21 +1927,21 @@
 {
   while (w)
     {
-      if (!NILP (WGET (w, hchild)))
-       {
-         if (showing_window_margins_p (XWINDOW (WGET (w, hchild))))
-           return 1;
-       }
-      else if (!NILP (WGET (w, vchild)))
-       {
-         if (showing_window_margins_p (XWINDOW (WGET (w, vchild))))
-           return 1;
-       }
-      else if (!NILP (WGET (w, left_margin_cols))
-              || !NILP (WGET (w, right_margin_cols)))
+      if (!NILP (w->hchild))
+       {
+         if (showing_window_margins_p (XWINDOW (w->hchild)))
+           return 1;
+       }
+      else if (!NILP (w->vchild))
+       {
+         if (showing_window_margins_p (XWINDOW (w->vchild)))
+           return 1;
+       }
+      else if (!NILP (w->left_margin_cols)
+              || !NILP (w->right_margin_cols))
        return 1;
 
-      w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
+      w = NILP (w->next) ? 0 : XWINDOW (w->next);
     }
   return 0;
 }
@@ -1955,18 +1955,18 @@
 {
   struct window *w;
 
-  for (; !NILP (window); window = WGET (w, next))
+  for (; !NILP (window); window = w->next)
     {
       w = XWINDOW (window);
 
-      if (!NILP (WGET (w, hchild)))
-       fake_current_matrices (WGET (w, hchild));
-      else if (!NILP (WGET (w, vchild)))
-       fake_current_matrices (WGET (w, vchild));
+      if (!NILP (w->hchild))
+       fake_current_matrices (w->hchild);
+      else if (!NILP (w->vchild))
+       fake_current_matrices (w->vchild);
       else
        {
          int i;
-         struct frame *f = XFRAME (WGET (w, frame));
+         struct frame *f = XFRAME (w->frame);
          struct glyph_matrix *m = w->current_matrix;
          struct glyph_matrix *fm = f->current_matrix;
 
@@ -2317,10 +2317,10 @@
 {
   while (w)
     {
-      if (!NILP (WGET (w, hchild)))
-       free_window_matrices (XWINDOW (WGET (w, hchild)));
-      else if (!NILP (WGET (w, vchild)))
-       free_window_matrices (XWINDOW (WGET (w, vchild)));
+      if (!NILP (w->hchild))
+       free_window_matrices (XWINDOW (w->hchild));
+      else if (!NILP (w->vchild))
+       free_window_matrices (XWINDOW (w->vchild));
       else
        {
          /* This is a leaf window.  Free its memory and reset fields
@@ -2332,7 +2332,7 @@
        }
 
       /* Next window on same level.  */
-      w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
+      w = NILP (w->next) ? 0 : XWINDOW (w->next);
     }
 }
 
@@ -2453,14 +2453,14 @@
 {
   while (w)
     {
-      if (!NILP (WGET (w, hchild)))
-       build_frame_matrix_from_window_tree (matrix, XWINDOW (WGET (w, 
hchild)));
-      else if (!NILP (WGET (w, vchild)))
-       build_frame_matrix_from_window_tree (matrix, XWINDOW (WGET (w, 
vchild)));
+      if (!NILP (w->hchild))
+       build_frame_matrix_from_window_tree (matrix, XWINDOW (w->hchild));
+      else if (!NILP (w->vchild))
+       build_frame_matrix_from_window_tree (matrix, XWINDOW (w->vchild));
       else
        build_frame_matrix_from_leaf_window (matrix, w);
 
-      w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
+      w = NILP (w->next) ? 0 : XWINDOW (w->next);
     }
 }
 
@@ -2599,7 +2599,7 @@
   /* Convert the glyph's specified face to a realized (cache) face.  */
   if (lface_id > 0)
     {
-      int face_id = merge_faces (XFRAME (WGET (w, frame)),
+      int face_id = merge_faces (XFRAME (w->frame),
                                 Qt, lface_id, DEFAULT_FACE_ID);
       SET_GLYPH_FACE (*glyph, face_id);
     }
@@ -2720,10 +2720,10 @@
 {
   while (w)
     {
-      if (!NILP (WGET (w, hchild)))
-       mirror_make_current (XWINDOW (WGET (w, hchild)), frame_row);
-      else if (!NILP (WGET (w, vchild)))
-       mirror_make_current (XWINDOW (WGET (w, vchild)), frame_row);
+      if (!NILP (w->hchild))
+       mirror_make_current (XWINDOW (w->hchild), frame_row);
+      else if (!NILP (w->vchild))
+       mirror_make_current (XWINDOW (w->vchild), frame_row);
       else
        {
          /* Row relative to window W.  Don't use FRAME_TO_WINDOW_VPOS
@@ -2756,7 +2756,7 @@
            }
        }
 
-      w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
+      w = NILP (w->next) ? 0 : XWINDOW (w->next);
     }
 }
 
@@ -2815,16 +2815,16 @@
 static void
 sync_window_with_frame_matrix_rows (struct window *w)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   struct glyph_row *window_row, *window_row_end, *frame_row;
   int left, right, x, width;
 
   /* Preconditions: W must be a leaf window on a tty frame.  */
-  eassert (NILP (WGET (w, hchild)) && NILP (WGET (w, vchild)));
+  eassert (NILP (w->hchild) && NILP (w->vchild));
   eassert (!FRAME_WINDOW_P (f));
 
-  left = margin_glyphs_to_reserve (w, 1, WGET (w, left_margin_cols));
-  right = margin_glyphs_to_reserve (w, 1, WGET (w, right_margin_cols));
+  left = margin_glyphs_to_reserve (w, 1, w->left_margin_cols);
+  right = margin_glyphs_to_reserve (w, 1, w->right_margin_cols);
   x = w->current_matrix->matrix_x;
   width = w->current_matrix->matrix_w;
 
@@ -2856,15 +2856,15 @@
 
   while (w && !found)
     {
-      if (!NILP (WGET (w, hchild)))
-       found = frame_row_to_window (XWINDOW (WGET (w, hchild)), row);
-      else if (!NILP (WGET (w, vchild)))
-       found = frame_row_to_window (XWINDOW (WGET (w, vchild)), row);
+      if (!NILP (w->hchild))
+       found = frame_row_to_window (XWINDOW (w->hchild), row);
+      else if (!NILP (w->vchild))
+       found = frame_row_to_window (XWINDOW (w->vchild), row);
       else if (row >= WINDOW_TOP_EDGE_LINE (w)
               && row < WINDOW_BOTTOM_EDGE_LINE (w))
        found = w;
 
-      w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
+      w = NILP (w->next) ? 0 : XWINDOW (w->next);
     }
 
   return found;
@@ -2887,11 +2887,11 @@
 {
   while (w)
     {
-      if (!NILP (WGET (w, hchild)))
-       mirror_line_dance (XWINDOW (WGET (w, hchild)), unchanged_at_top,
+      if (!NILP (w->hchild))
+       mirror_line_dance (XWINDOW (w->hchild), unchanged_at_top,
                           nlines, copy_from, retained_p);
-      else if (!NILP (WGET (w, vchild)))
-       mirror_line_dance (XWINDOW (WGET (w, vchild)), unchanged_at_top,
+      else if (!NILP (w->vchild))
+       mirror_line_dance (XWINDOW (w->vchild), unchanged_at_top,
                           nlines, copy_from, retained_p);
       else
        {
@@ -2947,7 +2947,7 @@
                {
                  /* A copy between windows.  This is an infrequent
                     case not worth optimizing.  */
-                 struct frame *f = XFRAME (WGET (w, frame));
+                 struct frame *f = XFRAME (w->frame);
                  struct window *root = XWINDOW (FRAME_ROOT_WINDOW (f));
                  struct window *w2;
                  struct glyph_matrix *m2;
@@ -2984,7 +2984,7 @@
        }
 
       /* Next window on same level.  */
-      w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
+      w = NILP (w->next) ? 0 : XWINDOW (w->next);
     }
 }
 
@@ -3002,18 +3002,18 @@
 {
   while (w)
     {
-      if (!NILP (WGET (w, hchild)))
-       check_window_matrix_pointers (XWINDOW (WGET (w, hchild)));
-      else if (!NILP (WGET (w, vchild)))
-       check_window_matrix_pointers (XWINDOW (WGET (w, vchild)));
+      if (!NILP (w->hchild))
+       check_window_matrix_pointers (XWINDOW (w->hchild));
+      else if (!NILP (w->vchild))
+       check_window_matrix_pointers (XWINDOW (w->vchild));
       else
        {
-         struct frame *f = XFRAME (WGET (w, frame));
+         struct frame *f = XFRAME (w->frame);
          check_matrix_pointers (w->desired_matrix, f->desired_matrix);
          check_matrix_pointers (w->current_matrix, f->current_matrix);
        }
 
-      w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
+      w = NILP (w->next) ? 0 : XWINDOW (w->next);
     }
 }
 
@@ -3061,10 +3061,10 @@
 static int
 window_to_frame_vpos (struct window *w, int vpos)
 {
-  eassert (!FRAME_WINDOW_P (XFRAME (WGET (w, frame))));
+  eassert (!FRAME_WINDOW_P (XFRAME (w->frame)));
   eassert (vpos >= 0 && vpos <= w->desired_matrix->nrows);
   vpos += WINDOW_TOP_EDGE_LINE (w);
-  eassert (vpos >= 0 && vpos <= FRAME_LINES (XFRAME (WGET (w, frame))));
+  eassert (vpos >= 0 && vpos <= FRAME_LINES (XFRAME (w->frame)));
   return vpos;
 }
 
@@ -3075,7 +3075,7 @@
 static int
 window_to_frame_hpos (struct window *w, int hpos)
 {
-  eassert (!FRAME_WINDOW_P (XFRAME (WGET (w, frame))));
+  eassert (!FRAME_WINDOW_P (XFRAME (w->frame)));
   hpos += WINDOW_LEFT_EDGE_COL (w);
   return hpos;
 }
@@ -3294,14 +3294,14 @@
 
   while (w && !paused_p)
     {
-      if (!NILP (WGET (w, hchild)))
-       paused_p |= update_window_tree (XWINDOW (WGET (w, hchild)), force_p);
-      else if (!NILP (WGET (w, vchild)))
-       paused_p |= update_window_tree (XWINDOW (WGET (w, vchild)), force_p);
+      if (!NILP (w->hchild))
+       paused_p |= update_window_tree (XWINDOW (w->hchild), force_p);
+      else if (!NILP (w->vchild))
+       paused_p |= update_window_tree (XWINDOW (w->vchild), force_p);
       else if (w->must_be_updated_p)
        paused_p |= update_window (w, force_p);
 
-      w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
+      w = NILP (w->next) ? 0 : XWINDOW (w->next);
     }
 
   return paused_p;
@@ -3789,7 +3789,7 @@
              struct glyph *glyph = &current_row->glyphs[TEXT_AREA][i - 1];
              int left, right;
 
-             rif->get_glyph_overhangs (glyph, XFRAME (WGET (w, frame)),
+             rif->get_glyph_overhangs (glyph, XFRAME (w->frame),
                                        &left, &right);
              can_skip_p = (right == 0 && !abort_skipping);
            }
@@ -3822,7 +3822,7 @@
                  int left, right;
 
                  rif->get_glyph_overhangs (current_glyph,
-                                           XFRAME (WGET (w, frame)),
+                                           XFRAME (w->frame),
                                            &left, &right);
                  while (left > 0 && i > 0)
                    {
@@ -3965,7 +3965,7 @@
 
       /* Update display of the left margin area, if there is one.  */
       if (!desired_row->full_width_p
-         && !NILP (WGET (w, left_margin_cols)))
+         && !NILP (w->left_margin_cols))
        {
          changed_p = 1;
          update_marginal_area (w, LEFT_MARGIN_AREA, vpos);
@@ -3981,7 +3981,7 @@
 
       /* Update display of the right margin area, if there is one.  */
       if (!desired_row->full_width_p
-         && !NILP (WGET (w, right_margin_cols)))
+         && !NILP (w->right_margin_cols))
        {
          changed_p = 1;
          update_marginal_area (w, RIGHT_MARGIN_AREA, vpos);
@@ -4014,7 +4014,7 @@
 static void
 set_window_cursor_after_update (struct window *w)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   struct redisplay_interface *rif = FRAME_RIF (f);
   int cx, cy, vpos, hpos;
 
@@ -4100,14 +4100,14 @@
 {
   while (w)
     {
-      if (!NILP (WGET (w, hchild)))
-       set_window_update_flags (XWINDOW (WGET (w, hchild)), on_p);
-      else if (!NILP (WGET (w, vchild)))
-       set_window_update_flags (XWINDOW (WGET (w, vchild)), on_p);
+      if (!NILP (w->hchild))
+       set_window_update_flags (XWINDOW (w->hchild), on_p);
+      else if (!NILP (w->vchild))
+       set_window_update_flags (XWINDOW (w->vchild), on_p);
       else
        w->must_be_updated_p = on_p;
 
-      w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
+      w = NILP (w->next) ? 0 : XWINDOW (w->next);
     }
 }
 
@@ -4790,8 +4790,8 @@
              int x = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos);
              int y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos);
 
-             if (INTEGERP (WGET (w, left_margin_cols)))
-               x += XFASTINT (WGET (w, left_margin_cols));
+             if (INTEGERP (w->left_margin_cols))
+               x += XFASTINT (w->left_margin_cols);
 
              /* x = max (min (x, FRAME_TOTAL_COLS (f) - 1), 0); */
              cursor_to (f, y, x);
@@ -5281,9 +5281,9 @@
 
   /* We used to set current_buffer directly here, but that does the
      wrong thing with `face-remapping-alist' (bug#2044).  */
-  Fset_buffer (WGET (w, buffer));
+  Fset_buffer (w->buffer);
   itdata = bidi_shelve_cache ();
-  SET_TEXT_POS_FROM_MARKER (startp, WGET (w, start));
+  SET_TEXT_POS_FROM_MARKER (startp, w->start);
   CHARPOS (startp) = min (ZV, max (BEGV, CHARPOS (startp)));
   BYTEPOS (startp) = min (ZV_BYTE, max (BEGV_BYTE, BYTEPOS (startp)));
   start_display (&it, w, startp);
@@ -5327,7 +5327,7 @@
   *dx = x0 + it.first_visible_x - it.current_x;
   *dy = *y - it.current_y;
 
-  string =  WGET (w, buffer);
+  string =  w->buffer;
   if (STRINGP (it.string))
     string = it.string;
   *pos = it.current;
@@ -5345,7 +5345,7 @@
       if (STRINGP (it.string))
        BYTEPOS (pos->pos) = string_char_to_byte (string, CHARPOS (pos->pos));
       else
-       BYTEPOS (pos->pos) = buf_charpos_to_bytepos (XBUFFER (WGET (w, buffer)),
+       BYTEPOS (pos->pos) = buf_charpos_to_bytepos (XBUFFER (w->buffer),
                                                     CHARPOS (pos->pos));
     }
 
@@ -5745,8 +5745,7 @@
        FrameCols (FRAME_TTY (f)) = newwidth;
 
       if (WINDOWP (f->tool_bar_window))
-       WSET (XWINDOW (f->tool_bar_window),
-             total_cols, make_number (newwidth));
+       WSET (XWINDOW (f->tool_bar_window), total_cols, make_number (newwidth));
     }
 
   FRAME_LINES (f) = newheight;

=== modified file 'src/editfns.c'
--- a/src/editfns.c     2012-08-06 10:24:26 +0000
+++ b/src/editfns.c     2012-08-07 07:33:18 +0000
@@ -366,7 +366,7 @@
   if (NILP (object))
     XSETBUFFER (object, current_buffer);
   else if (WINDOWP (object))
-    object = WGET (XWINDOW (object), buffer);
+    object = XWINDOW (object)->buffer;
 
   if (!BUFFERP (object))
     /* pos-property only makes sense in buffers right now, since strings
@@ -821,7 +821,7 @@
 Lisp_Object
 save_excursion_save (void)
 {
-  int visible = (XBUFFER (WGET (XWINDOW (selected_window), buffer))
+  int visible = (XBUFFER (XWINDOW (selected_window)->buffer)
                 == current_buffer);
 
   return Fcons (Fpoint_marker (),
@@ -874,7 +874,7 @@
         and cleaner never to alter the window/buffer connections.  */
   tem1 = Fcar (tem);
   if (!NILP (tem1)
-      && current_buffer != XBUFFER (WGET (XWINDOW (selected_window), buffer)))
+      && current_buffer != XBUFFER (XWINDOW (selected_window)->buffer))
     Fswitch_to_buffer (Fcurrent_buffer (), Qnil);
 #endif /* 0 */
 
@@ -907,7 +907,7 @@
   tem = XCDR (info);
   if (visible_p
       && !EQ (tem, selected_window)
-      && (tem1 = WGET (XWINDOW (tem), buffer),
+      && (tem1 = XWINDOW (tem)->buffer,
          (/* Window is live...  */
           BUFFERP (tem1)
           /* ...and it shows the current buffer.  */

=== modified file 'src/fileio.c'
--- a/src/fileio.c      2012-08-06 10:24:26 +0000
+++ b/src/fileio.c      2012-08-07 07:33:18 +0000
@@ -3731,7 +3731,7 @@
 
          /* If display currently starts at beginning of line,
             keep it that way.  */
-         if (XBUFFER (WGET (XWINDOW (selected_window), buffer)) == 
current_buffer)
+         if (XBUFFER (XWINDOW (selected_window)->buffer) == current_buffer)
            XWINDOW (selected_window)->start_at_line_beg = !NILP (Fbolp ());
 
          replace_handled = 1;
@@ -3888,7 +3888,7 @@
 
       /* If display currently starts at beginning of line,
         keep it that way.  */
-      if (XBUFFER (WGET (XWINDOW (selected_window), buffer)) == current_buffer)
+      if (XBUFFER (XWINDOW (selected_window)->buffer) == current_buffer)
        XWINDOW (selected_window)->start_at_line_beg = !NILP (Fbolp ());
 
       /* Replace the chars that we need to replace,

=== modified file 'src/font.c'
--- a/src/font.c        2012-08-06 10:24:26 +0000
+++ b/src/font.c        2012-08-07 07:33:18 +0000
@@ -3665,7 +3665,7 @@
        }
     }
 
-  f = XFRAME (WGET (w, frame));
+  f = XFRAME (w->frame);
   if (! FRAME_WINDOW_P (f))
     return Qnil;
   if (! face)
@@ -3723,7 +3723,7 @@
 
          face_id = face_at_buffer_position (w, pos, 0, 0, &ignore,
                                             *limit, 0, -1);
-         face = FACE_FROM_ID (XFRAME (WGET (w, frame)), face_id);
+         face = FACE_FROM_ID (XFRAME (w->frame), face_id);
        }
     }
   else

=== modified file 'src/fontset.c'
--- a/src/fontset.c     2012-08-07 05:29:25 +0000
+++ b/src/fontset.c     2012-08-07 07:33:18 +0000
@@ -1841,7 +1841,7 @@
       if (NILP (window))
        return Qnil;
       w = XWINDOW (window);
-      f = XFRAME (WGET (w, frame));
+      f = XFRAME (w->frame);
       face_id = face_at_buffer_position (w, pos, -1, -1, &dummy,
                                         pos + 100, 0, -1);
     }

=== modified file 'src/frame.c'
--- a/src/frame.c       2012-08-07 05:29:25 +0000
+++ b/src/frame.c       2012-08-07 07:33:18 +0000
@@ -132,15 +132,15 @@
   struct window *w = XWINDOW (window);
 
   w->last_modified = 0;
-  WSET (w, top_line, make_number (XFASTINT (WGET (w, top_line)) + n));
-  WSET (w, total_lines, make_number (XFASTINT (WGET (w, total_lines)) - n));
+  WSET (w, top_line, make_number (XFASTINT (w->top_line) + n));
+  WSET (w, total_lines, make_number (XFASTINT (w->total_lines) - n));
 
   /* Handle just the top child in a vertical split.  */
-  if (!NILP (WGET (w, vchild)))
-    set_menu_bar_lines_1 (WGET (w, vchild), n);
+  if (!NILP (w->vchild))
+    set_menu_bar_lines_1 (w->vchild, n);
 
   /* Adjust all children in a horizontal split.  */
-  for (window = WGET (w, hchild); !NILP (window); window = WGET (w, next))
+  for (window = w->hchild; !NILP (window); window = w->next)
     {
       w = XWINDOW (window);
       set_menu_bar_lines_1 (window, n);
@@ -376,7 +376,7 @@
     CHECK_LIVE_WINDOW (mini_window);
 
   if (!NILP (mini_window)
-      && FRAME_KBOARD (XFRAME (WGET (XWINDOW (mini_window), frame))) != kb)
+      && FRAME_KBOARD (XFRAME (XWINDOW (mini_window)->frame)) != kb)
     error ("Frame and minibuffer must be on the same terminal");
 
   /* Make a frame containing just a root window.  */
@@ -406,7 +406,7 @@
 
   /* Make the chosen minibuffer window display the proper minibuffer,
      unless it is already showing a minibuffer.  */
-  if (NILP (Fmemq (WGET (XWINDOW (mini_window), buffer), Vminibuffer_list)))
+  if (NILP (Fmemq (XWINDOW (mini_window)->buffer, Vminibuffer_list)))
     Fset_window_buffer (mini_window,
                        (NILP (Vminibuffer_list)
                         ? get_minibuffer (0)
@@ -1241,7 +1241,7 @@
   if (EQ (f->minibuffer_window, minibuf_window))
     {
       Fset_window_buffer (sf->minibuffer_window,
-                         WGET (XWINDOW (minibuf_window), buffer), Qnil);
+                         XWINDOW (minibuf_window)->buffer, Qnil);
       minibuf_window = sf->minibuffer_window;
 
       /* If the dying minibuffer window was selected,
@@ -1672,17 +1672,17 @@
 {
   struct window *w;
 
-  for (;!NILP (window); window = WGET (w, next))
+  for (;!NILP (window); window = w->next)
     {
       w = XWINDOW (window);
 
-      if (!NILP (WGET (w, buffer)))
-       BVAR (XBUFFER (WGET (w, buffer)), display_time) = Fcurrent_time ();
+      if (!NILP (w->buffer))
+       BVAR (XBUFFER (w->buffer), display_time) = Fcurrent_time ();
 
-      if (!NILP (WGET (w, vchild)))
-       make_frame_visible_1 (WGET (w, vchild));
-      if (!NILP (WGET (w, hchild)))
-       make_frame_visible_1 (WGET (w, hchild));
+      if (!NILP (w->vchild))
+       make_frame_visible_1 (w->vchild);
+      if (!NILP (w->hchild))
+       make_frame_visible_1 (w->hchild);
     }
 }
 
@@ -1714,7 +1714,7 @@
     {
       struct frame *sf = XFRAME (selected_frame);
       Fset_window_buffer (sf->minibuffer_window,
-                         WGET (XWINDOW (minibuf_window), buffer), Qnil);
+                         XWINDOW (minibuf_window)->buffer, Qnil);
       minibuf_window = sf->minibuffer_window;
     }
 
@@ -1752,7 +1752,7 @@
     {
       struct frame *sf = XFRAME (selected_frame);
       Fset_window_buffer (sf->minibuffer_window,
-                         WGET (XWINDOW (minibuf_window), buffer), Qnil);
+                         XWINDOW (minibuf_window)->buffer, Qnil);
       minibuf_window = sf->minibuffer_window;
     }
 

=== modified file 'src/frame.h'
--- a/src/frame.h       2012-08-07 05:29:25 +0000
+++ b/src/frame.h       2012-08-07 07:33:18 +0000
@@ -511,7 +511,7 @@
 #define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME))
 
 /* Given a window, return its frame as a Lisp_Object.  */
-#define WINDOW_FRAME(w) WGET (w, frame)
+#define WINDOW_FRAME(w) w->frame
 
 /* Test a frame for particular kinds of display methods.  */
 #define FRAME_INITIAL_P(f) ((f)->output_method == output_initial)

=== modified file 'src/fringe.c'
--- a/src/fringe.c      2012-08-07 05:29:25 +0000
+++ b/src/fringe.c      2012-08-07 07:33:18 +0000
@@ -692,7 +692,7 @@
 {
   Lisp_Object cmap, bm = Qnil;
 
-  if ((cmap = BVAR (XBUFFER (WGET (w, buffer)), fringe_cursor_alist)), !NILP 
(cmap))
+  if ((cmap = BVAR (XBUFFER (w->buffer), fringe_cursor_alist)), !NILP (cmap))
     {
       bm = Fassq (cursor, cmap);
       if (CONSP (bm))
@@ -729,7 +729,7 @@
      If partial, lookup partial bitmap in default value if not found here.
      If not partial, or no partial spec is present, use non-partial bitmap.  */
 
-  if ((cmap = BVAR (XBUFFER (WGET (w, buffer)), fringe_indicator_alist)), 
!NILP (cmap))
+  if ((cmap = BVAR (XBUFFER (w->buffer), fringe_indicator_alist)), !NILP 
(cmap))
     {
       bm1 = Fassq (bitmap, cmap);
       if (CONSP (bm1))
@@ -956,7 +956,7 @@
     return 0;
 
   if (!MINI_WINDOW_P (w)
-      && (ind = BVAR (XBUFFER (WGET (w, buffer)), indicate_buffer_boundaries), 
!NILP (ind)))
+      && (ind = BVAR (XBUFFER (w->buffer), indicate_buffer_boundaries), !NILP 
(ind)))
     {
       if (EQ (ind, Qleft) || EQ (ind, Qright))
        boundary_top = boundary_bot = arrow_top = arrow_bot = ind;
@@ -997,7 +997,7 @@
            {
              if (top_ind_rn < 0 && row->visible_height > 0)
                {
-                 if (MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (WGET 
(w, buffer)))
+                 if (MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER 
(w->buffer))
                      && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (w, row))
                    row->indicate_bob_p = !NILP (boundary_top);
                  else
@@ -1007,7 +1007,7 @@
 
              if (bot_ind_rn < 0)
                {
-                 if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (WGET (w, 
buffer)))
+                 if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER 
(w->buffer))
                      && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P (w, row))
                    row->indicate_eob_p = !NILP (boundary_bot), bot_ind_rn = rn;
                  else if (y + row->height >= yb)
@@ -1017,7 +1017,7 @@
        }
     }
 
-  empty_pos = BVAR (XBUFFER (WGET (w, buffer)), indicate_empty_lines);
+  empty_pos = BVAR (XBUFFER (w->buffer), indicate_empty_lines);
   if (!NILP (empty_pos) && !EQ (empty_pos, Qright))
     empty_pos = WINDOW_LEFT_FRINGE_WIDTH (w) == 0 ? Qright : Qleft;
 
@@ -1740,7 +1740,7 @@
   else if (w == XWINDOW (selected_window))
     textpos = PT;
   else
-    textpos = XMARKER (WGET (w, pointm))->charpos;
+    textpos = XMARKER (w->pointm)->charpos;
 
   row = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
   row = row_containing_pos (w, textpos, row, NULL, 0);

=== modified file 'src/indent.c'
--- a/src/indent.c      2012-08-06 10:24:26 +0000
+++ b/src/indent.c      2012-08-07 07:33:18 +0000
@@ -258,7 +258,7 @@
      the next property change */
   prop = Fget_char_property (position, Qinvisible,
                             (!NILP (window)
-                             && EQ (WGET (XWINDOW (window), buffer), buffer))
+                             && EQ (XWINDOW (window)->buffer, buffer))
                             ? window : buffer);
   inv_p = TEXT_PROP_MEANS_INVISIBLE (prop);
   /* When counting columns (window == nil), don't skip over ellipsis text.  */
@@ -1173,14 +1173,14 @@
       width = window_body_cols (win);
       /* We must make room for continuation marks if we don't have fringes.  */
 #ifdef HAVE_WINDOW_SYSTEM
-      if (!FRAME_WINDOW_P (XFRAME (WGET (win, frame))))
+      if (!FRAME_WINDOW_P (XFRAME (win->frame)))
 #endif
        width -= 1;
     }
 
   continuation_glyph_width = 1;
 #ifdef HAVE_WINDOW_SYSTEM
-  if (FRAME_WINDOW_P (XFRAME (WGET (win, frame))))
+  if (FRAME_WINDOW_P (XFRAME (win->frame)))
     continuation_glyph_width = 0;  /* In the fringe.  */
 #endif
 
@@ -1787,7 +1787,7 @@
                         ? (window_body_cols (w)
                            - (
 #ifdef HAVE_WINDOW_SYSTEM
-                              FRAME_WINDOW_P (XFRAME (WGET (w, frame))) ? 0 :
+                              FRAME_WINDOW_P (XFRAME (w->frame)) ? 0 :
 #endif
                               1))
                         : XINT (XCAR (topos))),
@@ -1837,7 +1837,7 @@
 
   /* If the window contains this buffer, use it for getting text properties.
      Otherwise use the current buffer as arg for doing that.  */
-  if (EQ (WGET (w, buffer), Fcurrent_buffer ()))
+  if (EQ (w->buffer, Fcurrent_buffer ()))
     text_prop_object = window;
   else
     text_prop_object = Fcurrent_buffer ();
@@ -1998,14 +1998,14 @@
 
   old_buffer = Qnil;
   GCPRO3 (old_buffer, old_charpos, old_bytepos);
-  if (XBUFFER (WGET (w, buffer)) != current_buffer)
+  if (XBUFFER (w->buffer) != current_buffer)
     {
       /* Set the window's buffer temporarily to the current buffer.  */
-      old_buffer = WGET (w, buffer);
-      old_charpos = XMARKER (WGET (w, pointm))->charpos;
-      old_bytepos = XMARKER (WGET (w, pointm))->bytepos;
+      old_buffer = w->buffer;
+      old_charpos = XMARKER (w->pointm)->charpos;
+      old_bytepos = XMARKER (w->pointm)->bytepos;
       WSET (w, buffer, Fcurrent_buffer ());
-      set_marker_both (WGET (w, pointm), WGET (w, buffer),
+      set_marker_both (w->pointm, w->buffer,
                       BUF_PT (current_buffer), BUF_PT_BYTE (current_buffer));
     }
 
@@ -2137,7 +2137,7 @@
            }
          move_it_in_display_line
            (&it, ZV,
-            (int)(cols * FRAME_COLUMN_WIDTH (XFRAME (WGET (w, frame))) + 0.5),
+            (int)(cols * FRAME_COLUMN_WIDTH (XFRAME (w->frame)) + 0.5),
             MOVE_TO_X);
        }
 
@@ -2148,7 +2148,7 @@
   if (BUFFERP (old_buffer))
     {
       WSET (w, buffer, old_buffer);
-      set_marker_both (WGET (w, pointm), WGET (w, buffer),
+      set_marker_both (w->pointm, w->buffer,
                       old_charpos, old_bytepos);
     }
 

=== modified file 'src/insdel.c'
--- a/src/insdel.c      2012-08-06 10:24:26 +0000
+++ b/src/insdel.c      2012-08-07 07:33:18 +0000
@@ -1820,7 +1820,7 @@
 
   /* Let redisplay consider other windows than selected_window
      if modifying another buffer.  */
-  if (XBUFFER (WGET (XWINDOW (selected_window), buffer)) != current_buffer)
+  if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer)
     ++windows_or_buffers_changed;
 
   if (BUF_INTERVALS (current_buffer) != 0)

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2012-08-06 16:09:02 +0000
+++ b/src/keyboard.c    2012-08-07 07:33:18 +0000
@@ -800,7 +800,7 @@
   update_mode_lines = 1;
 
   if (command_loop_level
-      && current_buffer != XBUFFER (WGET (XWINDOW (selected_window), buffer)))
+      && current_buffer != XBUFFER (XWINDOW (selected_window)->buffer))
     buffer = Fcurrent_buffer ();
   else
     buffer = Qnil;
@@ -1382,8 +1382,8 @@
        Fkill_emacs (Qnil);
 
       /* Make sure the current window's buffer is selected.  */
-      if (XBUFFER (WGET (XWINDOW (selected_window), buffer)) != current_buffer)
-       set_buffer_internal (XBUFFER (WGET (XWINDOW (selected_window), 
buffer)));
+      if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer)
+       set_buffer_internal (XBUFFER (XWINDOW (selected_window)->buffer));
 
       /* Display any malloc warning that just came out.  Use while because
         displaying one warning can cause another.  */
@@ -1452,8 +1452,8 @@
       /* A filter may have run while we were reading the input.  */
       if (! FRAME_LIVE_P (XFRAME (selected_frame)))
        Fkill_emacs (Qnil);
-      if (XBUFFER (WGET (XWINDOW (selected_window), buffer)) != current_buffer)
-       set_buffer_internal (XBUFFER (WGET (XWINDOW (selected_window), 
buffer)));
+      if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer)
+       set_buffer_internal (XBUFFER (XWINDOW (selected_window)->buffer));
 
       ++num_input_keys;
 
@@ -1484,7 +1484,7 @@
        {
          struct buffer *b;
          XWINDOW (selected_window)->force_start = 0;
-         b = XBUFFER (WGET (XWINDOW (selected_window), buffer));
+         b = XBUFFER (XWINDOW (selected_window)->buffer);
          BUF_BEG_UNCHANGED (b) = BUF_END_UNCHANGED (b) = 0;
        }
 
@@ -5175,8 +5175,8 @@
          if (STRINGP (string))
            string_info = Fcons (string, make_number (charpos));
          textpos = (w == XWINDOW (selected_window)
-                    && current_buffer == XBUFFER (WGET (w, buffer)))
-           ? PT : XMARKER (WGET (w, pointm))->charpos;
+                    && current_buffer == XBUFFER (w->buffer))
+           ? PT : XMARKER (w->pointm)->charpos;
 
          xret = wx;
          yret = wy;
@@ -5564,7 +5564,7 @@
          int fuzz;
 
          if (WINDOWP (event->frame_or_window))
-           f = XFRAME (WGET (XWINDOW (event->frame_or_window), frame));
+           f = XFRAME (XWINDOW (event->frame_or_window)->frame);
          else if (FRAMEP (event->frame_or_window))
            f = XFRAME (event->frame_or_window);
          else
@@ -5732,7 +5732,7 @@
          int is_double;
 
          if (WINDOWP (event->frame_or_window))
-           fr = XFRAME (WGET (XWINDOW (event->frame_or_window), frame));
+           fr = XFRAME (XWINDOW (event->frame_or_window)->frame);
          else if (FRAMEP (event->frame_or_window))
            fr = XFRAME (event->frame_or_window);
          else
@@ -9402,8 +9402,8 @@
                {
                  if (! FRAME_LIVE_P (XFRAME (selected_frame)))
                    Fkill_emacs (Qnil);
-                 if (XBUFFER (WGET (XWINDOW (selected_window), buffer)) != 
current_buffer)
-                   Fset_buffer (WGET (XWINDOW (selected_window), buffer));
+                 if (XBUFFER (XWINDOW (selected_window)->buffer) != 
current_buffer)
+                   Fset_buffer (XWINDOW (selected_window)->buffer);
                }
 
              orig_local_map = get_local_map (PT, current_buffer, Qlocal_map);
@@ -9495,8 +9495,8 @@
                     not the current buffer.  If we're at the
                     beginning of a key sequence, switch buffers.  */
                  if (WINDOWP (window)
-                     && BUFFERP (WGET (XWINDOW (window), buffer))
-                     && XBUFFER (WGET (XWINDOW (window), buffer)) != 
current_buffer)
+                     && BUFFERP (XWINDOW (window)->buffer)
+                     && XBUFFER (XWINDOW (window)->buffer) != current_buffer)
                    {
                      ASET (raw_keybuf, raw_keybuf_count, key);
                      raw_keybuf_count++;
@@ -9517,7 +9517,7 @@
 
                      if (! FRAME_LIVE_P (XFRAME (selected_frame)))
                        Fkill_emacs (Qnil);
-                     set_buffer_internal (XBUFFER (WGET (XWINDOW (window), 
buffer)));
+                     set_buffer_internal (XBUFFER (XWINDOW (window)->buffer));
                      orig_local_map = get_local_map (PT, current_buffer,
                                                      Qlocal_map);
                      orig_keymap = get_local_map (PT, current_buffer,
@@ -11201,7 +11201,7 @@
                      ? window_box_left_offset (w, TEXT_AREA)
                      : 0)));
       XSETINT (y, WINDOW_TO_FRAME_PIXEL_Y (w, XINT (y)));
-      frame_or_window = WGET (w, frame);
+      frame_or_window = w->frame;
     }
 
   CHECK_LIVE_FRAME (frame_or_window);

=== modified file 'src/keymap.c'
--- a/src/keymap.c      2012-08-06 10:24:26 +0000
+++ b/src/keymap.c      2012-08-07 07:33:18 +0000
@@ -1560,8 +1560,8 @@
       window = POSN_WINDOW (position);
 
       if (WINDOWP (window)
-         && BUFFERP (WGET (XWINDOW (window), buffer))
-         && XBUFFER (WGET (XWINDOW (window), buffer)) != current_buffer)
+         && BUFFERP (XWINDOW (window)->buffer)
+         && XBUFFER (XWINDOW (window)->buffer) != current_buffer)
        {
          /* Arrange to go back to the original buffer once we're done
             processing the key sequence.  We don't use
@@ -1573,7 +1573,7 @@
 
          record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
 
-         set_buffer_internal (XBUFFER (WGET (XWINDOW (window), buffer)));
+         set_buffer_internal (XBUFFER (XWINDOW (window)->buffer));
        }
     }
 

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2012-08-06 10:24:26 +0000
+++ b/src/lisp.h        2012-08-07 07:33:18 +0000
@@ -1787,7 +1787,7 @@
    vchild, and hchild members are all nil.  */
 
 #define CHECK_LIVE_WINDOW(x) \
-  CHECK_TYPE (WINDOWP (x) && !NILP (WGET (XWINDOW (x), buffer)), \
+  CHECK_TYPE (WINDOWP (x) && !NILP (XWINDOW (x)->buffer), \
              Qwindow_live_p, x)
 
 #define CHECK_PROCESS(x) \

=== modified file 'src/minibuf.c'
--- a/src/minibuf.c     2012-08-07 05:29:25 +0000
+++ b/src/minibuf.c     2012-08-07 07:33:18 +0000
@@ -115,7 +115,7 @@
       /* Under X, we come here with minibuf_window being the
         minibuffer window of the unused termcap window created in
         init_window_once.  That window doesn't have a buffer.  */
-      buffer = WGET (XWINDOW (minibuf_window), buffer);
+      buffer = XWINDOW (minibuf_window)->buffer;
       if (BUFFERP (buffer))
        Fset_window_buffer (sf->minibuffer_window, buffer, Qnil);
       minibuf_window = sf->minibuffer_window;
@@ -612,7 +612,7 @@
   FOR_EACH_FRAME (dummy, frame)
     {
       Lisp_Object root_window = Fframe_root_window (frame);
-      Lisp_Object mini_window = WGET (XWINDOW (root_window), next);
+      Lisp_Object mini_window = XWINDOW (root_window)->next;
 
       if (! NILP (mini_window) && ! EQ (mini_window, minibuf_window)
          && !NILP (Fwindow_minibuffer_p (mini_window)))
@@ -687,7 +687,7 @@
       XWINDOW (minibuf_window)->must_be_updated_p = 1;
       update_frame (XFRAME (selected_frame), 1, 1);
       {
-        struct frame *f = XFRAME (WGET (XWINDOW (minibuf_window), frame));
+        struct frame *f = XFRAME (XWINDOW (minibuf_window)->frame);
         struct redisplay_interface *rif = FRAME_RIF (f);
         if (rif && rif->flush_display)
           rif->flush_display (f);
@@ -844,7 +844,7 @@
   window = minibuf_window;
   /* To keep things predictable, in case it matters, let's be in the
      minibuffer when we reset the relevant variables.  */
-  Fset_buffer (WGET (XWINDOW (window), buffer));
+  Fset_buffer (XWINDOW (window)->buffer);
 
   /* Restore prompt, etc, from outer minibuffer level.  */
   minibuf_prompt = Fcar (minibuf_save_list);

=== modified file 'src/msdos.c'
--- a/src/msdos.c       2012-08-07 05:29:25 +0000
+++ b/src/msdos.c       2012-08-07 07:33:18 +0000
@@ -594,7 +594,7 @@
       Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
       Lisp_Object window = hlinfo->mouse_face_window;
 
-      if (! NILP (window) && XFRAME (WGET (XWINDOW (window), frame)) == f)
+      if (! NILP (window) && XFRAME (XWINDOW (window)->frame) == f)
        {
          hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
          hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1;
@@ -1255,7 +1255,7 @@
          /* If the mouse highlight is in the window that was deleted
             (e.g., if it was popped by completion), clear highlight
             unconditionally.  */
-         if (NILP (WGET (w, buffer)))
+         if (NILP (w->buffer))
            hlinfo->mouse_face_window = Qnil;
          else
            {
@@ -1265,7 +1265,7 @@
                  break;
            }
 
-         if (NILP (WGET (w, buffer)) || i < w->desired_matrix->nrows)
+         if (NILP (w->buffer) || i < w->desired_matrix->nrows)
            clear_mouse_face (hlinfo);
        }
     }
@@ -1327,7 +1327,7 @@
     new_cursor = frame_desired_cursor;
   else
     {
-      struct buffer *b = XBUFFER (WGET (sw, buffer));
+      struct buffer *b = XBUFFER (sw->buffer);
 
       if (EQ (BVAR (b,cursor_type), Qt))
        new_cursor = frame_desired_cursor;

=== modified file 'src/nsfns.m'
--- a/src/nsfns.m       2012-08-07 05:29:25 +0000
+++ b/src/nsfns.m       2012-08-07 07:33:18 +0000
@@ -607,7 +607,7 @@
 {
   NSView *view;
   Lisp_Object name, filename;
-  Lisp_Object buf = WGET (XWINDOW (f->selected_window), buffer);
+  Lisp_Object buf = XWINDOW (f->selected_window)->buffer;
   const char *title;
   NSAutoreleasePool *pool;
   struct gcpro gcpro1;

=== modified file 'src/nsmenu.m'
--- a/src/nsmenu.m      2012-08-07 05:29:25 +0000
+++ b/src/nsmenu.m      2012-08-07 07:33:18 +0000
@@ -193,7 +193,7 @@
        = alloca (previous_menu_items_used * sizeof *previous_items);
 
       /* lisp preliminaries */
-      buffer = WGET (XWINDOW (FRAME_SELECTED_WINDOW (f)), buffer);
+      buffer = XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer;
       specbind (Qinhibit_quit, Qt);
       specbind (Qdebug_on_next_call, Qnil);
       record_unwind_save_match_data ();

=== modified file 'src/nsterm.m'
--- a/src/nsterm.m      2012-08-07 05:29:25 +0000
+++ b/src/nsterm.m      2012-08-07 07:33:18 +0000
@@ -667,7 +667,7 @@
    external (RIF) call; for one window called before update_end
    -------------------------------------------------------------------------- 
*/
 {
-  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (WGET (w, frame)));
+  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
 
   /* note: this fn is nearly identical in all terms */
   if (!w->pseudo_window_p)
@@ -2035,7 +2035,7 @@
     External (RIF):  Insert or delete n lines at line vpos
    -------------------------------------------------------------------------- 
*/
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   int x, y, width, height, from_y, to_y, bottom_y;
 
   NSTRACE (ns_scroll_run);
@@ -2114,7 +2114,7 @@
      full-width rows stays visible in the internal border.
      Under NS this is drawn inside the fringes. */
   if (windows_or_buffers_changed
-      && (f = XFRAME (WGET (w, frame)),
+      && (f = XFRAME (w->frame),
          width = FRAME_INTERNAL_BORDER_WIDTH (f),
          width != 0)
       && (height = desired_row->visible_height,
@@ -3622,9 +3622,9 @@
   EmacsScroller *bar;
 
   /* optimization; display engine sends WAY too many of these.. */
-  if (!NILP (WGET (window, vertical_scroll_bar)))
+  if (!NILP (window->vertical_scroll_bar))
     {
-      bar = XNS_SCROLL_BAR (WGET (window, vertical_scroll_bar));
+      bar = XNS_SCROLL_BAR (window->vertical_scroll_bar);
       if ([bar checkSamePosition: position portion: portion whole: whole])
         {
           if (view->scrollbarsNeedingUpdate == 0)
@@ -3672,9 +3672,9 @@
   /* we want at least 5 lines to display a scrollbar */
   if (WINDOW_TOTAL_LINES (window) < 5)
     {
-      if (!NILP (WGET (window, vertical_scroll_bar)))
+      if (!NILP (window->vertical_scroll_bar))
         {
-          bar = XNS_SCROLL_BAR (WGET (window, vertical_scroll_bar));
+          bar = XNS_SCROLL_BAR (window->vertical_scroll_bar);
           [bar removeFromSuperview];
           WSET (window, vertical_scroll_bar, Qnil);
         }
@@ -3683,7 +3683,7 @@
       return;
     }
 
-  if (NILP (WGET (window, vertical_scroll_bar)))
+  if (NILP (window->vertical_scroll_bar))
     {
       ns_clear_frame_area (f, sb_left, top, width, height);
       bar = [[EmacsScroller alloc] initFrame: r window: win];
@@ -3692,7 +3692,7 @@
   else
     {
       NSRect oldRect;
-      bar = XNS_SCROLL_BAR (WGET (window, vertical_scroll_bar));
+      bar = XNS_SCROLL_BAR (window->vertical_scroll_bar);
       oldRect = [bar frame];
       r.size.width = oldRect.size.width;
       if (FRAME_LIVE_P (f) && !NSEqualRects (oldRect, r))
@@ -3739,9 +3739,9 @@
 {
   id bar;
   NSTRACE (ns_redeem_scroll_bar);
-  if (!NILP (WGET (window, vertical_scroll_bar)))
+  if (!NILP (window->vertical_scroll_bar))
     {
-      bar = XNS_SCROLL_BAR (WGET (window, vertical_scroll_bar));
+      bar = XNS_SCROLL_BAR (window->vertical_scroll_bar);
       [bar reprieve];
     }
 }
@@ -6061,8 +6061,7 @@
 {
   Lisp_Object str = Qnil;
   struct frame *f = SELECTED_FRAME ();
-  struct buffer *curbuf
-    = XBUFFER (WGET (XWINDOW (f->selected_window), buffer));
+  struct buffer *curbuf = XBUFFER (XWINDOW (f->selected_window)->buffer);
  
   if ([attribute isEqualToString:NSAccessibilityRoleAttribute])
     return NSAccessibilityTextFieldRole;
@@ -6237,7 +6236,7 @@
   if (pixel_height == 0) pixel_height = 1;
   min_portion = 20 / pixel_height;
 
-  frame = XFRAME (WGET (XWINDOW (win), frame));
+  frame = XFRAME (XWINDOW (win)->frame);
   if (FRAME_LIVE_P (frame))
     {
       int i;

=== modified file 'src/print.c'
--- a/src/print.c       2012-08-07 05:29:25 +0000
+++ b/src/print.c       2012-08-07 07:33:18 +0000
@@ -1773,10 +1773,10 @@
          strout ("#<window ", -1, -1, printcharfun);
          len = sprintf (buf, "%d", XWINDOW (obj)->sequence_number);
          strout (buf, len, len, printcharfun);
-         if (!NILP (WGET (XWINDOW (obj), buffer)))
+         if (!NILP (XWINDOW (obj)->buffer))
            {
              strout (" on ", -1, -1, printcharfun);
-             print_string (BVAR (XBUFFER (WGET (XWINDOW (obj), buffer)), name),
+             print_string (BVAR (XBUFFER (XWINDOW (obj)->buffer), name),
                            printcharfun);
            }
          PRINTCHAR ('>');

=== modified file 'src/textprop.c'
--- a/src/textprop.c    2012-08-06 10:24:26 +0000
+++ b/src/textprop.c    2012-08-07 07:33:18 +0000
@@ -587,7 +587,7 @@
   if (WINDOWP (object))
     {
       w = XWINDOW (object);
-      object = WGET (w, buffer);
+      object = w->buffer;
     }
   if (BUFFERP (object))
     {

=== modified file 'src/w32fns.c'
--- a/src/w32fns.c      2012-08-07 05:29:25 +0000
+++ b/src/w32fns.c      2012-08-07 07:33:18 +0000
@@ -5635,13 +5635,13 @@
       WSET (w, total_lines, make_number (40));
     }
 
-  FRAME_TOTAL_COLS (f) = XINT (WGET (w, total_cols));
+  FRAME_TOTAL_COLS (f) = XINT (w->total_cols);
   adjust_glyphs (f);
   w->pseudo_window_p = 1;
 
   /* Display the tooltip text in a temporary buffer.  */
   old_buffer = current_buffer;
-  set_buffer_internal_1 (XBUFFER (WGET (XWINDOW (FRAME_ROOT_WINDOW (f)), 
buffer)));
+  set_buffer_internal_1 (XBUFFER (XWINDOW (FRAME_ROOT_WINDOW (f))->buffer));
   BVAR (current_buffer, truncate_lines) = Qnil;
   clear_glyph_matrix (w->desired_matrix);
   clear_glyph_matrix (w->current_matrix);

=== modified file 'src/w32menu.c'
--- a/src/w32menu.c     2012-08-07 05:29:25 +0000
+++ b/src/w32menu.c     2012-08-07 07:33:18 +0000
@@ -394,7 +394,7 @@
       if (! menubar_widget)
        previous_menu_items_used = 0;
 
-      buffer = WGET (XWINDOW (FRAME_SELECTED_WINDOW (f)), buffer);
+      buffer = XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer;
       specbind (Qinhibit_quit, Qt);
       /* Don't let the debugger step into this code
         because it is not reentrant.  */

=== modified file 'src/w32term.c'
--- a/src/w32term.c     2012-08-07 05:29:25 +0000
+++ b/src/w32term.c     2012-08-07 07:33:18 +0000
@@ -649,7 +649,7 @@
 x_update_window_end (struct window *w, int cursor_on_p,
                     int mouse_face_overwritten_p)
 {
-  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (WGET (w, frame)));
+  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
 
   if (!w->pseudo_window_p)
     {
@@ -754,7 +754,7 @@
      overhead is very small.  */
   if (windows_or_buffers_changed
       && desired_row->full_width_p
-      && (f = XFRAME (WGET (w, frame)),
+      && (f = XFRAME (w->frame),
          width = FRAME_INTERNAL_BORDER_WIDTH (f),
          width != 0)
       && (height = desired_row->visible_height,
@@ -2718,7 +2718,7 @@
 static void
 x_scroll_run (struct window *w, struct run *run)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   int x, y, width, height, from_y, to_y, bottom_y;
   HWND hwnd = FRAME_W32_WINDOW (f);
   HRGN expect_dirty;
@@ -3683,7 +3683,7 @@
 w32_set_vertical_scroll_bar (struct window *w,
                             int portion, int whole, int position)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   Lisp_Object barobj;
   struct scroll_bar *bar;
   int top, height, left, sb_left, width, sb_width;
@@ -3724,7 +3724,7 @@
                             || WINDOW_RIGHT_MARGIN_COLS (w) == 0));
 
   /* Does the scroll bar exist yet?  */
-  if (NILP (WGET (w, vertical_scroll_bar)))
+  if (NILP (w->vertical_scroll_bar))
     {
       HDC hdc;
       BLOCK_INPUT;
@@ -3746,7 +3746,7 @@
       /* It may just need to be moved and resized.  */
       HWND hwnd;
 
-      bar = XSCROLL_BAR (WGET (w, vertical_scroll_bar));
+      bar = XSCROLL_BAR (w->vertical_scroll_bar);
       hwnd = SCROLL_BAR_W32_WINDOW (bar);
 
       /* If already correctly positioned, do nothing.  */
@@ -3853,10 +3853,10 @@
   struct frame *f;
 
   /* We can't redeem this window's scroll bar if it doesn't have one.  */
-  if (NILP (WGET (window, vertical_scroll_bar)))
+  if (NILP (window->vertical_scroll_bar))
     abort ();
 
-  bar = XSCROLL_BAR (WGET (window, vertical_scroll_bar));
+  bar = XSCROLL_BAR (window->vertical_scroll_bar);
 
   /* Unlink it from the condemned list.  */
   f = XFRAME (WINDOW_FRAME (window));
@@ -3864,11 +3864,11 @@
     {
       /* If the prev pointer is nil, it must be the first in one of
          the lists.  */
-      if (EQ (FRAME_SCROLL_BARS (f), WGET (window, vertical_scroll_bar)))
+      if (EQ (FRAME_SCROLL_BARS (f), window->vertical_scroll_bar))
         /* It's not condemned.  Everything's fine.  */
         return;
       else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f),
-                   WGET (window, vertical_scroll_bar)))
+                   window->vertical_scroll_bar))
         FSET (f, condemned_scroll_bars, bar->next);
       else
         /* If its prev pointer is nil, it must be at the front of
@@ -4427,8 +4427,8 @@
                         create event iff we don't leave the
                         selected frame.  */
                      && (focus_follows_mouse
-                         || (EQ (WGET (XWINDOW (window), frame),
-                                 WGET (XWINDOW (selected_window), frame)))))
+                         || (EQ (XWINDOW (window)->frame,
+                                 XWINDOW (selected_window)->frame))))
                    {
                      inev.kind = SELECT_WINDOW_EVENT;
                      inev.frame_or_window = window;
@@ -5043,7 +5043,7 @@
 x_draw_bar_cursor (struct window *w, struct glyph_row *row,
                   int width, enum text_cursor_kinds kind)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   struct glyph *cursor_glyph;
 
   /* If cursor is out of bounds, don't draw garbage.  This can happen

=== modified file 'src/window.c'
--- a/src/window.c      2012-08-07 07:02:04 +0000
+++ b/src/window.c      2012-08-07 07:33:18 +0000
@@ -176,7 +176,7 @@
 If WINDOW is omitted or nil, it defaults to the selected window.  */)
   (Lisp_Object window)
 {
-  return WGET (decode_any_window (window), frame);
+  return decode_any_window (window)->frame;
 }
 
 DEFUN ("frame-root-window", Fframe_root_window, Sframe_root_window, 0, 1, 0,
@@ -242,12 +242,12 @@
       window = XFRAME (frame_or_window)->root_window;
     }
 
-  while (NILP (WGET (XWINDOW (window), buffer)))
+  while (NILP (XWINDOW (window)->buffer))
     {
-      if (! NILP (WGET (XWINDOW (window), hchild)))
-       window = WGET (XWINDOW (window), hchild);
-      else if (! NILP (WGET (XWINDOW (window), vchild)))
-       window = WGET (XWINDOW (window), vchild);
+      if (! NILP (XWINDOW (window)->hchild))
+       window = XWINDOW (window)->hchild;
+      else if (! NILP (XWINDOW (window)->vchild))
+       window = XWINDOW (window)->vchild;
       else
        abort ();
     }
@@ -335,7 +335,7 @@
   if (NILP (norecord))
     {
       w->use_time = ++window_select_count;
-      record_buffer (WGET (w, buffer));
+      record_buffer (w->buffer);
     }
 
   if (EQ (window, selected_window) && !inhibit_point_swap)
@@ -363,17 +363,17 @@
   if (!inhibit_point_swap)
     {
       ow = XWINDOW (selected_window);
-      if (! NILP (WGET (ow, buffer)))
-       set_marker_both (WGET (ow, pointm), WGET (ow, buffer),
-                        BUF_PT (XBUFFER (WGET (ow, buffer))),
-                        BUF_PT_BYTE (XBUFFER (WGET (ow, buffer))));
+      if (! NILP (ow->buffer))
+       set_marker_both (ow->pointm, ow->buffer,
+                        BUF_PT (XBUFFER (ow->buffer)),
+                        BUF_PT_BYTE (XBUFFER (ow->buffer)));
     }
 
   selected_window = window;
 
-  Fset_buffer (WGET (w, buffer));
+  Fset_buffer (w->buffer);
 
-  BVAR (XBUFFER (WGET (w, buffer)), last_selected_window) = window;
+  BVAR (XBUFFER (w->buffer), last_selected_window) = window;
 
   /* Go to the point recorded in the window.
      This is important when the buffer is in more
@@ -381,7 +381,7 @@
      redisplay_window has altered point after scrolling,
      because it makes the change only in the window.  */
   {
-    register ptrdiff_t new_point = marker_position (WGET (w, pointm));
+    register ptrdiff_t new_point = marker_position (w->pointm);
     if (new_point < BEGV)
       SET_PT (BEGV);
     else if (new_point > ZV)
@@ -416,7 +416,7 @@
 Return nil for an internal window or a deleted window.  */)
   (Lisp_Object window)
 {
-  return WGET (decode_any_window (window), buffer);
+  return decode_any_window (window)->buffer;
 }
 
 DEFUN ("window-parent", Fwindow_parent, Swindow_parent, 0, 1, 0,
@@ -425,7 +425,7 @@
 Return nil for a window with no parent (e.g. a root window).  */)
   (Lisp_Object window)
 {
-  return WGET (decode_any_window (window), parent);
+  return decode_any_window (window)->parent;
 }
 
 DEFUN ("window-top-child", Fwindow_top_child, Swindow_top_child, 1, 1, 0,
@@ -436,7 +436,7 @@
   (Lisp_Object window)
 {
   CHECK_WINDOW (window);
-  return WGET (decode_any_window (window), vchild);
+  return decode_any_window (window)->vchild;
 }
 
 DEFUN ("window-left-child", Fwindow_left_child, Swindow_left_child, 1, 1, 0,
@@ -447,7 +447,7 @@
   (Lisp_Object window)
 {
   CHECK_WINDOW (window);
-  return WGET (decode_any_window (window), hchild);
+  return decode_any_window (window)->hchild;
 }
 
 DEFUN ("window-next-sibling", Fwindow_next_sibling, Swindow_next_sibling, 0, 
1, 0,
@@ -456,7 +456,7 @@
 Return nil if WINDOW has no next sibling.  */)
   (Lisp_Object window)
 {
-  return WGET (decode_any_window (window), next);
+  return decode_any_window (window)->next;
 }
 
 DEFUN ("window-prev-sibling", Fwindow_prev_sibling, Swindow_prev_sibling, 0, 
1, 0,
@@ -465,7 +465,7 @@
 Return nil if WINDOW has no previous sibling.  */)
   (Lisp_Object window)
 {
-  return WGET (decode_any_window (window), prev);
+  return decode_any_window (window)->prev;
 }
 
 DEFUN ("window-combination-limit", Fwindow_combination_limit, 
Swindow_combination_limit, 1, 1, 0,
@@ -475,7 +475,7 @@
 WINDOW are never \(re-)combined with WINDOW's siblings.  */)
   (Lisp_Object window)
 {
-  return WGET (decode_any_window (window), combination_limit);
+  return decode_any_window (window)->combination_limit;
 }
 
 DEFUN ("set-window-combination-limit", Fset_window_combination_limit, 
Sset_window_combination_limit, 2, 2, 0,
@@ -512,7 +512,7 @@
 integer multiple of the default character height.  */)
   (Lisp_Object window)
 {
-  return WGET (decode_any_window (window), total_lines);
+  return decode_any_window (window)->total_lines;
 }
 
 DEFUN ("window-total-width", Fwindow_total_width, Swindow_total_width, 0, 1, 0,
@@ -527,7 +527,7 @@
 integer multiple of the default character width.  */)
   (Lisp_Object window)
 {
-  return WGET (decode_any_window (window), total_cols);
+  return decode_any_window (window)->total_cols;
 }
 
 DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0,
@@ -535,7 +535,7 @@
 If WINDOW is omitted or nil, it defaults to the selected window.   */)
   (Lisp_Object window)
 {
-  return WGET (decode_any_window (window), new_total);
+  return decode_any_window (window)->new_total;
 }
 
 DEFUN ("window-normal-size", Fwindow_normal_size, Swindow_normal_size, 0, 2, 0,
@@ -544,10 +544,9 @@
 If HORIZONTAL is non-nil, return the normal width of WINDOW.  */)
   (Lisp_Object window, Lisp_Object horizontal)
 {
-  if (NILP (horizontal))
-    return WGET (decode_any_window (window), normal_lines);
-  else
-    return WGET (decode_any_window (window), normal_cols);
+  struct window *w = decode_any_window (window);
+
+  return NILP (horizontal) ? w->normal_lines : w->normal_cols;
 }
 
 DEFUN ("window-new-normal", Fwindow_new_normal, Swindow_new_normal, 0, 1, 0,
@@ -555,7 +554,7 @@
 If WINDOW is omitted or nil, it defaults to the selected window.  */)
   (Lisp_Object window)
 {
-  return WGET (decode_any_window (window), new_normal);
+  return decode_any_window (window)->new_normal;
 }
 
 DEFUN ("window-left-column", Fwindow_left_column, Swindow_left_column, 0, 1, 0,
@@ -567,7 +566,7 @@
 If WINDOW is omitted or nil, it defaults to the selected window.  */)
   (Lisp_Object window)
 {
-  return WGET (decode_any_window (window), left_col);
+  return decode_any_window (window)->left_col;
 }
 
 DEFUN ("window-top-line", Fwindow_top_line, Swindow_top_line, 0, 1, 0,
@@ -579,7 +578,7 @@
 If WINDOW is omitted or nil, it defaults to the selected window.  */)
   (Lisp_Object window)
 {
-  return WGET (decode_any_window (window), top_line);
+  return decode_any_window (window)->top_line;
 }
 
 /* Return the number of lines of W's body.  Don't count any mode or
@@ -588,7 +587,7 @@
 static int
 window_body_lines (struct window *w)
 {
-  int height = XFASTINT (WGET (w, total_lines));
+  int height = XFASTINT (w->total_lines);
 
   if (!MINI_WINDOW_P (w))
     {
@@ -610,7 +609,7 @@
 window_body_cols (struct window *w)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
-  int width = XINT (WGET (w, total_cols));
+  int width = XINT (w->total_cols);
 
   if (WINDOW_HAS_VERTICAL_SCROLL_BAR (w))
     /* Scroll bars occupy a few columns.  */
@@ -685,7 +684,7 @@
 
   /* Prevent redisplay shortcuts when changing the hscroll.  */
   if (w->hscroll != new_hscroll)
-    XBUFFER (WGET (w, buffer))->prevent_redisplay_optimizations_p = 1;
+    XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1;
 
   w->hscroll = new_hscroll;
   return make_number (new_hscroll);
@@ -714,7 +713,7 @@
 See `set-window-redisplay-end-trigger' for more information.  */)
   (Lisp_Object window)
 {
-  return WGET (decode_window (window), redisplay_end_trigger);
+  return decode_window (window)->redisplay_end_trigger;
 }
 
 DEFUN ("set-window-redisplay-end-trigger", Fset_window_redisplay_end_trigger,
@@ -744,7 +743,7 @@
   (Lisp_Object window)
 {
   register struct window *w = decode_any_window (window);
-  CHECK_LIVE_FRAME (WGET (w, frame));
+  CHECK_LIVE_FRAME (w->frame);
 
   return Fcons (make_number (WINDOW_LEFT_EDGE_COL (w)),
         Fcons (make_number (WINDOW_TOP_EDGE_LINE (w)),
@@ -766,7 +765,7 @@
   (Lisp_Object window)
 {
   register struct window *w = decode_any_window (window);
-  CHECK_LIVE_FRAME (WGET (w, frame));
+  CHECK_LIVE_FRAME (w->frame);
 
   return Fcons (make_number (WINDOW_LEFT_EDGE_X (w)),
         Fcons (make_number (WINDOW_TOP_EDGE_Y (w)),
@@ -778,7 +777,7 @@
 static void
 calc_absolute_offset (struct window *w, int *add_x, int *add_y)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   *add_y = f->top_pos;
 #ifdef FRAME_MENUBAR_HEIGHT
   *add_y += FRAME_MENUBAR_HEIGHT (f);
@@ -813,7 +812,7 @@
   register struct window *w = decode_any_window (window);
   int add_x, add_y;
 
-  CHECK_LIVE_FRAME (WGET (w, frame));
+  CHECK_LIVE_FRAME (w->frame);
   calc_absolute_offset (w, &add_x, &add_y);
 
   return Fcons (make_number (WINDOW_LEFT_EDGE_X (w) + add_x),
@@ -1090,7 +1089,7 @@
 
   CHECK_LIVE_WINDOW (window);
   w = XWINDOW (window);
-  f = XFRAME (WGET (w, frame));
+  f = XFRAME (w->frame);
   CHECK_CONS (coordinates);
   lx = Fcar (coordinates);
   ly = Fcdr (coordinates);
@@ -1270,9 +1269,9 @@
   register struct window *w = decode_window (window);
 
   if (w == XWINDOW (selected_window)
-      && current_buffer == XBUFFER (WGET (w, buffer)))
+      && current_buffer == XBUFFER (w->buffer))
     return Fpoint ();
-  return Fmarker_position (WGET (w, pointm));
+  return Fmarker_position (w->pointm);
 }
 
 DEFUN ("window-start", Fwindow_start, Swindow_start, 0, 1, 0,
@@ -1281,7 +1280,7 @@
 This is updated by redisplay or by calling `set-window-start'.  */)
   (Lisp_Object window)
 {
-  return Fmarker_position (WGET (decode_window (window), start));
+  return Fmarker_position (decode_window (window)->start);
 }
 
 /* This is text temporarily removed from the doc string below.
@@ -1312,7 +1311,7 @@
   Lisp_Object buf;
   struct buffer *b;
 
-  buf = WGET (w, buffer);
+  buf = w->buffer;
   CHECK_BUFFER (buf);
   b = XBUFFER (buf);
 
@@ -1321,12 +1320,12 @@
      The user can compute it with vertical-motion if he wants to.
      It would be nicer to do it automatically,
      but that's so slow that it would probably bother people.  */
-  if (NILP (WGET (w, window_end_valid)))
+  if (NILP (w->window_end_valid))
     return Qnil;
 #endif
 
   if (! NILP (update)
-      && ! (! NILP (WGET (w, window_end_valid))
+      && ! (! NILP (w->window_end_valid)
            && w->last_modified >= BUF_MODIFF (b)
            && w->last_overlay_modified >= BUF_OVERLAY_MODIFF (b))
       && !noninteractive)
@@ -1349,12 +1348,12 @@
          `-l' containing a call to `rmail' with subsequent other
          commands.  At the end, W->start happened to be BEG, while
          rmail had already narrowed the buffer.  */
-      if (XMARKER (WGET (w, start))->charpos < BEGV)
+      if (XMARKER (w->start)->charpos < BEGV)
        SET_TEXT_POS (startp, BEGV, BEGV_BYTE);
-      else if (XMARKER (WGET (w, start))->charpos > ZV)
+      else if (XMARKER (w->start)->charpos > ZV)
        SET_TEXT_POS (startp, ZV, ZV_BYTE);
       else
-       SET_TEXT_POS_FROM_MARKER (startp, WGET (w, start));
+       SET_TEXT_POS_FROM_MARKER (startp, w->start);
 
       itdata = bidi_shelve_cache ();
       start_display (&it, w, startp);
@@ -1368,7 +1367,7 @@
        set_buffer_internal (old_buffer);
     }
   else
-    XSETINT (value, BUF_Z (b) - XFASTINT (WGET (w, window_end_pos)));
+    XSETINT (value, BUF_Z (b) - XFASTINT (w->window_end_pos));
 
   return value;
 }
@@ -1382,10 +1381,10 @@
 
   CHECK_NUMBER_COERCE_MARKER (pos);
   if (w == XWINDOW (selected_window)
-      && XBUFFER (WGET (w, buffer)) == current_buffer)
+      && XBUFFER (w->buffer) == current_buffer)
     Fgoto_char (pos);
   else
-    set_marker_restricted (WGET (w, pointm), pos, WGET (w, buffer));
+    set_marker_restricted (w->pointm, pos, w->buffer);
 
   /* We have to make sure that redisplay updates the window to show
      the new value of point.  */
@@ -1405,7 +1404,7 @@
   register struct window *w = decode_window (window);
 
   CHECK_NUMBER_COERCE_MARKER (pos);
-  set_marker_restricted (WGET (w, start), pos, WGET (w, buffer));
+  set_marker_restricted (w->start, pos, w->buffer);
   /* this is not right, but much easier than doing what is right. */
   w->start_at_line_beg = 0;
   if (NILP (noforce))
@@ -1447,8 +1446,8 @@
   int x, y;
 
   w = decode_window (window);
-  buf = XBUFFER (WGET (w, buffer));
-  SET_TEXT_POS_FROM_MARKER (top, WGET (w, start));
+  buf = XBUFFER (w->buffer);
+  SET_TEXT_POS_FROM_MARKER (top, w->start);
 
   if (EQ (pos, Qt))
     posint = -1;
@@ -1460,7 +1459,7 @@
   else if (w == XWINDOW (selected_window))
     posint = PT;
   else
-    posint = XMARKER (WGET (w, pointm))->charpos;
+    posint = XMARKER (w->pointm)->charpos;
 
   /* If position is above window start or outside buffer boundaries,
      or if window start is out of range, position is not visible.  */
@@ -1517,11 +1516,11 @@
   if (noninteractive || w->pseudo_window_p)
     return Qnil;
 
-  CHECK_BUFFER (WGET (w, buffer));
-  b = XBUFFER (WGET (w, buffer));
+  CHECK_BUFFER (w->buffer);
+  b = XBUFFER (w->buffer);
 
   /* Fail if current matrix is not up-to-date.  */
-  if (NILP (WGET (w, window_end_valid))
+  if (NILP (w->window_end_valid)
       || current_buffer->clip_changed
       || current_buffer->prevent_redisplay_optimizations_p
       || w->last_modified < BUF_MODIFF (b)
@@ -1614,7 +1613,7 @@
 is the value returned by `window-dedicated-p' is t.  */)
   (Lisp_Object window)
 {
-  return WGET (decode_window (window), dedicated);
+  return decode_window (window)->dedicated;
 }
 
 DEFUN ("set-window-dedicated-p", Fset_window_dedicated_p,
@@ -1651,7 +1650,7 @@
 window for that buffer, and POS is a window-specific point value.  */)
   (Lisp_Object window)
 {
-  return WGET (decode_window (window), prev_buffers);
+  return decode_window (window)->prev_buffers;
 }
 
 DEFUN ("set-window-prev-buffers", Fset_window_prev_buffers,
@@ -1673,7 +1672,7 @@
 WINDOW must be a live window and defaults to the selected one.  */)
      (Lisp_Object window)
 {
-  return WGET (decode_window (window), next_buffers);
+  return decode_window (window)->next_buffers;
 }
 
 DEFUN ("set-window-next-buffers", Fset_window_next_buffers,
@@ -1693,7 +1692,7 @@
 elements of the form (PARAMETER . VALUE).  */)
   (Lisp_Object window)
 {
-  return Fcopy_alist (WGET (decode_any_window (window), window_parameters));
+  return Fcopy_alist (decode_any_window (window)->window_parameters);
 }
 
 DEFUN ("window-parameter", Fwindow_parameter, Swindow_parameter,
@@ -1704,8 +1703,7 @@
 {
   Lisp_Object result;
 
-  result = Fassq (parameter, WGET (decode_any_window (window),
-                                  window_parameters));
+  result = Fassq (parameter, decode_any_window (window)->window_parameters);
   return CDR_SAFE (result);
 }
 
@@ -1718,10 +1716,10 @@
   register struct window *w = decode_any_window (window);
   Lisp_Object old_alist_elt;
 
-  old_alist_elt = Fassq (parameter, WGET (w, window_parameters));
+  old_alist_elt = Fassq (parameter, w->window_parameters);
   if (NILP (old_alist_elt))
     WSET (w, window_parameters,
-         Fcons (Fcons (parameter, value), WGET (w, window_parameters)));
+         Fcons (Fcons (parameter, value), w->window_parameters));
   else
     Fsetcdr (old_alist_elt, value);
   return value;
@@ -1733,7 +1731,7 @@
 WINDOW defaults to the selected window.  */)
   (Lisp_Object window)
 {
-  return WGET (decode_window (window), display_table);
+  return decode_window (window)->display_table;
 }
 
 /* Get the display table for use on window W.  This is either W's
@@ -1746,11 +1744,11 @@
 {
   struct Lisp_Char_Table *dp = NULL;
 
-  if (DISP_TABLE_P (WGET (w, display_table)))
-    dp = XCHAR_TABLE (WGET (w, display_table));
-  else if (BUFFERP (WGET (w, buffer)))
+  if (DISP_TABLE_P (w->display_table))
+    dp = XCHAR_TABLE (w->display_table);
+  else if (BUFFERP (w->buffer))
     {
-      struct buffer *b = XBUFFER (WGET (w, buffer));
+      struct buffer *b = XBUFFER (w->buffer);
 
       if (DISP_TABLE_P (BVAR (b, display_table)))
        dp = XCHAR_TABLE (BVAR (b, display_table));
@@ -1776,14 +1774,14 @@
   Lisp_Object buf;
   struct buffer *b;
 
-  buf = WGET (w, buffer);
+  buf = w->buffer;
   b = XBUFFER (buf);
-  if (b != XMARKER (WGET (w, pointm))->buffer)
+  if (b != XMARKER (w->pointm)->buffer)
     abort ();
 
 #if 0
   if (w == XWINDOW (selected_window)
-      || ! EQ (buf, WGET (XWINDOW (selected_window), buffer)))
+      || ! EQ (buf, XWINDOW (selected_window)->buffer))
     /* Do this except when the selected window's buffer
        is being removed from some other window.  */
 #endif
@@ -1794,22 +1792,22 @@
        selected window, while last_window_start reflects another
        window which was recently showing the same buffer.
        Some people might say that might be a good thing.  Let's see.  */
-    b->last_window_start = marker_position (WGET (w, start));
+    b->last_window_start = marker_position (w->start);
 
   /* Point in the selected window's buffer
      is actually stored in that buffer, and the window's pointm isn't used.
      So don't clobber point in that buffer.  */
-  if (! EQ (buf, WGET (XWINDOW (selected_window), buffer))
+  if (! EQ (buf, XWINDOW (selected_window)->buffer)
       /* This line helps to fix Horsley's testbug.el bug.  */
       && !(WINDOWP (BVAR (b, last_selected_window))
           && w != XWINDOW (BVAR (b, last_selected_window))
-          && EQ (buf, WGET (XWINDOW (BVAR (b, last_selected_window)), 
buffer))))
+          && EQ (buf, XWINDOW (BVAR (b, last_selected_window))->buffer)))
     temp_set_point_both (b,
                         clip_to_bounds (BUF_BEGV (b),
-                                        XMARKER (WGET (w, pointm))->charpos,
+                                        XMARKER (w->pointm)->charpos,
                                         BUF_ZV (b)),
                         clip_to_bounds (BUF_BEGV_BYTE (b),
-                                        marker_byte_position (WGET (w, 
pointm)),
+                                        marker_byte_position (w->pointm),
                                         BUF_ZV_BYTE (b)));
 
   if (WINDOWP (BVAR (b, last_selected_window))
@@ -1828,18 +1826,18 @@
 
   /* If OLD is its frame's root window, then NEW is the new
      root window for that frame.  */
-  if (EQ (old, FRAME_ROOT_WINDOW (XFRAME (WGET (o, frame)))))
-    FSET (XFRAME (WGET (o, frame)), root_window, new);
+  if (EQ (old, FRAME_ROOT_WINDOW (XFRAME (o->frame))))
+    FSET (XFRAME (o->frame), root_window, new);
 
    if (setflag)
      {
-      WSET (n, left_col, WGET (o, left_col));
-      WSET (n, top_line, WGET (o, top_line));
-      WSET (n, total_cols, WGET (o, total_cols));
-      WSET (n, total_lines, WGET (o, total_lines));
-      WSET (n, normal_cols, WGET (o, normal_cols));
+      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, WGET (o, normal_lines));
+      WSET (n, normal_lines, o->normal_lines);
       WSET (o, normal_lines, make_float (1.0));
       n->desired_matrix = n->current_matrix = 0;
       n->vscroll = 0;
@@ -1856,23 +1854,23 @@
       n->frozen_window_start_p = 0;
     }
 
-  tem = WGET (o, next);
+  tem = o->next;
   WSET (n, next, tem);
   if (!NILP (tem))
     WSET (XWINDOW (tem), prev, new);
 
-  tem = WGET (o, prev);
+  tem = o->prev;
   WSET (n, prev, tem);
   if (!NILP (tem))
     WSET (XWINDOW (tem), next, new);
 
-  tem = WGET (o, parent);
+  tem = o->parent;
   WSET (n, parent, tem);
   if (!NILP (tem))
     {
-      if (EQ (WGET (XWINDOW (tem), vchild), old))
+      if (EQ (XWINDOW (tem)->vchild, old))
        WSET (XWINDOW (tem), vchild, new);
-      if (EQ (WGET (XWINDOW (tem), hchild), old))
+      if (EQ (XWINDOW (tem)->hchild, old))
        WSET (XWINDOW (tem), hchild, new);
     }
 }
@@ -1889,30 +1887,30 @@
   int horflag;
 
   w = XWINDOW (window);
-  parent = WGET (w, parent);
-  if (!NILP (parent) && NILP (WGET (w, combination_limit)))
+  parent = w->parent;
+  if (!NILP (parent) && NILP (w->combination_limit))
     {
       p = XWINDOW (parent);
-      if (((!NILP (WGET (p, vchild)) && !NILP (WGET (w, vchild)))
-          || (!NILP (WGET (p, hchild)) && !NILP (WGET (w, hchild)))))
+      if (((!NILP (p->vchild) && !NILP (w->vchild))
+          || (!NILP (p->hchild) && !NILP (w->hchild))))
        /* WINDOW and PARENT are both either a vertical or a horizontal
           combination.  */
        {
-         horflag = NILP (WGET (w, vchild));
-         child = horflag ? WGET (w, hchild) : WGET (w, vchild);
+         horflag = NILP (w->vchild);
+         child = horflag ? w->hchild : w->vchild;
          c = XWINDOW (child);
 
          /* Splice WINDOW's children into its parent's children and
             assign new normal sizes.  */
-         if (NILP (WGET (w, prev)))
+         if (NILP (w->prev))
            if (horflag)
              WSET (p, hchild, child);
            else
              WSET (p, vchild, child);
          else
            {
-             WSET (c, prev, WGET (w, prev));
-             WSET (XWINDOW (WGET (w, prev)), next, child);
+             WSET (c, prev, w->prev);
+             WSET (XWINDOW (w->prev), next, child);
            }
 
          while (c)
@@ -1921,26 +1919,26 @@
 
              if (horflag)
                WSET (c, normal_cols,
-                     make_float (XFLOATINT (WGET (c, total_cols))
-                                 / XFLOATINT (WGET (p, total_cols))));
+                     make_float (XFLOATINT (c->total_cols)
+                                 / XFLOATINT (p->total_cols)));
              else
                WSET (c, normal_lines,
-                     make_float (XFLOATINT (WGET (c, total_lines))
-                                 / XFLOATINT (WGET (p, total_lines))));
+                     make_float (XFLOATINT (c->total_lines)
+                                 / XFLOATINT (p->total_lines)));
 
-             if (NILP (WGET (c, next)))
+             if (NILP (c->next))
                {
-                 if (!NILP (WGET (w, next)))
+                 if (!NILP (w->next))
                    {
-                     WSET (c, next, WGET (w, next));
-                     WSET (XWINDOW (WGET (c, next)), prev, child);
+                     WSET (c, next, w->next);
+                     WSET (XWINDOW (c->next), prev, child);
                    }
 
                  c = 0;
                }
              else
                {
-                 child = WGET (c, next);
+                 child = c->next;
                  c = XWINDOW (child);
                }
            }
@@ -2030,10 +2028,10 @@
 candidate_window_p (Lisp_Object window, Lisp_Object owindow, Lisp_Object 
minibuf, Lisp_Object all_frames)
 {
   struct window *w = XWINDOW (window);
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   int candidate_p = 1;
 
-  if (!BUFFERP (WGET (w, buffer)))
+  if (!BUFFERP (w->buffer))
     candidate_p = 0;
   else if (MINI_WINDOW_P (w)
            && (EQ (minibuf, Qlambda)
@@ -2048,13 +2046,13 @@
   else if (NILP (all_frames))
     {
       eassert (WINDOWP (owindow));
-      candidate_p = EQ (WGET (w, frame), WGET (XWINDOW (owindow), frame));
+      candidate_p = EQ (w->frame, XWINDOW (owindow)->frame);
     }
   else if (EQ (all_frames, Qvisible))
     {
       FRAME_SAMPLE_VISIBILITY (f);
       candidate_p = FRAME_VISIBLE_P (f)
-       && (FRAME_TERMINAL (XFRAME (WGET (w, frame)))
+       && (FRAME_TERMINAL (XFRAME (w->frame))
            == FRAME_TERMINAL (XFRAME (selected_frame)));
 
     }
@@ -2073,15 +2071,15 @@
                         && !f->output_data.x->has_been_visible)
 #endif
                     )
-       && (FRAME_TERMINAL (XFRAME (WGET (w, frame)))
+       && (FRAME_TERMINAL (XFRAME (w->frame))
            == FRAME_TERMINAL (XFRAME (selected_frame)));
     }
   else if (WINDOWP (all_frames))
     candidate_p = (EQ (FRAME_MINIBUF_WINDOW (f), all_frames)
-                  || EQ (WGET (XWINDOW (all_frames), frame), WGET (w, frame))
-                  || EQ (WGET (XWINDOW (all_frames), frame), FRAME_FOCUS_FRAME 
(f)));
+                  || EQ (XWINDOW (all_frames)->frame, w->frame)
+                  || EQ (XWINDOW (all_frames)->frame, FRAME_FOCUS_FRAME (f)));
   else if (FRAMEP (all_frames))
-    candidate_p = EQ (all_frames, WGET (w, frame));
+    candidate_p = EQ (all_frames, w->frame);
 
   return candidate_p;
 }
@@ -2114,7 +2112,7 @@
   if (NILP (*all_frames))
     *all_frames 
       = (!EQ (*minibuf, Qlambda)
-        ? FRAME_MINIBUF_WINDOW (XFRAME (WGET (XWINDOW (*window), frame)))
+        ? FRAME_MINIBUF_WINDOW (XFRAME (XWINDOW (*window)->frame))
         : Qnil);
   else if (EQ (*all_frames, Qvisible))
     ;
@@ -2140,7 +2138,7 @@
   /* If ALL_FRAMES is a frame, and WINDOW isn't on that frame, just
      return the first window on the frame.  */
   if (FRAMEP (all_frames)
-      && !EQ (all_frames, WGET (XWINDOW (window), frame)))
+      && !EQ (all_frames, XWINDOW (window)->frame))
     return Fframe_first_window (all_frames);
 
   if (next_p)
@@ -2320,7 +2318,7 @@
   if (NILP (frame))
     frame = selected_frame;
 
-  if (!EQ (frame, WGET (XWINDOW (window), frame)))
+  if (!EQ (frame, XWINDOW (window)->frame))
     error ("Window is on a different frame");
 
   return window_list_1 (window, minibuf, frame);
@@ -2441,7 +2439,7 @@
        switch (type)
          {
          case GET_BUFFER_WINDOW:
-           if (EQ (WGET (w, buffer), obj)
+           if (EQ (w->buffer, obj)
                /* Don't find any minibuffer window except the one that
                   is currently in use.  */
                && (MINI_WINDOW_P (w) ? EQ (window, minibuf_window) : 1))
@@ -2449,7 +2447,7 @@
                if (EQ (window, selected_window))
                  /* Preferably return the selected window.  */
                  RETURN_UNGCPRO (window);
-               else if (EQ (WGET (XWINDOW (window), frame), selected_frame)
+               else if (EQ (XWINDOW (window)->frame, selected_frame)
                         && !frame_best_window_flag)
                  /* Prefer windows on the current frame (but don't
                     choose another one if we have one already).  */
@@ -2465,25 +2463,25 @@
          case REPLACE_BUFFER_IN_WINDOWS_SAFELY:
            /* We could simply check whether the buffer shown by window
               is live, and show another buffer in case it isn't.  */
-           if (EQ (WGET (w, buffer), obj))
+           if (EQ (w->buffer, obj))
              {
                /* Undedicate WINDOW.  */
                WSET (w, dedicated, Qnil);
                /* Make WINDOW show the buffer returned by
                   other_buffer_safely, don't run any hooks.  */
                set_window_buffer
-                 (window, other_buffer_safely (WGET (w, buffer)), 0, 0);
+                 (window, other_buffer_safely (w->buffer), 0, 0);
                /* If WINDOW is the selected window, make its buffer
                   current.  But do so only if the window shows the
                   current buffer (Bug#6454).  */
                if (EQ (window, selected_window)
-                   && XBUFFER (WGET (w, buffer)) == current_buffer)
-                 Fset_buffer (WGET (w, buffer));
+                   && XBUFFER (w->buffer) == current_buffer)
+                 Fset_buffer (w->buffer);
              }
            break;
 
          case REDISPLAY_BUFFER_WINDOWS:
-           if (EQ (WGET (w, buffer), obj))
+           if (EQ (w->buffer, obj))
              {
                mark_window_display_accurate (window, 0);
                w->update_mode_line = 1;
@@ -2495,8 +2493,8 @@
 
            /* Check for a window that has a killed buffer.  */
          case CHECK_ALL_WINDOWS:
-           if (! NILP (WGET (w, buffer))
-               && NILP (BVAR (XBUFFER (WGET (w, buffer)), name)))
+           if (! NILP (w->buffer)
+               && NILP (BVAR (XBUFFER (w->buffer), name)))
              abort ();
            break;
 
@@ -2582,9 +2580,9 @@
   int top IF_LINT (= 0), new_top, resize_failed;
 
   w = decode_any_window (window);
-  CHECK_LIVE_FRAME (WGET (w, frame));
+  CHECK_LIVE_FRAME (w->frame);
   XSETWINDOW (window, w);
-  f = XFRAME (WGET (w, frame));
+  f = XFRAME (w->frame);
 
   if (NILP (root))
     /* ROOT is the frame's root window.  */
@@ -2596,13 +2594,13 @@
     /* ROOT must be an ancestor of WINDOW.  */
     {
       r = decode_any_window (root);
-      CHECK_LIVE_FRAME (WGET (r, frame));
-      pwindow = WGET (XWINDOW (window), parent);
+      CHECK_LIVE_FRAME (r->frame);
+      pwindow = XWINDOW (window)->parent;
       while (!NILP (pwindow))
        if (EQ (pwindow, root))
          break;
        else
-         pwindow = WGET (XWINDOW (pwindow), parent);
+         pwindow = XWINDOW (pwindow)->parent;
       if (!EQ (pwindow, root))
        error ("Specified root is not an ancestor of specified window");
     }
@@ -2616,15 +2614,15 @@
   else if (MINI_WINDOW_P (w)) /* && top > 0) */
     error ("Can't expand minibuffer to full frame");
 
-  if (!NILP (WGET (w, buffer)))
+  if (!NILP (w->buffer))
     {
-      startpos = marker_position (WGET (w, start));
+      startpos = marker_position (w->start);
       top = WINDOW_TOP_EDGE_LINE (w)
        - FRAME_TOP_MARGIN (XFRAME (WINDOW_FRAME (w)));
       /* Make sure WINDOW is the frame's selected window.  */
       if (!EQ (window, FRAME_SELECTED_WINDOW (f)))
        {
-         if (EQ (selected_frame, WGET (w, frame)))
+         if (EQ (selected_frame, w->frame))
            Fselect_window (window, Qnil);
          else
            FSET (f, selected_window, window);
@@ -2641,7 +2639,7 @@
        {
          pwindow = swindow;
          while (!NILP (pwindow) && !EQ (window, pwindow))
-           pwindow = WGET (XWINDOW (pwindow), parent);
+           pwindow = XWINDOW (pwindow)->parent;
 
          if (EQ (window, pwindow))
            /* If WINDOW is an ancestor of SWINDOW, then SWINDOW is ok
@@ -2654,7 +2652,7 @@
 
       if (!EQ (swindow, FRAME_SELECTED_WINDOW (f)))
        {
-         if (EQ (selected_frame, WGET (w, frame)))
+         if (EQ (selected_frame, w->frame))
            Fselect_window (swindow, Qnil);
          else
            FSET (f, selected_window, swindow);
@@ -2687,12 +2685,12 @@
   FRAME_WINDOW_SIZES_CHANGED (f) = 1;
   resize_failed = 0;
 
-  if (NILP (WGET (w, buffer)))
+  if (NILP (w->buffer))
     {
       /* Resize child windows vertically.  */
-      XSETINT (delta, XINT (WGET (r, total_lines))
-              - XINT (WGET (w, total_lines)));
-      WSET (w, top_line, WGET (r, top_line));
+      XSETINT (delta, XINT (r->total_lines)
+              - XINT (w->total_lines));
+      WSET (w, top_line, r->top_line);
       resize_root_window (window, delta, Qnil, Qnil);
       if (window_resize_check (w, 0))
        window_resize_apply (w, 0);
@@ -2708,10 +2706,10 @@
       /* Resize child windows horizontally.  */
       if (!resize_failed)
        {
-         WSET (w, left_col, WGET (r, left_col));
-         XSETINT (delta, XINT (WGET (r, total_cols)) 
-                  - XINT (WGET (w, total_cols)));
-         WSET (w, left_col, WGET (r, left_col));
+         WSET (w, left_col, r->left_col);
+         XSETINT (delta, XINT (r->total_cols) 
+                  - XINT (w->total_cols));
+         WSET (w, left_col, r->left_col);
          resize_root_window (window, delta, Qt, Qnil);
          if (window_resize_check (w, 1))
            window_resize_apply (w, 1);
@@ -2734,43 +2732,43 @@
     }
 
   /* Cleanly unlink WINDOW from window-tree.  */
-  if (!NILP (WGET (w, prev)))
+  if (!NILP (w->prev))
     /* Get SIBLING above (on the left of) WINDOW.  */
     {
-      sibling = WGET (w, prev);
+      sibling = w->prev;
       s = XWINDOW (sibling);
-      WSET (s, next, WGET (w, next));
-      if (!NILP (WGET (s, next)))
-       WSET (XWINDOW (WGET (s, next)), prev, sibling);
+      WSET (s, next, w->next);
+      if (!NILP (s->next))
+       WSET (XWINDOW (s->next), prev, sibling);
     }
   else
     /* Get SIBLING below (on the right of) WINDOW.  */
     {
-      sibling = WGET (w, next);
+      sibling = w->next;
       s = XWINDOW (sibling);
       WSET (s, prev, Qnil);
-      if (!NILP (WGET (XWINDOW (WGET (w, parent)), vchild)))
-       WSET (XWINDOW (WGET (w, parent)), vchild, sibling);
+      if (!NILP (XWINDOW (w->parent)->vchild))
+       WSET (XWINDOW (w->parent), vchild, sibling);
       else
-       WSET (XWINDOW (WGET (w, parent)), hchild, sibling);
+       WSET (XWINDOW (w->parent), hchild, sibling);
     }
 
   /* Delete ROOT and all child windows of ROOT.  */
-  if (!NILP (WGET (r, vchild)))
+  if (!NILP (r->vchild))
     {
-      delete_all_child_windows (WGET (r, vchild));
+      delete_all_child_windows (r->vchild);
       WSET (r, vchild, Qnil);
     }
-  else if (!NILP (WGET (r, hchild)))
+  else if (!NILP (r->hchild))
     {
-      delete_all_child_windows (WGET (r, hchild));
+      delete_all_child_windows (r->hchild);
       WSET (r, hchild, Qnil);
     }
 
   replace_window (root, window, 1);
 
   /* This must become SWINDOW anyway ....... */
-  if (!NILP (WGET (w, buffer)) && !resize_failed)
+  if (!NILP (w->buffer) && !resize_failed)
     {
       /* Try to minimize scrolling, by setting the window start to the
         point will cause the text at the old window start to be at the
@@ -2779,18 +2777,18 @@
         when the display is not current, due to typeahead).  */
       new_top = WINDOW_TOP_EDGE_LINE (w) - FRAME_TOP_MARGIN (XFRAME 
(WINDOW_FRAME (w)));
       if (new_top != top
-         && startpos >= BUF_BEGV (XBUFFER (WGET (w, buffer)))
-         && startpos <= BUF_ZV (XBUFFER (WGET (w, buffer))))
+         && startpos >= BUF_BEGV (XBUFFER (w->buffer))
+         && startpos <= BUF_ZV (XBUFFER (w->buffer)))
        {
          struct position pos;
          struct buffer *obuf = current_buffer;
 
-         Fset_buffer (WGET (w, buffer));
+         Fset_buffer (w->buffer);
          /* This computation used to temporarily move point, but that
             can have unwanted side effects due to text properties.  */
          pos = *vmotion (startpos, -top, w);
 
-         set_marker_both (WGET (w, start), WGET (w, buffer), pos.bufpos, 
pos.bytepos);
+         set_marker_both (w->start, w->buffer, pos.bufpos, pos.bytepos);
          WSET (w, window_end_valid, Qnil);
          w->start_at_line_beg = (pos.bytepos == BEGV_BYTE
                                    || FETCH_BYTE (pos.bytepos - 1) == '\n');
@@ -2987,7 +2985,7 @@
   struct window *w = XWINDOW (window);
   struct buffer *b = XBUFFER (buffer);
   ptrdiff_t count = SPECPDL_INDEX ();
-  int samebuf = EQ (buffer, WGET (w, buffer));
+  int samebuf = EQ (buffer, w->buffer);
 
   WSET (w, buffer, buffer);
 
@@ -3017,8 +3015,8 @@
         whenever we resize the frame.  */
       w->hscroll = w->min_hscroll = 0;
       w->vscroll = 0;
-      set_marker_both (WGET (w, pointm), buffer, BUF_PT (b), BUF_PT_BYTE (b));
-      set_marker_restricted (WGET (w, start),
+      set_marker_both (w->pointm, buffer, BUF_PT (b), BUF_PT_BYTE (b));
+      set_marker_restricted (w->start,
                             make_number (b->last_window_start),
                             buffer);
       w->start_at_line_beg = 0;
@@ -3039,7 +3037,7 @@
       Fset_buffer (buffer);
     }
 
-  XMARKER (WGET (w, pointm))->insertion_type = !NILP 
(Vwindow_point_insertion_type);
+  XMARKER (w->pointm)->insertion_type = !NILP (Vwindow_point_insertion_type);
 
   if (!keep_margins_p)
     {
@@ -3047,8 +3045,8 @@
 
       /* This may call adjust_window_margins three times, so
         temporarily disable window margins.  */
-      Lisp_Object save_left = WGET (w, left_margin_cols);
-      Lisp_Object save_right = WGET (w, right_margin_cols);
+      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);
@@ -3072,7 +3070,7 @@
     {
       if (! NILP (Vwindow_scroll_functions))
        run_hook_with_args_2 (Qwindow_scroll_functions, window,
-                             Fmarker_position (WGET (w, start)));
+                             Fmarker_position (w->start));
       run_window_configuration_change_hook (XFRAME (WINDOW_FRAME (w)));
     }
 
@@ -3106,7 +3104,7 @@
   if (NILP (BVAR (XBUFFER (buffer), name)))
     error ("Attempt to display deleted buffer");
 
-  tem = WGET (w, buffer);
+  tem = w->buffer;
   if (NILP (tem))
     error ("Window is deleted");
   else if (!EQ (tem, Qt))
@@ -3114,7 +3112,7 @@
     {
       if (!EQ (tem, buffer))
        {
-         if (EQ (WGET (w, dedicated), Qt))
+         if (EQ (w->dedicated, Qt))
            /* WINDOW is strongly dedicated to its buffer, signal an
               error.  */
            error ("Window is dedicated to `%s'", SDATA (BVAR (XBUFFER (tem), 
name)));
@@ -3160,8 +3158,8 @@
       struct window *w = XWINDOW (object);
       mark_window_display_accurate (object, 0);
       w->update_mode_line = 1;
-      if (BUFFERP (WGET (w, buffer)))
-       XBUFFER (WGET (w, buffer))->prevent_redisplay_optimizations_p = 1;
+      if (BUFFERP (w->buffer))
+       XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1;
       ++update_mode_lines;
       return Qt;
     }
@@ -3206,14 +3204,14 @@
     {
       window = display_buffer (buf, Qnil, Qnil);
 
-      if (!EQ (WGET (XWINDOW (window), frame), selected_frame))
+      if (!EQ (XWINDOW (window)->frame, selected_frame))
        Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window)));
       Vminibuf_scroll_window = window;
       w = XWINDOW (window);
       w->hscroll = 0;
       w->min_hscroll = 0;
-      set_marker_restricted_both (WGET (w, start), buf, BEG, BEG);
-      set_marker_restricted_both (WGET (w, pointm), buf, BEG, BEG);
+      set_marker_restricted_both (w->start, buf, BEG, BEG);
+      set_marker_restricted_both (w->pointm, buf, BEG, BEG);
 
       /* Run temp-buffer-show-hook, with the chosen window selected
         and its buffer current.  */
@@ -3230,7 +3228,7 @@
         record_unwind_protect (Fset_buffer, prev_buffer);
         record_unwind_protect (select_window_norecord, prev_window);
         Fselect_window (window, Qt);
-        Fset_buffer (WGET (w, buffer));
+        Fset_buffer (w->buffer);
         Frun_hooks (1, &Qtemp_buffer_show_hook);
         unbind_to (count, Qnil);
       }
@@ -3334,9 +3332,9 @@
   if (NILP (add))
     WSET (w, new_total, size);
   else
-    WSET (w, new_total, make_number (XINT (WGET (w, new_total)) + XINT 
(size)));
+    WSET (w, new_total, make_number (XINT (w->new_total) + XINT (size)));
 
-  return WGET (w, new_total);
+  return w->new_total;
 }
 
 DEFUN ("set-window-new-normal", Fset_window_new_normal, 
Sset_window_new_normal, 1, 2, 0,
@@ -3361,19 +3359,19 @@
 {
   struct window *c;
 
-  if (!NILP (WGET (w, vchild)))
+  if (!NILP (w->vchild))
     /* W is a vertical combination.  */
     {
-      c = XWINDOW (WGET (w, vchild));
+      c = XWINDOW (w->vchild);
       if (horflag)
        /* All child windows of W must have the same width as W.  */
        {
          while (c)
            {
-             if ((XINT (WGET (c, new_total)) != XINT (WGET (w, new_total)))
+             if ((XINT (c->new_total) != XINT (w->new_total))
                  || !window_resize_check (c, horflag))
                return 0;
-             c = NILP (WGET (c, next)) ? 0 : XWINDOW (WGET (c, next));
+             c = NILP (c->next) ? 0 : XWINDOW (c->next);
            }
          return 1;
        }
@@ -3386,16 +3384,16 @@
            {
              if (!window_resize_check (c, horflag))
                return 0;
-             sum_of_sizes = sum_of_sizes + XINT (WGET (c, new_total));
-             c = NILP (WGET (c, next)) ? 0 : XWINDOW (WGET (c, next));
+             sum_of_sizes = sum_of_sizes + XINT (c->new_total);
+             c = NILP (c->next) ? 0 : XWINDOW (c->next);
            }
-         return (sum_of_sizes == XINT (WGET (w, new_total)));
+         return (sum_of_sizes == XINT (w->new_total));
        }
     }
-  else if (!NILP (WGET (w, hchild)))
+  else if (!NILP (w->hchild))
     /* W is a horizontal combination.  */
     {
-      c = XWINDOW (WGET (w, hchild));
+      c = XWINDOW (w->hchild);
       if (horflag)
        /* The sum of the widths of the child windows of W must equal W's
           width.  */
@@ -3405,20 +3403,20 @@
            {
              if (!window_resize_check (c, horflag))
                return 0;
-             sum_of_sizes = sum_of_sizes + XINT (WGET (c, new_total));
-             c = NILP (WGET (c, next)) ? 0 : XWINDOW (WGET (c, next));
+             sum_of_sizes = sum_of_sizes + XINT (c->new_total);
+             c = NILP (c->next) ? 0 : XWINDOW (c->next);
            }
-         return (sum_of_sizes == XINT (WGET (w, new_total)));
+         return (sum_of_sizes == XINT (w->new_total));
        }
       else
        /* All child windows of W must have the same height as W.  */
        {
          while (c)
            {
-             if ((XINT (WGET (c, new_total)) != XINT (WGET (w, new_total)))
+             if ((XINT (c->new_total) != XINT (w->new_total))
                  || !window_resize_check (c, horflag))
                return 0;
-             c = NILP (WGET (c, next)) ? 0 : XWINDOW (WGET (c, next));
+             c = NILP (c->next) ? 0 : XWINDOW (c->next);
            }
          return 1;
        }
@@ -3427,7 +3425,7 @@
     /* A leaf window.  Make sure it's not too small.  The following
        hardcodes the values of `window-safe-min-width' (2) and
        `window-safe-min-height' (1) which are defined in window.el.  */
-    return XINT (WGET (w, new_total)) >= (horflag ? 2 : 1);
+    return XINT (w->new_total) >= (horflag ? 2 : 1);
 }
 
 /* Set w->total_lines (w->total_cols if HORIZONTAL is non-zero) to
@@ -3447,25 +3445,25 @@
      parent window has been set *before*.  */
   if (horflag)
     {
-      WSET (w, total_cols, WGET (w, new_total));
-      if (NUMBERP (WGET (w, new_normal)))
-       WSET (w, normal_cols, WGET (w, new_normal));
+      WSET (w, total_cols, w->new_total);
+      if (NUMBERP (w->new_normal))
+       WSET (w, normal_cols, w->new_normal);
 
-      pos = XINT (WGET (w, left_col));
+      pos = XINT (w->left_col);
     }
   else
     {
-      WSET (w, total_lines, WGET (w, new_total));
-      if (NUMBERP (WGET (w, new_normal)))
-       WSET (w, normal_lines, WGET (w, new_normal));
+      WSET (w, total_lines, w->new_total);
+      if (NUMBERP (w->new_normal))
+       WSET (w, normal_lines, w->new_normal);
 
-      pos = XINT (WGET (w, top_line));
+      pos = XINT (w->top_line);
     }
 
-  if (!NILP (WGET (w, vchild)))
+  if (!NILP (w->vchild))
     /* W is a vertical combination.  */
     {
-      c = XWINDOW (WGET (w, vchild));
+      c = XWINDOW (w->vchild);
       while (c)
        {
          if (horflag)
@@ -3474,14 +3472,14 @@
            WSET (c, top_line, make_number (pos));
          window_resize_apply (c, horflag);
          if (!horflag)
-           pos = pos + XINT (WGET (c, total_lines));
-         c = NILP (WGET (c, next)) ? 0 : XWINDOW (WGET (c, next));
+           pos = pos + XINT (c->total_lines);
+         c = NILP (c->next) ? 0 : XWINDOW (c->next);
        }
     }
-  else if (!NILP (WGET (w, hchild)))
+  else if (!NILP (w->hchild))
     /* W is a horizontal combination.  */
     {
-      c = XWINDOW (WGET (w, hchild));
+      c = XWINDOW (w->hchild);
       while (c)
        {
          if (horflag)
@@ -3490,8 +3488,8 @@
            WSET (c, top_line, make_number (pos));
          window_resize_apply (c, horflag);
          if (horflag)
-           pos = pos + XINT (WGET (c, total_cols));
-         c = NILP (WGET (c, next)) ? 0 : XWINDOW (WGET (c, next));
+           pos = pos + XINT (c->total_cols);
+         c = NILP (c->next) ? 0 : XWINDOW (c->next);
        }
     }
 
@@ -3527,8 +3525,8 @@
   r = XWINDOW (FRAME_ROOT_WINDOW (f));
 
   if (!window_resize_check (r, horflag)
-      || ! EQ (WGET (r, new_total),
-              (horflag ? WGET (r, total_cols) : WGET (r, total_lines))))
+      || ! EQ (r->new_total,
+              (horflag ? r->total_cols : r->total_lines)))
     return Qnil;
 
   BLOCK_INPUT;
@@ -3569,7 +3567,7 @@
                        ? 1 : 0)));
 
   WSET (r, top_line, make_number (FRAME_TOP_MARGIN (f)));
-  if (NILP (WGET (r, vchild)) && NILP (WGET (r, hchild)))
+  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));
@@ -3578,29 +3576,29 @@
   else
     {
       /* old_size is the old size of the frame's root window.  */
-      int old_size = XFASTINT (horflag ? WGET (r, total_cols) 
-                              : WGET (r, total_lines));
+      int old_size = XFASTINT (horflag ? r->total_cols 
+                              : r->total_lines);
       Lisp_Object delta;
 
       XSETINT (delta, new_size - old_size);
       /* Try a "normal" resize first.  */
       resize_root_window (root, delta, horflag ? Qt : Qnil, Qnil);
       if (window_resize_check (r, horflag)
-         && new_size == XINT (WGET (r, new_total)))
+         && new_size == XINT (r->new_total))
        window_resize_apply (r, horflag);
       else
        {
          /* Try with "reasonable" minimum sizes next.  */
          resize_root_window (root, delta, horflag ? Qt : Qnil, Qt);
          if (window_resize_check (r, horflag)
-             && new_size == XINT (WGET (r, new_total)))
+             && new_size == XINT (r->new_total))
            window_resize_apply (r, horflag);
          else
            {
              /* Finally, try with "safe" minimum sizes.  */
              resize_root_window (root, delta, horflag ? Qt : Qnil, Qsafe);
              if (window_resize_check (r, horflag)
-                 && new_size == XINT (WGET (r, new_total)))
+                 && new_size == XINT (r->new_total))
                window_resize_apply (r, horflag);
              else
                {
@@ -3627,7 +3625,7 @@
          /* Are we sure we always want 1 line here?  */
          WSET (m, total_lines, make_number (1));
          WSET (m, top_line,
-               make_number (XINT (WGET (r, top_line)) + XINT (WGET (r, 
total_lines))));
+               make_number (XINT (r->top_line) + XINT (r->total_lines)));
        }
     }
 }
@@ -3683,10 +3681,10 @@
      parent, or OLD is ortho-combined.  */
   combination_limit =
     !NILP (Vwindow_combination_limit)
-    || NILP (WGET (o, parent))
+    || NILP (o->parent)
     || NILP (horflag
-            ? (WGET (XWINDOW (WGET (o, parent)), hchild))
-            : (WGET (XWINDOW (WGET (o, parent)), vchild)));
+            ? (XWINDOW (o->parent)->hchild)
+            : (XWINDOW (o->parent)->vchild));
 
   /* We need a live reference window to initialize some parameters.  */
   if (WINDOW_LIVE_P (old))
@@ -3706,24 +3704,24 @@
     /* `window-combination-resize' non-nil means try to resize OLD's siblings
        proportionally.  */
     {
-      p = XWINDOW (WGET (o, parent));
+      p = XWINDOW (o->parent);
       /* Temporarily pretend we split the parent window.  */
       WSET (p, new_total,
-           make_number (XINT (horflag ? WGET (p, total_cols) : WGET (p, 
total_lines))
+           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 ? WGET (p, total_cols) : WGET (p, total_lines));
+             horflag ? p->total_cols : p->total_lines);
     }
   else
     {
       if (!window_resize_check (o, horflag))
        error ("Resizing old window failed");
-      else if (XINT (total_size) + XINT (WGET (o, new_total))
-              != XINT (horflag ? WGET (o, total_cols) : WGET (o, total_lines)))
+      else if (XINT (total_size) + XINT (o->new_total)
+              != XINT (horflag ? o->total_cols : o->total_lines))
        error ("Sum of sizes of old and new window don't fit");
     }
 
@@ -3734,48 +3732,47 @@
         by make_parent_window and we need it below for assigning it to
         p->new_normal.  */
       Lisp_Object new_normal
-       = horflag ? WGET (o, normal_cols) : WGET (o, normal_lines);
+       = horflag ? o->normal_cols : o->normal_lines;
 
       make_parent_window (old, horflag);
-      p = XWINDOW (WGET (o, parent));
+      p = XWINDOW (o->parent);
       /* Store value of `window-combination-limit' in new parent's
         combination_limit slot.  */
       WSET (p, combination_limit, Vwindow_combination_limit);
       /* These get applied below.  */
-      WSET (p, new_total,
-           horflag ? WGET (o, total_cols) : WGET (o, total_lines));
+      WSET (p, new_total, horflag ? o->total_cols : o->total_lines);
       WSET (p, new_normal, new_normal);
     }
   else
-    p = XWINDOW (WGET (o, parent));
+    p = XWINDOW (o->parent);
 
   windows_or_buffers_changed++;
   FRAME_WINDOW_SIZES_CHANGED (f) = 1;
   new = make_window ();
   n = XWINDOW (new);
   WSET (n, frame, frame);
-  WSET (n, parent, WGET (o, parent));
+  WSET (n, parent, o->parent);
   WSET (n, vchild, Qnil);
   WSET (n, hchild, Qnil);
 
   if (EQ (side, Qabove) || EQ (side, Qleft))
     {
-      WSET (n, prev, WGET (o, prev));
-      if (NILP (WGET (n, prev)))
+      WSET (n, prev, o->prev);
+      if (NILP (n->prev))
        if (horflag)
          WSET (p, hchild, new);
        else
          WSET (p, vchild, new);
       else
-       WSET (XWINDOW (WGET (n, prev)), next, new);
+       WSET (XWINDOW (n->prev), next, new);
       WSET (n, next, old);
       WSET (o, prev, new);
     }
   else
     {
-      WSET (n, next, WGET (o, next));
-      if (!NILP (WGET (n, next)))
-       WSET (XWINDOW (WGET (n, next)), prev, new);
+      WSET (n, next, o->next);
+      if (!NILP (n->next))
+       WSET (XWINDOW (n->next), prev, new);
       WSET (n, prev, old);
       WSET (o, next, new);
     }
@@ -3785,24 +3782,24 @@
   memset (&n->last_cursor, 0, sizeof n->last_cursor);
 
   /* Get special geometry settings from reference window.  */
-  WSET (n, left_margin_cols, WGET (r, left_margin_cols));
-  WSET (n, right_margin_cols, WGET (r, right_margin_cols));
-  WSET (n, left_fringe_width, WGET (r, left_fringe_width));
-  WSET (n, right_fringe_width, WGET (r, right_fringe_width));
+  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);
   n->fringes_outside_margins = r->fringes_outside_margins;
-  WSET (n, scroll_bar_width, WGET (r, scroll_bar_width));
-  WSET (n, vertical_scroll_bar_type, WGET (r, vertical_scroll_bar_type));
+  WSET (n, scroll_bar_width, r->scroll_bar_width);
+  WSET (n, vertical_scroll_bar_type, r->vertical_scroll_bar_type);
 
   /* Directly assign orthogonal coordinates and sizes.  */
   if (horflag)
     {
-      WSET (n, top_line, WGET (o, top_line));
-      WSET (n, total_lines, WGET (o, total_lines));
+      WSET (n, top_line, o->top_line);
+      WSET (n, total_lines, o->total_lines);
     }
   else
     {
-      WSET (n, left_col, WGET (o, left_col));
-      WSET (n, total_cols, WGET (o, total_cols));
+      WSET (n, left_col, o->left_col);
+      WSET (n, total_cols, o->total_cols);
     }
 
   /* Iso-coordinates and sizes are assigned by window_resize_apply,
@@ -3815,14 +3812,14 @@
   adjust_glyphs (f);
   /* Set buffer of NEW to buffer of reference window.  Don't run
      any hooks.  */
-  set_window_buffer (new, WGET (r, buffer), 0, 1);
+  set_window_buffer (new, r->buffer, 0, 1);
   UNBLOCK_INPUT;
 
   /* Maybe we should run the scroll functions in Elisp (which already
      runs the configuration change hook).  */
   if (! NILP (Vwindow_scroll_functions))
     run_hook_with_args_2 (Qwindow_scroll_functions, new,
-                         Fmarker_position (WGET (n, start)));
+                         Fmarker_position (n->start));
   /* Return NEW.  */
   return new;
 }
@@ -3841,25 +3838,25 @@
   int before_sibling = 0;
 
   w = decode_any_window (window);
-  CHECK_LIVE_FRAME (WGET (w, frame));
+  CHECK_LIVE_FRAME (w->frame);
 
   XSETWINDOW (window, w);
-  if (NILP (WGET (w, buffer))
-      && NILP (WGET (w, hchild)) && NILP (WGET (w, vchild)))
+  if (NILP (w->buffer)
+      && NILP (w->hchild) && NILP (w->vchild))
     /* It's a no-op to delete an already deleted window.  */
     return Qnil;
 
-  parent = WGET (w, parent);
+  parent = w->parent;
   if (NILP (parent))
     /* Never delete a minibuffer or frame root window.  */
     error ("Attempt to delete minibuffer or sole ordinary window");
-  else if (NILP (WGET (w, prev)) && NILP (WGET (w, next)))
+  else if (NILP (w->prev) && NILP (w->next))
     /* Rather bow out here, this case should be handled on the Elisp
        level.  */
     error ("Attempt to delete sole window of parent");
 
   p = XWINDOW (parent);
-  horflag = NILP (WGET (p, vchild));
+  horflag = NILP (p->vchild);
 
   frame = WINDOW_FRAME (w);
   f = XFRAME (frame);
@@ -3868,13 +3865,13 @@
   r = XWINDOW (root);
 
   /* Unlink WINDOW from window tree.  */
-  if (NILP (WGET (w, prev)))
+  if (NILP (w->prev))
     /* Get SIBLING below (on the right of) WINDOW.  */
     {
       /* before_sibling 1 means WINDOW is the first child of its
         parent and thus before the sibling.  */
       before_sibling = 1;
-      sibling = WGET (w, next);
+      sibling = w->next;
       s = XWINDOW (sibling);
       WSET (s, prev, Qnil);
       if (horflag)
@@ -3885,16 +3882,16 @@
   else
     /* Get SIBLING above (on the left of) WINDOW.  */
     {
-      sibling = WGET (w, prev);
+      sibling = w->prev;
       s = XWINDOW (sibling);
-      WSET (s, next, WGET (w, next));
-      if (!NILP (WGET (s, next)))
-       WSET (XWINDOW (WGET (s, next)), prev, sibling);
+      WSET (s, next, w->next);
+      if (!NILP (s->next))
+       WSET (XWINDOW (s->next), prev, sibling);
     }
 
   if (window_resize_check (r, horflag)
-      && EQ (WGET (r, new_total),
-            (horflag ? WGET (r, total_cols) : WGET (r, total_lines))))
+      && EQ (r->new_total,
+            (horflag ? r->total_cols : r->total_lines)))
     /* We can delete WINDOW now.  */
     {
 
@@ -3919,25 +3916,25 @@
       WSET (w, next, Qnil);  /* Don't delete w->next too.  */
       free_window_matrices (w);
 
-      if (!NILP (WGET (w, vchild)))
+      if (!NILP (w->vchild))
        {
-         delete_all_child_windows (WGET (w, vchild));
+         delete_all_child_windows (w->vchild);
          WSET (w, vchild, Qnil);
        }
-      else if (!NILP (WGET (w, hchild)))
+      else if (!NILP (w->hchild))
        {
-         delete_all_child_windows (WGET (w, hchild));
+         delete_all_child_windows (w->hchild);
          WSET (w, hchild, Qnil);
        }
-      else if (!NILP (WGET (w, buffer)))
+      else if (!NILP (w->buffer))
        {
          unshow_buffer (w);
-         unchain_marker (XMARKER (WGET (w, pointm)));
-         unchain_marker (XMARKER (WGET (w, start)));
+         unchain_marker (XMARKER (w->pointm));
+         unchain_marker (XMARKER (w->start));
          WSET (w, buffer, Qnil);
        }
 
-      if (NILP (WGET (s, prev)) && NILP (WGET (s, next)))
+      if (NILP (s->prev) && NILP (s->next))
          /* A matrjoshka where SIBLING has become the only child of
             PARENT.  */
        {
@@ -3945,8 +3942,8 @@
          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, WGET (p, normal_cols));
-         WSET (s, normal_lines, WGET (p, normal_lines));
+         WSET (s, normal_cols, p->normal_cols);
+         WSET (s, normal_lines, p->normal_lines);
          /* Mark PARENT as deleted.  */
          WSET (p, vchild, Qnil);
          WSET (p, hchild, Qnil);
@@ -3976,7 +3973,7 @@
          /* Now look whether `get-mru-window' gets us something.  */
          mru_window = call1 (Qget_mru_window, frame);
          if (WINDOW_LIVE_P (mru_window)
-             && EQ (WGET (XWINDOW (mru_window), frame), frame))
+             && EQ (XWINDOW (mru_window)->frame, frame))
            new_selected_window = mru_window;
 
          /* If all ended up well, we now promote the mru window.  */
@@ -4005,8 +4002,8 @@
       else
        {
          WSET (s, next, window);
-         if (!NILP (WGET (w, next)))
-           WSET (XWINDOW (WGET (w, next)), prev, window);
+         if (!NILP (w->next))
+           WSET (XWINDOW (w->next), prev, window);
        }
       error ("Deletion failed");
     }
@@ -4023,7 +4020,7 @@
 void
 grow_mini_window (struct window *w, int delta)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   struct window *r;
   Lisp_Object root, value;
 
@@ -4041,9 +4038,9 @@
 
       /* Grow the mini-window.  */
       WSET (w, top_line,
-           make_number (XFASTINT (WGET (r, top_line)) + XFASTINT (WGET (r, 
total_lines))));
+           make_number (XFASTINT (r->top_line) + XFASTINT (r->total_lines)));
       WSET (w, total_lines,
-           make_number (XFASTINT (WGET (w, total_lines)) - XINT (value)));
+           make_number (XFASTINT (w->total_lines) - XINT (value)));
       w->last_modified = 0;
       w->last_overlay_modified = 0;
 
@@ -4057,14 +4054,14 @@
 void
 shrink_mini_window (struct window *w)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   struct window *r;
   Lisp_Object root, value;
   EMACS_INT size;
 
   eassert (MINI_WINDOW_P (w));
 
-  size = XINT (WGET (w, total_lines));
+  size = XINT (w->total_lines);
   if (size > 1)
     {
       root = FRAME_ROOT_WINDOW (f);
@@ -4078,7 +4075,7 @@
 
          /* Shrink the mini-window.  */
          WSET (w, top_line,
-               make_number (XFASTINT (WGET (r, top_line)) + XFASTINT (WGET (r, 
total_lines))));
+               make_number (XFASTINT (r->top_line) + XFASTINT 
(r->total_lines)));
          WSET (w, total_lines, make_number (1));
 
          w->last_modified = 0;
@@ -4104,25 +4101,25 @@
   int height;
 
   CHECK_WINDOW (window);
-  f = XFRAME (WGET (w, frame));
+  f = XFRAME (w->frame);
 
-  if (!EQ (FRAME_MINIBUF_WINDOW (XFRAME (WGET (w, frame))), window))
+  if (!EQ (FRAME_MINIBUF_WINDOW (XFRAME (w->frame)), window))
     error ("Not a valid minibuffer window");
   else if (FRAME_MINIBUF_ONLY_P (f))
     error ("Cannot resize a minibuffer-only frame");
 
   r = XWINDOW (FRAME_ROOT_WINDOW (f));
-  height = XINT (WGET (r, total_lines)) + XINT (WGET (w, total_lines));
+  height = XINT (r->total_lines) + XINT (w->total_lines);
   if (window_resize_check (r, 0)
-      && XINT (WGET (w, new_total)) > 0
-      && height == XINT (WGET (r, new_total)) + XINT (WGET (w, new_total)))
+      && XINT (w->new_total) > 0
+      && height == XINT (r->new_total) + XINT (w->new_total))
     {
       BLOCK_INPUT;
       window_resize_apply (r, 0);
 
-      WSET (w, total_lines, WGET (w, new_total));
+      WSET (w, total_lines, w->new_total);
       WSET (w, top_line,
-           make_number (XINT (WGET (r, top_line)) + XINT (WGET (r, 
total_lines))));
+           make_number (XINT (r->top_line) + XINT (r->total_lines)));
 
       windows_or_buffers_changed++;
       FRAME_WINDOW_SIZES_CHANGED (f) = 1;
@@ -4145,14 +4142,14 @@
 {
   while (w)
     {
-      if (!NILP (WGET (w, hchild)))
-       mark_window_cursors_off (XWINDOW (WGET (w, hchild)));
-      else if (!NILP (WGET (w, vchild)))
-       mark_window_cursors_off (XWINDOW (WGET (w, vchild)));
+      if (!NILP (w->hchild))
+       mark_window_cursors_off (XWINDOW (w->hchild));
+      else if (!NILP (w->vchild))
+       mark_window_cursors_off (XWINDOW (w->vchild));
       else
        w->phys_cursor_on_p = 0;
 
-      w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
+      w = NILP (w->next) ? 0 : XWINDOW (w->next);
     }
 }
 
@@ -4162,15 +4159,15 @@
 int
 window_internal_height (struct window *w)
 {
-  int ht = XFASTINT (WGET (w, total_lines));
+  int ht = XFASTINT (w->total_lines);
 
   if (!MINI_WINDOW_P (w))
     {
-      if (!NILP (WGET (w, parent))
-         || !NILP (WGET (w, vchild))
-         || !NILP (WGET (w, hchild))
-         || !NILP (WGET (w, next))
-         || !NILP (WGET (w, prev))
+      if (!NILP (w->parent)
+         || !NILP (w->vchild)
+         || !NILP (w->hchild)
+         || !NILP (w->next)
+         || !NILP (w->prev)
          || WINDOW_WANTS_MODELINE_P (w))
        --ht;
 
@@ -4200,7 +4197,7 @@
 
   /* If we must, use the pixel-based version which is much slower than
      the line-based one but can handle varying line heights.  */
-  if (FRAME_WINDOW_P (XFRAME (WGET (XWINDOW (window), frame))))
+  if (FRAME_WINDOW_P (XFRAME (XWINDOW (window)->frame)))
     window_scroll_pixel_based (window, n, whole, noerror);
   else
     window_scroll_line_based (window, n, whole, noerror);
@@ -4225,7 +4222,7 @@
   int x, y, rtop, rbot, rowh, vpos;
   void *itdata = NULL;
 
-  SET_TEXT_POS_FROM_MARKER (start, WGET (w, start));
+  SET_TEXT_POS_FROM_MARKER (start, w->start);
   /* Scrolling a minibuffer window via scroll bar when the echo area
      shows long text sometimes resets the minibuffer contents behind
      our backs.  */
@@ -4306,8 +4303,8 @@
                    spos = XINT (Fline_beginning_position (Qnil));
                  else
                    spos = min (XINT (Fline_end_position (Qnil)) + 1, ZV);
-                 set_marker_restricted (WGET (w, start), make_number (spos),
-                                        WGET (w, buffer));
+                 set_marker_restricted (w->start, make_number (spos),
+                                        w->buffer);
                  w->start_at_line_beg = 1;
                  w->update_mode_line = 1;
                  w->last_modified = 0;
@@ -4431,7 +4428,7 @@
 
       /* If control gets here, then we vscrolled.  */
 
-      XBUFFER (WGET (w, buffer))->prevent_redisplay_optimizations_p = 1;
+      XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1;
 
       /* Don't try to change the window start below.  */
       vscrolled = 1;
@@ -4451,9 +4448,9 @@
        }
 
       /* Set the window start, and set up the window for redisplay.  */
-      set_marker_restricted (WGET (w, start), make_number (pos),
-                            WGET (w, buffer));
-      bytepos = XMARKER (WGET (w, start))->bytepos;
+      set_marker_restricted (w->start, make_number (pos),
+                            w->buffer);
+      bytepos = XMARKER (w->start)->bytepos;
       w->start_at_line_beg = (pos == BEGV || FETCH_BYTE (bytepos - 1) == '\n');
       w->update_mode_line = 1;
       w->last_modified = 0;
@@ -4472,7 +4469,7 @@
      even if there is a header line.  */
   this_scroll_margin = max (0, scroll_margin);
   this_scroll_margin
-    = min (this_scroll_margin, XFASTINT (WGET (w, total_lines)) / 4);
+    = min (this_scroll_margin, XFASTINT (w->total_lines) / 4);
   this_scroll_margin *= FRAME_LINE_HEIGHT (it.f);
 
   if (n > 0)
@@ -4546,7 +4543,7 @@
        ;
       else if (window_scroll_pixel_based_preserve_y >= 0)
        {
-         SET_TEXT_POS_FROM_MARKER (start, WGET (w, start));
+         SET_TEXT_POS_FROM_MARKER (start, w->start);
          start_display (&it, w, start);
          /* It would be wrong to subtract CURRENT_HEADER_LINE_HEIGHT
             here because we called start_display again and did not
@@ -4600,7 +4597,7 @@
   if (whole)
     n *= max (1, ht - next_screen_context_lines);
 
-  startpos = marker_position (WGET (w, start));
+  startpos = marker_position (w->start);
 
   if (!NILP (Vscroll_preserve_screen_position))
     {
@@ -4651,9 +4648,9 @@
     {
       /* Don't use a scroll margin that is negative or too large.  */
       int this_scroll_margin =
-       max (0, min (scroll_margin, XINT (WGET (w, total_lines)) / 4));
+       max (0, min (scroll_margin, XINT (w->total_lines) / 4));
 
-      set_marker_restricted_both (WGET (w, start), WGET (w, buffer), pos, 
pos_byte);
+      set_marker_restricted_both (w->start, w->buffer, pos, pos_byte);
       w->start_at_line_beg = !NILP (bolp);
       w->update_mode_line = 1;
       w->last_modified = 0;
@@ -4747,10 +4744,10 @@
 
   /* If selected window's buffer isn't current, make it current for
      the moment.  But don't screw up if window_scroll gets an error.  */
-  if (XBUFFER (WGET (XWINDOW (selected_window), buffer)) != current_buffer)
+  if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer)
     {
       record_unwind_protect (save_excursion_restore, save_excursion_save ());
-      Fset_buffer (WGET (XWINDOW (selected_window), buffer));
+      Fset_buffer (XWINDOW (selected_window)->buffer);
 
       /* Make redisplay consider other windows than just selected_window.  */
       ++windows_or_buffers_changed;
@@ -4865,8 +4862,8 @@
   record_unwind_protect (save_excursion_restore, save_excursion_save ());
   ++windows_or_buffers_changed;
 
-  Fset_buffer (WGET (w, buffer));
-  SET_PT (marker_position (WGET (w, pointm)));
+  Fset_buffer (w->buffer);
+  SET_PT (marker_position (w->pointm));
 
   if (NILP (arg))
     window_scroll (window, 1, 1, 1);
@@ -4880,7 +4877,7 @@
       window_scroll (window, XINT (arg), 0, 1);
     }
 
-  set_marker_both (WGET (w, pointm), Qnil, PT, PT_BYTE);
+  set_marker_both (w->pointm, Qnil, PT, PT_BYTE);
   unbind_to (count, Qnil);
 
   return Qnil;
@@ -4958,10 +4955,10 @@
   int bottom_y;
   void *itdata = NULL;
 
-  if (XBUFFER (WGET (w, buffer)) != current_buffer)
+  if (XBUFFER (w->buffer) != current_buffer)
     {
       old_buffer = current_buffer;
-      set_buffer_internal (XBUFFER (WGET (w, buffer)));
+      set_buffer_internal (XBUFFER (w->buffer));
     }
   else
     old_buffer = NULL;
@@ -4969,12 +4966,12 @@
   /* In case W->start is out of the accessible range, do something
      reasonable.  This happens in Info mode when Info-scroll-down
      calls (recenter -1) while W->start is 1.  */
-  if (XMARKER (WGET (w, start))->charpos < BEGV)
+  if (XMARKER (w->start)->charpos < BEGV)
     SET_TEXT_POS (start, BEGV, BEGV_BYTE);
-  else if (XMARKER (WGET (w, start))->charpos > ZV)
+  else if (XMARKER (w->start)->charpos > ZV)
     SET_TEXT_POS (start, ZV, ZV_BYTE);
   else
-    SET_TEXT_POS_FROM_MARKER (start, WGET (w, start));
+    SET_TEXT_POS_FROM_MARKER (start, w->start);
 
   itdata = bidi_shelve_cache ();
   start_display (&it, w, start);
@@ -4988,7 +4985,7 @@
      This kludge fixes a bug whereby (move-to-window-line -1)
      when ZV is on the last screen line
      moves to the previous screen line instead of the last one.  */
-  if (! FRAME_WINDOW_P (XFRAME (WGET (w, frame))))
+  if (! FRAME_WINDOW_P (XFRAME (w->frame)))
     height++;
 
   /* Add in empty lines at the bottom of the window.  */
@@ -5023,7 +5020,7 @@
   (register Lisp_Object arg)
 {
   struct window *w = XWINDOW (selected_window);
-  struct buffer *buf = XBUFFER (WGET (w, buffer));
+  struct buffer *buf = XBUFFER (w->buffer);
   struct buffer *obuf = current_buffer;
   int center_p = 0;
   ptrdiff_t charpos, bytepos;
@@ -5067,12 +5064,12 @@
   /* Do this after making BUF current
      in case scroll_margin is buffer-local.  */
   this_scroll_margin =
-    max (0, min (scroll_margin, XFASTINT (WGET (w, total_lines)) / 4));
+    max (0, min (scroll_margin, XFASTINT (w->total_lines) / 4));
 
   /* Handle centering on a graphical frame specially.  Such frames can
      have variable-height lines and centering point on the basis of
      line counts would lead to strange effects.  */
-  if (FRAME_WINDOW_P (XFRAME (WGET (w, frame))))
+  if (FRAME_WINDOW_P (XFRAME (w->frame)))
     {
       if (center_p)
        {
@@ -5189,7 +5186,7 @@
     }
 
   /* Set the new window start.  */
-  set_marker_both (WGET (w, start), WGET (w, buffer), charpos, bytepos);
+  set_marker_both (w->start, w->buffer, charpos, bytepos);
   WSET (w, window_end_valid, Qnil);
 
   w->optional_new_start = 1;
@@ -5212,7 +5209,7 @@
 {
   struct window *w = decode_window (window);
   int pixel_height = window_box_height (w);
-  int line_height = pixel_height / FRAME_LINE_HEIGHT (XFRAME (WGET (w, 
frame)));
+  int line_height = pixel_height / FRAME_LINE_HEIGHT (XFRAME (w->frame));
   return make_number (line_height);
 }
 
@@ -5233,24 +5230,24 @@
   int this_scroll_margin;
 #endif
 
-  if (!(BUFFERP (WGET (w, buffer))
-       && XBUFFER (WGET (w, buffer)) == current_buffer))
+  if (!(BUFFERP (w->buffer)
+       && XBUFFER (w->buffer) == current_buffer))
     /* This test is needed to make sure PT/PT_BYTE make sense in w->buffer
        when passed below to set_marker_both.  */
     error ("move-to-window-line called from unrelated buffer");
 
   window = selected_window;
-  start = marker_position (WGET (w, start));
+  start = marker_position (w->start);
   if (start < BEGV || start > ZV)
     {
       int height = window_internal_height (w);
       Fvertical_motion (make_number (- (height / 2)), window);
-      set_marker_both (WGET (w, start), WGET (w, buffer), PT, PT_BYTE);
+      set_marker_both (w->start, w->buffer, PT, PT_BYTE);
       w->start_at_line_beg = !NILP (Fbolp ());
       w->force_start = 1;
     }
   else
-    Fgoto_char (WGET (w, start));
+    Fgoto_char (w->start);
 
   lines = displayed_window_lines (w);
 
@@ -5354,7 +5351,7 @@
 
   data = (struct save_window_data *) XVECTOR (config);
   saved_windows = XVECTOR (data->saved_windows);
-  return WGET (XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window), frame);
+  return XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame;
 }
 
 DEFUN ("set-window-configuration", Fset_window_configuration,
@@ -5396,11 +5393,11 @@
           window-point of the final-selected-window to the window-point of
           the current-selected-window.  So we have to be careful which
           point of the current-buffer we copy into old_point.  */
-       if (EQ (WGET (XWINDOW (data->current_window), buffer), 
new_current_buffer)
+       if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer)
            && WINDOWP (selected_window)
-           && EQ (WGET (XWINDOW (selected_window), buffer), new_current_buffer)
+           && EQ (XWINDOW (selected_window)->buffer, new_current_buffer)
            && !EQ (selected_window, data->current_window))
-         old_point = XMARKER (WGET (XWINDOW (data->current_window), 
pointm))->charpos;
+         old_point = XMARKER (XWINDOW (data->current_window)->pointm)->charpos;
        else
          old_point = PT;
       else
@@ -5412,15 +5409,15 @@
           So if possible we want this arbitrary choice of "which point" to
           be the one from the to-be-selected-window so as to prevent this
           window's cursor from being copied from another window.  */
-       if (EQ (WGET (XWINDOW (data->current_window), buffer), 
new_current_buffer)
+       if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer)
            /* If current_window = selected_window, its point is in BUF_PT.  */
            && !EQ (selected_window, data->current_window))
-         old_point = XMARKER (WGET (XWINDOW (data->current_window), 
pointm))->charpos;
+         old_point = XMARKER (XWINDOW (data->current_window)->pointm)->charpos;
        else
          old_point = BUF_PT (XBUFFER (new_current_buffer));
     }
 
-  frame = WGET (XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window), frame);
+  frame = XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame;
   f = XFRAME (frame);
 
   /* If f is a dead frame, don't bother rebuilding its window tree.
@@ -5473,13 +5470,13 @@
         window holds garbage.)  We do this now, before
         restoring the window contents, and prevent it from
         being done later on when we select a new window.  */
-      if (! NILP (WGET (XWINDOW (selected_window), buffer)))
+      if (! NILP (XWINDOW (selected_window)->buffer))
        {
          w = XWINDOW (selected_window);
-         set_marker_both (WGET (w, pointm),
-                          WGET (w, buffer),
-                          BUF_PT (XBUFFER (WGET (w, buffer))),
-                          BUF_PT_BYTE (XBUFFER (WGET (w, buffer))));
+         set_marker_both (w->pointm,
+                          w->buffer,
+                          BUF_PT (XBUFFER (w->buffer)),
+                          BUF_PT_BYTE (XBUFFER (w->buffer)));
        }
 
       windows_or_buffers_changed++;
@@ -5511,39 +5508,39 @@
          WSET (w, next, Qnil);
 
          if (!NILP (p->parent))
-           WSET (w, parent, SAVED_WINDOW_N (saved_windows,
-                                            XFASTINT (p->parent))->window);
+           WSET (w, parent, SAVED_WINDOW_N 
+                 (saved_windows, XFASTINT (p->parent))->window);
          else
            WSET (w, parent, Qnil);
 
          if (!NILP (p->prev))
            {
-             WSET (w, prev, SAVED_WINDOW_N (saved_windows,
-                                            XFASTINT (p->prev))->window);
-             WSET (XWINDOW (WGET (w, prev)), next, p->window);
+             WSET (w, prev, SAVED_WINDOW_N
+                   (saved_windows, XFASTINT (p->prev))->window);
+             WSET (XWINDOW (w->prev), next, p->window);
            }
          else
            {
              WSET (w, prev, Qnil);
-             if (!NILP (WGET (w, parent)))
+             if (!NILP (w->parent))
                {
-                 if (EQ (p->total_cols, WGET (XWINDOW (WGET (w, parent)), 
total_cols)))
+                 if (EQ (p->total_cols, XWINDOW (w->parent)->total_cols))
                    {
-                     WSET (XWINDOW (WGET (w, parent)), vchild, p->window);
-                     WSET (XWINDOW (WGET (w, parent)), hchild, Qnil);
+                     WSET (XWINDOW (w->parent), vchild, p->window);
+                     WSET (XWINDOW (w->parent), hchild, Qnil);
                    }
                  else
                    {
-                     WSET (XWINDOW (WGET (w, parent)), hchild, p->window);
-                     WSET (XWINDOW (WGET (w, parent)), vchild, Qnil);
+                     WSET (XWINDOW (w->parent), hchild, p->window);
+                     WSET (XWINDOW (w->parent), vchild, Qnil);
                    }
                }
            }
 
          /* If we squirreled away the buffer in the window's height,
             restore it now.  */
-         if (BUFFERP (WGET (w, total_lines)))
-           WSET (w, buffer, WGET (w, total_lines));
+         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);
@@ -5571,7 +5568,7 @@
                {
                  if (NILP (XCDR (pers)))
                    {
-                     par = Fassq (XCAR (pers), WGET (w, window_parameters));
+                     par = Fassq (XCAR (pers), w->window_parameters);
                      if (CONSP (par) && !NILP (XCDR (par)))
                        /* Reset a parameter to nil if and only if it
                           has a non-nil association.  Don't make new
@@ -5596,33 +5593,33 @@
            {
              WSET (w, buffer, p->buffer);
               w->start_at_line_beg = !NILP (p->start_at_line_beg);
-              set_marker_restricted (WGET (w, start), p->start, WGET (w, 
buffer));
-              set_marker_restricted (WGET (w, pointm), p->pointm,
-                                     WGET (w, buffer));
-              Fset_marker (BVAR (XBUFFER (WGET (w, buffer)), mark),
-                           p->mark, WGET (w, buffer));
+              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 (WGET (w, pointm));
+                Fgoto_char (w->pointm);
             }
-          else if (!NILP (WGET (w, buffer))
-                   && !NILP (BVAR (XBUFFER (WGET (w, buffer)), name)))
+          else if (!NILP (w->buffer)
+                   && !NILP (BVAR (XBUFFER (w->buffer), name)))
             /* Keep window's old buffer; make sure the markers are
                real.  */
             {
               /* Set window markers at start of visible range.  */
-              if (XMARKER (WGET (w, start))->buffer == 0)
-                set_marker_restricted (WGET (w, start), make_number (0),
-                                       WGET (w, buffer));
-              if (XMARKER (WGET (w, pointm))->buffer == 0)
+              if (XMARKER (w->start)->buffer == 0)
+                set_marker_restricted (w->start, make_number (0),
+                                       w->buffer);
+              if (XMARKER (w->pointm)->buffer == 0)
                 set_marker_restricted_both 
-                  (WGET (w, pointm), WGET (w, buffer),
-                   BUF_PT (XBUFFER (WGET (w, buffer))),
-                   BUF_PT_BYTE (XBUFFER (WGET (w, buffer))));
+                  (w->pointm, w->buffer,
+                   BUF_PT (XBUFFER (w->buffer)),
+                   BUF_PT_BYTE (XBUFFER (w->buffer)));
               w->start_at_line_beg = 1;
             }
           else if (STRINGP (auto_buffer_name =
@@ -5630,10 +5627,10 @@
                    && SCHARS (auto_buffer_name) != 0
                    && !NILP (WSET (w, buffer, Fget_buffer_create 
(auto_buffer_name))))
            {
-             set_marker_restricted (WGET (w, start),
-                                    make_number (0), WGET (w, buffer));
-             set_marker_restricted (WGET (w, pointm),
-                                    make_number (0), WGET (w, buffer));
+             set_marker_restricted (w->start,
+                                    make_number (0), w->buffer);
+             set_marker_restricted (w->pointm,
+                                    make_number (0), w->buffer);
              w->start_at_line_beg = 1;
            }
          else
@@ -5646,12 +5643,12 @@
              WSET (w, buffer, other_buffer_safely (Fcurrent_buffer ()));
              /* This will set the markers to beginning of visible
                 range.  */
-             set_marker_restricted (WGET (w, start),
-                                    make_number (0), WGET (w, buffer));
-             set_marker_restricted (WGET (w, pointm),
-                                    make_number (0), WGET (w, buffer));
+             set_marker_restricted (w->start,
+                                    make_number (0), w->buffer);
+             set_marker_restricted (w->pointm,
+                                    make_number (0), w->buffer);
              w->start_at_line_beg = 1;
-             if (!NILP (WGET (w, dedicated)))
+             if (!NILP (w->dedicated))
                /* Record this window as dead.  */
                dead_windows = Fcons (window, dead_windows);
              /* Make sure window is no more dedicated.  */
@@ -5662,17 +5659,17 @@
       FSET (f, root_window, data->root_window);
       /* Arrange *not* to restore point in the buffer that was
         current when the window configuration was saved.  */
-      if (EQ (WGET (XWINDOW (data->current_window), buffer), 
new_current_buffer))
-       set_marker_restricted (WGET (XWINDOW (data->current_window), pointm),
+      if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer))
+       set_marker_restricted (XWINDOW (data->current_window)->pointm,
                               make_number (old_point),
-                              WGET (XWINDOW (data->current_window), buffer));
+                              XWINDOW (data->current_window)->buffer);
 
       /* In the following call to `select-window', prevent "swapping out
         point" in the old selected window using the buffer that has
         been restored into it.  We already swapped out that point from
         that window's old buffer.  */
       select_window (data->current_window, Qnil, 1);
-      BVAR (XBUFFER (WGET (XWINDOW (selected_window), buffer)), 
last_selected_window)
+      BVAR (XBUFFER (XWINDOW (selected_window)->buffer), last_selected_window)
        = selected_window;
 
       if (NILP (data->focus_frame)
@@ -5699,14 +5696,14 @@
       /* Now, free glyph matrices in windows that were not reused.  */
       for (i = n = 0; i < n_leaf_windows; ++i)
        {
-         if (NILP (WGET (leaf_windows[i], buffer)))
+         if (NILP (leaf_windows[i]->buffer))
            {
              /* Assert it's not reused as a combination.  */
-             eassert (NILP (WGET (leaf_windows[i], hchild))
-                      && NILP (WGET (leaf_windows[i], vchild)));
+             eassert (NILP (leaf_windows[i]->hchild)
+                      && NILP (leaf_windows[i]->vchild));
              free_window_matrices (leaf_windows[i]);
            }
-         else if (EQ (WGET (leaf_windows[i], buffer), new_current_buffer))
+         else if (EQ (leaf_windows[i]->buffer, new_current_buffer))
            ++n;
        }
 
@@ -5751,27 +5748,27 @@
 
   w = XWINDOW (window);
 
-  if (!NILP (WGET (w, next)))
+  if (!NILP (w->next))
     /* Delete WINDOW's siblings (we traverse postorderly).  */
-    delete_all_child_windows (WGET (w, next));
-
-  WSET (w, total_lines, WGET (w, buffer));       /* See 
Fset_window_configuration for excuse.  */
-
-  if (!NILP (WGET (w, vchild)))
+    delete_all_child_windows (w->next);
+
+  WSET (w, total_lines, w->buffer);       /* See Fset_window_configuration for 
excuse.  */
+
+  if (!NILP (w->vchild))
     {
-      delete_all_child_windows (WGET (w, vchild));
+      delete_all_child_windows (w->vchild);
       WSET (w, vchild, Qnil);
     }
-  else if (!NILP (WGET (w, hchild)))
+  else if (!NILP (w->hchild))
     {
-      delete_all_child_windows (WGET (w, hchild));
+      delete_all_child_windows (w->hchild);
       WSET (w, hchild, Qnil);
     }
-  else if (!NILP (WGET (w, buffer)))
+  else if (!NILP (w->buffer))
     {
       unshow_buffer (w);
-      unchain_marker (XMARKER (WGET (w, pointm)));
-      unchain_marker (XMARKER (WGET (w, start)));
+      unchain_marker (XMARKER (w->pointm));
+      unchain_marker (XMARKER (w->start));
       WSET (w, buffer, Qnil);
     }
 
@@ -5782,12 +5779,12 @@
 count_windows (register struct window *window)
 {
   register int count = 1;
-  if (!NILP (WGET (window, next)))
-    count += count_windows (XWINDOW (WGET (window, next)));
-  if (!NILP (WGET (window, vchild)))
-    count += count_windows (XWINDOW (WGET (window, vchild)));
-  if (!NILP (WGET (window, hchild)))
-    count += count_windows (XWINDOW (WGET (window, hchild)));
+  if (!NILP (window->next))
+    count += count_windows (XWINDOW (window->next));
+  if (!NILP (window->vchild))
+    count += count_windows (XWINDOW (window->vchild));
+  if (!NILP (window->hchild))
+    count += count_windows (XWINDOW (window->hchild));
   return count;
 }
 
@@ -5799,14 +5796,14 @@
 {
   while (w)
     {
-      if (!NILP (WGET (w, hchild)))
-       i = get_leaf_windows (XWINDOW (WGET (w, hchild)), flat, i);
-      else if (!NILP (WGET (w, vchild)))
-       i = get_leaf_windows (XWINDOW (WGET (w, vchild)), flat, i);
+      if (!NILP (w->hchild))
+       i = get_leaf_windows (XWINDOW (w->hchild), flat, i);
+      else if (!NILP (w->vchild))
+       i = get_leaf_windows (XWINDOW (w->vchild), flat, i);
       else
        flat[i++] = w;
 
-      w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
+      w = NILP (w->next) ? 0 : XWINDOW (w->next);
     }
 
   return i;
@@ -5859,32 +5856,32 @@
   register struct window *w;
   register Lisp_Object tem, pers, par;
 
-  for (;!NILP (window); window = WGET (w, next))
+  for (;!NILP (window); window = w->next)
     {
       p = SAVED_WINDOW_N (vector, i);
       w = XWINDOW (window);
 
       WSET (w, temslot, make_number (i)); i++;
       p->window = window;
-      p->buffer = WGET (w, buffer);
-      p->left_col = WGET (w, left_col);
-      p->top_line = WGET (w, top_line);
-      p->total_cols = WGET (w, total_cols);
-      p->total_lines = WGET (w, total_lines);
-      p->normal_cols = WGET (w, normal_cols);
-      p->normal_lines = WGET (w, normal_lines);
+      p->buffer = w->buffer;
+      p->left_col = w->left_col;
+      p->top_line = w->top_line;
+      p->total_cols = w->total_cols;
+      p->total_lines = w->total_lines;
+      p->normal_cols = w->normal_cols;
+      p->normal_lines = w->normal_lines;
       XSETFASTINT (p->hscroll, w->hscroll);
       XSETFASTINT (p->min_hscroll, w->min_hscroll);
-      p->display_table = WGET (w, display_table);
-      p->left_margin_cols = WGET (w, left_margin_cols);
-      p->right_margin_cols = WGET (w, right_margin_cols);
-      p->left_fringe_width = WGET (w, left_fringe_width);
-      p->right_fringe_width = WGET (w, right_fringe_width);
+      p->display_table = w->display_table;
+      p->left_margin_cols = w->left_margin_cols;
+      p->right_margin_cols = w->right_margin_cols;
+      p->left_fringe_width = w->left_fringe_width;
+      p->right_fringe_width = w->right_fringe_width;
       p->fringes_outside_margins = w->fringes_outside_margins ? Qt : Qnil;
-      p->scroll_bar_width = WGET (w, scroll_bar_width);
-      p->vertical_scroll_bar_type = WGET (w, vertical_scroll_bar_type);
-      p->dedicated = WGET (w, dedicated);
-      p->combination_limit = WGET (w, combination_limit);
+      p->scroll_bar_width = w->scroll_bar_width;
+      p->vertical_scroll_bar_type = w->vertical_scroll_bar_type;
+      p->dedicated = w->dedicated;
+      p->combination_limit = w->combination_limit;
       p->window_parameters = Qnil;
 
       if (!NILP (Vwindow_persistent_parameters))
@@ -5917,7 +5914,7 @@
              /* Save values for persistent window parameters. */
              if (CONSP (pers) && !NILP (XCDR (pers)))
                {
-                 par = Fassq (XCAR (pers), WGET (w, window_parameters));
+                 par = Fassq (XCAR (pers), w->window_parameters);
                  if (NILP (par))
                    /* If the window has no value for the parameter,
                       make one.  */
@@ -5933,24 +5930,24 @@
            }
        }
 
-      if (!NILP (WGET (w, buffer)))
+      if (!NILP (w->buffer))
        {
          /* Save w's value of point in the window configuration.  If w
             is the selected window, then get the value of point from
             the buffer; pointm is garbage in the selected window.  */
          if (EQ (window, selected_window))
-           p->pointm = build_marker (XBUFFER (WGET (w, buffer)),
-                                     BUF_PT (XBUFFER (WGET (w, buffer))),
-                                     BUF_PT_BYTE (XBUFFER (WGET (w, buffer))));
+           p->pointm = build_marker (XBUFFER (w->buffer),
+                                     BUF_PT (XBUFFER (w->buffer)),
+                                     BUF_PT_BYTE (XBUFFER (w->buffer)));
          else
-           p->pointm = Fcopy_marker (WGET (w, pointm), Qnil);
+           p->pointm = Fcopy_marker (w->pointm, Qnil);
          XMARKER (p->pointm)->insertion_type
            = !NILP (Vwindow_point_insertion_type);
 
-         p->start = Fcopy_marker (WGET (w, start), Qnil);
+         p->start = Fcopy_marker (w->start, Qnil);
          p->start_at_line_beg = w->start_at_line_beg ? Qt : Qnil;
 
-         tem = BVAR (XBUFFER (WGET (w, buffer)), mark);
+         tem = BVAR (XBUFFER (w->buffer), mark);
          p->mark = Fcopy_marker (tem, Qnil);
        }
       else
@@ -5961,20 +5958,20 @@
          p->start_at_line_beg = Qnil;
        }
 
-      if (NILP (WGET (w, parent)))
+      if (NILP (w->parent))
        p->parent = Qnil;
       else
-       p->parent = WGET (XWINDOW (WGET (w, parent)), temslot);
+       p->parent = XWINDOW (w->parent)->temslot;
 
-      if (NILP (WGET (w, prev)))
+      if (NILP (w->prev))
        p->prev = Qnil;
       else
-       p->prev = WGET (XWINDOW (WGET (w, prev)), temslot);
+       p->prev = XWINDOW (w->prev)->temslot;
 
-      if (!NILP (WGET (w, vchild)))
-       i = save_window_save (WGET (w, vchild), vector, i);
-      if (!NILP (WGET (w, hchild)))
-       i = save_window_save (WGET (w, hchild), vector, i);
+      if (!NILP (w->vchild))
+       i = save_window_save (w->vchild, vector, i);
+      if (!NILP (w->hchild))
+       i = save_window_save (w->hchild, vector, i);
     }
 
   return i;
@@ -6063,8 +6060,8 @@
        right_width = Qnil;
     }
 
-  if (!EQ (WGET (w, left_margin_cols), left_width)
-      || !EQ (WGET (w, right_margin_cols), right_width))
+  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);
@@ -6089,7 +6086,7 @@
   (Lisp_Object window)
 {
   struct window *w = decode_window (window);
-  return Fcons (WGET (w, left_margin_cols), WGET (w, right_margin_cols));
+  return Fcons (w->left_margin_cols, w->right_margin_cols);
 }
 
 
@@ -6123,8 +6120,8 @@
 
   /* Do nothing on a tty.  */
   if (FRAME_WINDOW_P (WINDOW_XFRAME (w))
-      && (!EQ (WGET (w, left_fringe_width), left_width)
-         || !EQ (WGET (w, right_fringe_width), right_width)
+      && (!EQ (w->left_fringe_width, left_width)
+         || !EQ (w->right_fringe_width, right_width)
          || w->fringes_outside_margins != outside))
     {
       WSET (w, left_fringe_width, left_width);
@@ -6194,8 +6191,8 @@
        || EQ (vertical_type, Qt)))
     error ("Invalid type of vertical scroll bar");
 
-  if (!EQ (WGET (w, scroll_bar_width), width)
-      || !EQ (WGET (w, vertical_scroll_bar_type), vertical_type))
+  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);
@@ -6227,7 +6224,7 @@
                              ? WINDOW_CONFIG_SCROLL_BAR_WIDTH (w)
                              : WINDOW_SCROLL_BAR_AREA_WIDTH (w))),
                Fcons (make_number (WINDOW_SCROLL_BAR_COLS (w)),
-                      Fcons (WGET (w, vertical_scroll_bar_type),
+                      Fcons (w->vertical_scroll_bar_type,
                              Fcons (Qnil, Qnil))));
 }
 
@@ -6253,7 +6250,7 @@
   else
     CHECK_WINDOW (window);
   w = XWINDOW (window);
-  f = XFRAME (WGET (w, frame));
+  f = XFRAME (w->frame);
 
   if (FRAME_WINDOW_P (f))
     result = (NILP (pixels_p)
@@ -6287,7 +6284,7 @@
   CHECK_NUMBER_OR_FLOAT (vscroll);
 
   w = XWINDOW (window);
-  f = XFRAME (WGET (w, frame));
+  f = XFRAME (w->frame);
 
   if (FRAME_WINDOW_P (f))
     {
@@ -6306,7 +6303,7 @@
            adjust_glyphs (f);
 
          /* Prevent redisplay shortcuts.  */
-         XBUFFER (WGET (w, buffer))->prevent_redisplay_optimizations_p = 1;
+         XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1;
        }
     }
 
@@ -6340,14 +6337,14 @@
 
   for (cont = 1; w && cont;)
     {
-      if (!NILP (WGET (w, hchild)))
-       cont = foreach_window_1 (XWINDOW (WGET (w, hchild)), fn, user_data);
-      else if (!NILP (WGET (w, vchild)))
-       cont = foreach_window_1 (XWINDOW (WGET (w, vchild)), fn, user_data);
+      if (!NILP (w->hchild))
+       cont = foreach_window_1 (XWINDOW (w->hchild), fn, user_data);
+      else if (!NILP (w->vchild))
+       cont = foreach_window_1 (XWINDOW (w->vchild), fn, user_data);
       else
        cont = fn (w, user_data);
 
-      w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
+      w = NILP (w->next) ? 0 : XWINDOW (w->next);
     }
 
   return cont;

=== modified file 'src/window.h'
--- a/src/window.h      2012-08-07 05:29:25 +0000
+++ b/src/window.h      2012-08-07 07:33:18 +0000
@@ -86,15 +86,9 @@
   int hpos, vpos;
 };
 
-/* Most code should use these macros to access Lisp fields
-   in struct window.  WGET should not be used as lvalue.  */
-
-#define WGET(f, field)                                         \
-  (eassert (offsetof (struct window, field ## _)               \
-           < offsetof (struct window, current_matrix)),        \
-   ((f)->INTERNAL_FIELD (field)))
-
-#define WSET(w, field, value) ((w)->INTERNAL_FIELD (field) = (value))
+/* Most code should use this macro to set Lisp fields in struct window.  */
+
+#define WSET(w, field, value) ((w)->field = (value))
 
 struct window
   {
@@ -102,140 +96,140 @@
     struct vectorlike_header header;
 
     /* The frame this window is on.  */
-    Lisp_Object INTERNAL_FIELD (frame);
+    Lisp_Object frame;
 
     /* Following (to right or down) and preceding (to left or up) child
        at same level of tree.  */
-    Lisp_Object INTERNAL_FIELD (next);
-    Lisp_Object INTERNAL_FIELD (prev);
+    Lisp_Object next;
+    Lisp_Object prev;
 
     /* First child of this window: vchild is used if this is a vertical
        combination, hchild if this is a horizontal combination.  Of the
        fields vchild, hchild and buffer, one and only one is non-nil
        unless the window is dead.  */
-    Lisp_Object INTERNAL_FIELD (hchild);
-    Lisp_Object INTERNAL_FIELD (vchild);
+    Lisp_Object hchild;
+    Lisp_Object vchild;
 
     /* The window this one is a child of.  */
-    Lisp_Object INTERNAL_FIELD (parent);
+    Lisp_Object parent;
 
     /* The upper left corner coordinates of this window, as integers
        relative to upper left corner of frame = 0, 0.  */
-    Lisp_Object INTERNAL_FIELD (left_col);
-    Lisp_Object INTERNAL_FIELD (top_line);
+    Lisp_Object left_col;
+    Lisp_Object top_line;
 
     /* The size of the window.  */
-    Lisp_Object INTERNAL_FIELD (total_lines);
-    Lisp_Object INTERNAL_FIELD (total_cols);
+    Lisp_Object total_lines;
+    Lisp_Object total_cols;
 
     /* The normal size of the window.  */
-    Lisp_Object INTERNAL_FIELD (normal_lines);
-    Lisp_Object INTERNAL_FIELD (normal_cols);
+    Lisp_Object normal_lines;
+    Lisp_Object normal_cols;
 
     /* New sizes of the window.  */
-    Lisp_Object INTERNAL_FIELD (new_total);
-    Lisp_Object INTERNAL_FIELD (new_normal);
+    Lisp_Object new_total;
+    Lisp_Object new_normal;
 
     /* The buffer displayed in this window.  Of the fields vchild,
        hchild and buffer, one and only one is non-nil unless the window
        is dead.  */
-    Lisp_Object INTERNAL_FIELD (buffer);
+    Lisp_Object buffer;
 
     /* A marker pointing to where in the text to start displaying.
        BIDI Note: This is the _logical-order_ start, i.e. the smallest
        buffer position visible in the window, not necessarily the
        character displayed in the top left corner of the window.  */
-    Lisp_Object INTERNAL_FIELD (start);
+    Lisp_Object start;
 
     /* A marker pointing to where in the text point is in this window,
        used only when the window is not selected.
        This exists so that when multiple windows show one buffer
        each one can have its own value of point.  */
-    Lisp_Object INTERNAL_FIELD (pointm);
+    Lisp_Object pointm;
 
     /* No permanent meaning; used by save-window-excursion's
        bookkeeping.  */
-    Lisp_Object INTERNAL_FIELD (temslot);
+    Lisp_Object temslot;
 
     /* This window's vertical scroll bar.  This field is only for use
        by the window-system-dependent code which implements the
        scroll bars; it can store anything it likes here.  If this
        window is newly created and we haven't displayed a scroll bar in
        it yet, or if the frame doesn't have any scroll bars, this is nil.  */
-    Lisp_Object INTERNAL_FIELD (vertical_scroll_bar);
+    Lisp_Object vertical_scroll_bar;
 
     /* Width of left and right marginal areas.  A value of nil means
        no margin.  */
-    Lisp_Object INTERNAL_FIELD (left_margin_cols);
-    Lisp_Object INTERNAL_FIELD (right_margin_cols);
+    Lisp_Object left_margin_cols;
+    Lisp_Object right_margin_cols;
 
     /* Width of left and right fringes.
        A value of nil or t means use frame values.  */
-    Lisp_Object INTERNAL_FIELD (left_fringe_width);
-    Lisp_Object INTERNAL_FIELD (right_fringe_width);
+    Lisp_Object left_fringe_width;
+    Lisp_Object right_fringe_width;
 
     /* Pixel width of scroll bars.
        A value of nil or t means use frame values.  */
-    Lisp_Object INTERNAL_FIELD (scroll_bar_width);
+    Lisp_Object scroll_bar_width;
 
     /* Type of vertical scroll bar.  A value of nil means
        no scroll bar.  A value of t means use frame value.  */
-    Lisp_Object INTERNAL_FIELD (vertical_scroll_bar_type);
+    Lisp_Object vertical_scroll_bar_type;
 
     /* Z - the buffer position of the last glyph in the current matrix
        of W.  Only valid if WINDOW_END_VALID is not nil.  */
-    Lisp_Object INTERNAL_FIELD (window_end_pos);
+    Lisp_Object window_end_pos;
     /* Glyph matrix row of the last glyph in the current matrix
        of W.  Only valid if WINDOW_END_VALID is not nil.  */
-    Lisp_Object INTERNAL_FIELD (window_end_vpos);
+    Lisp_Object window_end_vpos;
     /* t if window_end_pos is truly valid.
        This is nil if nontrivial redisplay is preempted
        since in that case the frame image that window_end_pos
        did not get onto the frame.  */
-    Lisp_Object INTERNAL_FIELD (window_end_valid);
+    Lisp_Object window_end_valid;
 
     /* Display-table to use for displaying chars in this window.
        Nil means use the buffer's own display-table.  */
-    Lisp_Object INTERNAL_FIELD (display_table);
+    Lisp_Object display_table;
 
     /* Non-nil usually means window is marked as dedicated.
        Note Lisp code may set this to something beyond Qnil
        and Qt, so bitfield can't be used here.  */
-    Lisp_Object INTERNAL_FIELD (dedicated);
+    Lisp_Object dedicated;
 
     /* Line number and position of a line somewhere above the top of the
        screen.  If this field is nil, it means we don't have a base
        line.  */
-    Lisp_Object INTERNAL_FIELD (base_line_number);
+    Lisp_Object base_line_number;
     /* If this field is nil, it means we don't have a base line.
        If it is a buffer, it means don't display the line number
        as long as the window shows that buffer.  */
-    Lisp_Object INTERNAL_FIELD (base_line_pos);
+    Lisp_Object base_line_pos;
 
     /* If we have highlighted the region (or any part of it),
        this is the mark position that we used, as an integer.  */
-    Lisp_Object INTERNAL_FIELD (region_showing);
+    Lisp_Object region_showing;
 
     /* The column number currently displayed in this window's mode line,
        or nil if column numbers are not being displayed.  */
-    Lisp_Object INTERNAL_FIELD (column_number_displayed);
+    Lisp_Object column_number_displayed;
 
     /* If redisplay in this window goes beyond this buffer position,
        must run the redisplay-end-trigger-hook.  */
-    Lisp_Object INTERNAL_FIELD (redisplay_end_trigger);
+    Lisp_Object redisplay_end_trigger;
 
     /* t means this window's child windows are not (re-)combined.  */
-    Lisp_Object INTERNAL_FIELD (combination_limit);
+    Lisp_Object combination_limit;
 
     /* Alist of <buffer, window-start, window-point> triples listing
        buffers previously shown in this window.  */
-    Lisp_Object INTERNAL_FIELD (prev_buffers);
+    Lisp_Object prev_buffers;
 
     /* List of buffers re-shown in this window.  */
-    Lisp_Object INTERNAL_FIELD (next_buffers);
+    Lisp_Object next_buffers;
 
     /* An alist with parameters.  */
-    Lisp_Object INTERNAL_FIELD (window_parameters);
+    Lisp_Object window_parameters;
 
     /* No Lisp data may follow below this point without changing
        mark_object in alloc.c.  The member current_matrix must be the
@@ -402,13 +396,13 @@
    This includes scroll bars and fringes.  */
 
 #define WINDOW_TOTAL_COLS(W) \
-  (XFASTINT (WGET (W, total_cols)))
+  (XFASTINT (W->total_cols))
 
 /* Return the height of window W in canonical line units.
    This includes header and mode lines, if any.  */
 
 #define WINDOW_TOTAL_LINES(W) \
-  (XFASTINT (WGET (W, total_lines)))
+  (XFASTINT (W->total_lines))
 
 /* Return the total pixel width of window W.  */
 
@@ -436,7 +430,7 @@
    This includes a left-hand scroll bar, if any.  */
 
 #define WINDOW_LEFT_EDGE_COL(W) \
-  (XFASTINT (WGET (W, left_col)))
+  (XFASTINT (W->left_col))
 
 /* Return the canonical frame column before which window W ends.
    This includes a right-hand scroll bar, if any.  */
@@ -448,7 +442,7 @@
    This includes a header line, if any.  */
 
 #define WINDOW_TOP_EDGE_LINE(W) \
-  (XFASTINT (WGET (W, top_line)))
+  (XFASTINT (W->top_line))
 
 /* Return the canonical frame line before which window W ends.
    This includes a mode line, if any.  */
@@ -552,32 +546,32 @@
 
 /* Width of left margin area in columns.  */
 
-#define WINDOW_LEFT_MARGIN_COLS(W)                     \
-  (NILP (WGET (W, left_margin_cols))                   \
-   ? 0                                                 \
-   : XINT (WGET (W, left_margin_cols)))
+#define WINDOW_LEFT_MARGIN_COLS(W)     \
+  (NILP (W->left_margin_cols)          \
+   ? 0                                 \
+   : XINT (W->left_margin_cols))
 
 /* Width of right marginal area in columns.  */
 
-#define WINDOW_RIGHT_MARGIN_COLS(W)                    \
-  (NILP (WGET (W, right_margin_cols))                  \
-   ? 0                                                 \
-   : XINT (WGET (W, right_margin_cols)))
+#define WINDOW_RIGHT_MARGIN_COLS(W)    \
+  (NILP (W->right_margin_cols)         \
+   ? 0                                 \
+   : XINT (W->right_margin_cols))
 
 /* Width of left margin area in pixels.  */
 
-#define WINDOW_LEFT_MARGIN_WIDTH(W)                    \
-  (NILP (WGET (W, left_margin_cols))                   \
-   ? 0                                                 \
-   : (XINT (WGET (W, left_margin_cols))                        \
+#define WINDOW_LEFT_MARGIN_WIDTH(W)    \
+  (NILP (W->left_margin_cols)          \
+   ? 0                                 \
+   : (XINT (W->left_margin_cols)       \
       * WINDOW_FRAME_COLUMN_WIDTH (W)))
 
 /* Width of right marginal area in pixels.  */
 
-#define WINDOW_RIGHT_MARGIN_WIDTH(W)                   \
-  (NILP (WGET (W, right_margin_cols))                  \
-   ? 0                                                 \
-   : (XINT (WGET (W, right_margin_cols))               \
+#define WINDOW_RIGHT_MARGIN_WIDTH(W)   \
+  (NILP (W->right_margin_cols)         \
+   ? 0                                 \
+   : (XINT (W->right_margin_cols)      \
       * WINDOW_FRAME_COLUMN_WIDTH (W)))
 
 /* Total width of fringes reserved for drawing truncation bitmaps,
@@ -586,37 +580,37 @@
    sizes aren't pixel values.  If it weren't the case, we wouldn't be
    able to split windows horizontally nicely.  */
 
-#define WINDOW_FRINGE_COLS(W)                          \
-  ((INTEGERP (WGET (W, left_fringe_width))             \
-    || INTEGERP (WGET (W, right_fringe_width)))                \
-   ? ((WINDOW_LEFT_FRINGE_WIDTH (W)                    \
-       + WINDOW_RIGHT_FRINGE_WIDTH (W)                 \
-       + WINDOW_FRAME_COLUMN_WIDTH (W) - 1)            \
-      / WINDOW_FRAME_COLUMN_WIDTH (W))                 \
+#define WINDOW_FRINGE_COLS(W)                  \
+  ((INTEGERP (W->left_fringe_width)            \
+    || INTEGERP (W->right_fringe_width))       \
+   ? ((WINDOW_LEFT_FRINGE_WIDTH (W)            \
+       + WINDOW_RIGHT_FRINGE_WIDTH (W)         \
+       + WINDOW_FRAME_COLUMN_WIDTH (W) - 1)    \
+      / WINDOW_FRAME_COLUMN_WIDTH (W))         \
    : FRAME_FRINGE_COLS (WINDOW_XFRAME (W)))
 
 /* Column-width of the left and right fringe.  */
 
-#define WINDOW_LEFT_FRINGE_COLS(W)                     \
-  ((WINDOW_LEFT_FRINGE_WIDTH ((W))                     \
-    + WINDOW_FRAME_COLUMN_WIDTH (W) - 1)               \
+#define WINDOW_LEFT_FRINGE_COLS(W)             \
+  ((WINDOW_LEFT_FRINGE_WIDTH ((W))             \
+    + WINDOW_FRAME_COLUMN_WIDTH (W) - 1)       \
    / WINDOW_FRAME_COLUMN_WIDTH (W))
 
-#define WINDOW_RIGHT_FRINGE_COLS(W)                    \
-  ((WINDOW_RIGHT_FRINGE_WIDTH ((W))                    \
-    + WINDOW_FRAME_COLUMN_WIDTH (W) - 1)               \
+#define WINDOW_RIGHT_FRINGE_COLS(W)            \
+  ((WINDOW_RIGHT_FRINGE_WIDTH ((W))            \
+    + WINDOW_FRAME_COLUMN_WIDTH (W) - 1)       \
    / WINDOW_FRAME_COLUMN_WIDTH (W))
 
 /* Pixel-width of the left and right fringe.  */
 
 #define WINDOW_LEFT_FRINGE_WIDTH(W)                    \
-  (INTEGERP (WGET (W, left_fringe_width))              \
-   ? XFASTINT (WGET (W, left_fringe_width))            \
+  (INTEGERP (W->left_fringe_width)                     \
+   ? XFASTINT (W->left_fringe_width)                   \
    : FRAME_LEFT_FRINGE_WIDTH (WINDOW_XFRAME (W)))
 
 #define WINDOW_RIGHT_FRINGE_WIDTH(W)                   \
-  (INTEGERP (WGET (W, right_fringe_width))             \
-   ? XFASTINT (WGET (W, right_fringe_width))           \
+  (INTEGERP (W->right_fringe_width)                    \
+   ? XFASTINT (W->right_fringe_width)                  \
    : FRAME_RIGHT_FRINGE_WIDTH (WINDOW_XFRAME (W)))
 
 /* Total width of fringes in pixels.  */
@@ -633,36 +627,36 @@
    and which side they are on.  */
 
 #define WINDOW_VERTICAL_SCROLL_BAR_TYPE(w)             \
-  (EQ (WGET (w, vertical_scroll_bar_type), Qt)         \
+  (EQ (w->vertical_scroll_bar_type, Qt)                        \
    ? FRAME_VERTICAL_SCROLL_BAR_TYPE (WINDOW_XFRAME (w))        \
-   : EQ (WGET (w, vertical_scroll_bar_type), Qleft)    \
+   : EQ (w->vertical_scroll_bar_type, Qleft)           \
    ? vertical_scroll_bar_left                          \
-   : EQ (WGET (w, vertical_scroll_bar_type), Qright)   \
+   : EQ (w->vertical_scroll_bar_type, Qright)          \
    ? vertical_scroll_bar_right                         \
    : vertical_scroll_bar_none)                         \
 
 #define WINDOW_HAS_VERTICAL_SCROLL_BAR(w)              \
-  (EQ (WGET (w, vertical_scroll_bar_type), Qt)         \
+  (EQ (w->vertical_scroll_bar_type, Qt)                        \
    ? FRAME_HAS_VERTICAL_SCROLL_BARS (WINDOW_XFRAME (w))        \
-   : !NILP (WGET (w, vertical_scroll_bar_type)))
+   : !NILP (w->vertical_scroll_bar_type))
 
 #define WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT(w)              \
-  (EQ (WGET (w, vertical_scroll_bar_type), Qt)                 \
+  (EQ (w->vertical_scroll_bar_type, Qt)                                \
    ? FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (WINDOW_XFRAME (w))        \
-   : EQ (WGET (w, vertical_scroll_bar_type), Qleft))
+   : EQ (w->vertical_scroll_bar_type, Qleft))
 
-#define WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT(w)             \
-  (EQ (WGET (w, vertical_scroll_bar_type), Qt)                 \
-   ? FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (WINDOW_XFRAME (w))\
-   : EQ (WGET (w, vertical_scroll_bar_type), Qright))
+#define WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT(w)                     \
+  (EQ (w->vertical_scroll_bar_type, Qt)                                        
\
+   ? FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (WINDOW_XFRAME (w))       \
+   : EQ (w->vertical_scroll_bar_type, Qright))
 
 /* Width that a scroll bar in window W should have, if there is one.
    Measured in pixels.  If scroll bars are turned off, this is still
    nonzero.  */
 
 #define WINDOW_CONFIG_SCROLL_BAR_WIDTH(w)              \
-  (INTEGERP (WGET (w, scroll_bar_width))               \
-   ? XFASTINT (WGET (w, scroll_bar_width))             \
+  (INTEGERP (w->scroll_bar_width)                      \
+   ? XFASTINT (w->scroll_bar_width)                    \
    : FRAME_CONFIG_SCROLL_BAR_WIDTH (WINDOW_XFRAME (w)))
 
 /* Width that a scroll bar in window W should have, if there is one.
@@ -670,8 +664,8 @@
    this is still nonzero.  */
 
 #define WINDOW_CONFIG_SCROLL_BAR_COLS(w)               \
-  (INTEGERP (WGET (w, scroll_bar_width))               \
-   ? ((XFASTINT (WGET (w, scroll_bar_width))           \
+  (INTEGERP (w->scroll_bar_width)                      \
+   ? ((XFASTINT (w->scroll_bar_width)                  \
        + WINDOW_FRAME_COLUMN_WIDTH (w) - 1)            \
       / WINDOW_FRAME_COLUMN_WIDTH (w))                 \
    : FRAME_CONFIG_SCROLL_BAR_COLS (WINDOW_XFRAME (w)))
@@ -681,14 +675,14 @@
    the right in this frame, or there are no scroll bars, value is 0.  */
 
 #define WINDOW_LEFT_SCROLL_BAR_COLS(w)        \
-  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) \
+  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)  \
    ? (WINDOW_CONFIG_SCROLL_BAR_COLS (w))       \
    : 0)
 
 /* Width of a left scroll bar area in window W , measured in pixels.  */
 
-#define WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH(w) \
-  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) \
+#define WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH(w)                            \
+  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)                           \
    ? (WINDOW_CONFIG_SCROLL_BAR_COLS (w) * WINDOW_FRAME_COLUMN_WIDTH (w)) \
    : 0)
 
@@ -697,7 +691,7 @@
    the left in this frame, or there are no scroll bars, value is 0.  */
 
 #define WINDOW_RIGHT_SCROLL_BAR_COLS(w)                \
-  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w) \
+  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w) \
    ? WINDOW_CONFIG_SCROLL_BAR_COLS (w)         \
    : 0)
 
@@ -719,7 +713,7 @@
 /* Width of a left scroll bar area in window W , measured in pixels.  */
 
 #define WINDOW_SCROLL_BAR_AREA_WIDTH(w)                                        
 \
-  (WINDOW_HAS_VERTICAL_SCROLL_BAR (w)                                  \
+  (WINDOW_HAS_VERTICAL_SCROLL_BAR (w)                                   \
    ? (WINDOW_CONFIG_SCROLL_BAR_COLS (w) * WINDOW_FRAME_COLUMN_WIDTH (w)) \
    : 0)
 
@@ -740,7 +734,7 @@
    ? CURRENT_MODE_LINE_HEIGHT (W)      \
    : 0)
 
-#define WINDOW_MODE_LINE_LINES(W)              \
+#define WINDOW_MODE_LINE_LINES(W)      \
   (!! WINDOW_WANTS_MODELINE_P ((W)))
 
 /* Height in pixels, and in lines, of the header line.
@@ -751,7 +745,7 @@
    ? CURRENT_HEADER_LINE_HEIGHT (W)    \
    : 0)
 
-#define WINDOW_HEADER_LINE_LINES(W)            \
+#define WINDOW_HEADER_LINE_LINES(W)    \
   (!! WINDOW_WANTS_HEADER_LINE_P ((W)))
 
 /* Pixel height of window W without mode line.  */
@@ -762,36 +756,36 @@
 
 /* Pixel height of window W without mode and header line.  */
 
-#define WINDOW_BOX_TEXT_HEIGHT(W)              \
-  (WINDOW_TOTAL_HEIGHT ((W))                   \
-   - WINDOW_MODE_LINE_HEIGHT ((W))             \
+#define WINDOW_BOX_TEXT_HEIGHT(W)      \
+  (WINDOW_TOTAL_HEIGHT ((W))           \
+   - WINDOW_MODE_LINE_HEIGHT ((W))     \
    - WINDOW_HEADER_LINE_HEIGHT ((W)))
 
 
 /* Convert window W relative pixel X to frame pixel coordinates.  */
 
-#define WINDOW_TO_FRAME_PIXEL_X(W, X)          \
+#define WINDOW_TO_FRAME_PIXEL_X(W, X)  \
   ((X) + WINDOW_BOX_LEFT_EDGE_X ((W)))
 
 /* Convert window W relative pixel Y to frame pixel coordinates.  */
 
-#define WINDOW_TO_FRAME_PIXEL_Y(W, Y)          \
+#define WINDOW_TO_FRAME_PIXEL_Y(W, Y)  \
   ((Y) + WINDOW_TOP_EDGE_Y ((W)))
 
 /* Convert frame relative pixel X to window relative pixel X.  */
 
-#define FRAME_TO_WINDOW_PIXEL_X(W, X)          \
+#define FRAME_TO_WINDOW_PIXEL_X(W, X)  \
   ((X) - WINDOW_BOX_LEFT_EDGE_X ((W)))
 
 /* Convert frame relative pixel Y to window relative pixel Y.  */
 
-#define FRAME_TO_WINDOW_PIXEL_Y(W, Y)          \
+#define FRAME_TO_WINDOW_PIXEL_Y(W, Y)  \
   ((Y) - WINDOW_TOP_EDGE_Y ((W)))
 
 /* Convert a text area relative x-position in window W to frame X
    pixel coordinates.  */
 
-#define WINDOW_TEXT_TO_FRAME_PIXEL_X(W, X)             \
+#define WINDOW_TEXT_TO_FRAME_PIXEL_X(W, X)     \
   (window_box_left ((W), TEXT_AREA) + (X))
 
 /* This is the window in which the terminal's cursor should
@@ -894,7 +888,7 @@
 /* Value is non-zero if WINDOW is a live window.  */
 
 #define WINDOW_LIVE_P(WINDOW)                                  \
-  (WINDOWP (WINDOW) && !NILP (WGET (XWINDOW (WINDOW), buffer)))
+  (WINDOWP (WINDOW) && !NILP (XWINDOW (WINDOW)->buffer))
 
 /* These used to be in lisp.h.  */
 

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2012-08-07 05:29:25 +0000
+++ b/src/xdisp.c       2012-08-07 07:33:18 +0000
@@ -984,7 +984,7 @@
 int
 window_box_width (struct window *w, int area)
 {
-  int cols = XFASTINT (WGET (w, total_cols));
+  int cols = XFASTINT (w->total_cols);
   int pixels = 0;
 
   if (!w->pseudo_window_p)
@@ -993,22 +993,22 @@
 
       if (area == TEXT_AREA)
        {
-         if (INTEGERP (WGET (w, left_margin_cols)))
-           cols -= XFASTINT (WGET (w, left_margin_cols));
-         if (INTEGERP (WGET (w, right_margin_cols)))
-           cols -= XFASTINT (WGET (w, right_margin_cols));
+         if (INTEGERP (w->left_margin_cols))
+           cols -= XFASTINT (w->left_margin_cols);
+         if (INTEGERP (w->right_margin_cols))
+           cols -= XFASTINT (w->right_margin_cols);
          pixels = -WINDOW_TOTAL_FRINGE_WIDTH (w);
        }
       else if (area == LEFT_MARGIN_AREA)
        {
-         cols = (INTEGERP (WGET (w, left_margin_cols))
-                  ? XFASTINT (WGET (w, left_margin_cols)) : 0);
+         cols = (INTEGERP (w->left_margin_cols)
+                  ? XFASTINT (w->left_margin_cols) : 0);
          pixels = 0;
        }
       else if (area == RIGHT_MARGIN_AREA)
        {
-         cols = (INTEGERP (WGET (w, right_margin_cols))
-                  ? XFASTINT (WGET (w, right_margin_cols)) : 0);
+         cols = (INTEGERP (w->right_margin_cols)
+                  ? XFASTINT (w->right_margin_cols) : 0);
          pixels = 0;
        }
     }
@@ -1023,7 +1023,7 @@
 int
 window_box_height (struct window *w)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   int height = WINDOW_TOTAL_HEIGHT (w);
 
   eassert (height >= 0);
@@ -1112,7 +1112,7 @@
 int
 window_box_left (struct window *w, int area)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   int x;
 
   if (w->pseudo_window_p)
@@ -1288,13 +1288,13 @@
   if (FRAME_INITIAL_P (XFRAME (WINDOW_FRAME (w))))
     return visible_p;
 
-  if (XBUFFER (WGET (w, buffer)) != current_buffer)
+  if (XBUFFER (w->buffer) != current_buffer)
     {
       old_buffer = current_buffer;
-      set_buffer_internal_1 (XBUFFER (WGET (w, buffer)));
+      set_buffer_internal_1 (XBUFFER (w->buffer));
     }
 
-  SET_TEXT_POS_FROM_MARKER (top, WGET (w, start));
+  SET_TEXT_POS_FROM_MARKER (top, w->start);
   /* Scrolling a minibuffer window via scroll bar when the echo area
      shows long text sometimes resets the minibuffer contents behind
      our backs.  */
@@ -1913,7 +1913,7 @@
     {
       /* A pseudo-window is always full-width, and starts at the
         left edge of the frame, plus a frame border.  */
-      struct frame *f = XFRAME (WGET (w, frame));
+      struct frame *f = XFRAME (w->frame);
       *x -= FRAME_INTERNAL_BORDER_WIDTH (f);
       *y = FRAME_TO_WINDOW_PIXEL_Y (w, *y);
     }
@@ -2522,11 +2522,11 @@
 check_window_end (struct window *w)
 {
   if (!MINI_WINDOW_P (w)
-      && !NILP (WGET (w, window_end_valid)))
+      && !NILP (w->window_end_valid))
     {
       struct glyph_row *row;
       eassert ((row = MATRIX_ROW (w->current_matrix,
-                                 XFASTINT (WGET (w, window_end_vpos))),
+                                 XFASTINT (w->window_end_vpos)),
                !row->enabled_p
                || MATRIX_ROW_DISPLAYS_TEXT_P (row)
                || MATRIX_ROW_VPOS (row, w->current_matrix) == 0));
@@ -2592,7 +2592,7 @@
   /* Perhaps remap BASE_FACE_ID to a user-specified alternative.  */
   if (! NILP (Vface_remapping_alist))
     remapped_base_face_id
-      = lookup_basic_face (XFRAME (WGET (w, frame)), base_face_id);
+      = lookup_basic_face (XFRAME (w->frame), base_face_id);
 
   /* Use one of the mode line rows of W's desired matrix if
      appropriate.  */
@@ -2620,7 +2620,7 @@
   /* The window in which we iterate over current_buffer:  */
   XSETWINDOW (it->window, w);
   it->w = w;
-  it->f = XFRAME (WGET (w, frame));
+  it->f = XFRAME (w->frame);
 
   it->cmp_it.id = -1;
 
@@ -2704,13 +2704,13 @@
 
   /* Get the position at which the redisplay_end_trigger hook should
      be run, if it is to be run at all.  */
-  if (MARKERP (WGET (w, redisplay_end_trigger))
-      && XMARKER (WGET (w, redisplay_end_trigger))->buffer != 0)
+  if (MARKERP (w->redisplay_end_trigger)
+      && XMARKER (w->redisplay_end_trigger)->buffer != 0)
     it->redisplay_end_trigger_charpos
-      = marker_position (WGET (w, redisplay_end_trigger));
-  else if (INTEGERP (WGET (w, redisplay_end_trigger)))
+      = marker_position (w->redisplay_end_trigger);
+  else if (INTEGERP (w->redisplay_end_trigger))
     it->redisplay_end_trigger_charpos =
-      clip_to_bounds (PTRDIFF_MIN, XINT (WGET (w, redisplay_end_trigger)), 
PTRDIFF_MAX);
+      clip_to_bounds (PTRDIFF_MIN, XINT (w->redisplay_end_trigger), 
PTRDIFF_MAX);
 
   it->tab_width = SANE_TAB_WIDTH (current_buffer);
 
@@ -4408,7 +4408,7 @@
      if it was a text property.  */
 
   if (!STRINGP (it->string))
-    object = WGET (it->w, buffer);
+    object = it->w->buffer;
 
   display_replaced_p = handle_display_spec (it, propval, object, overlay,
                                            position, bufpos,
@@ -4816,7 +4816,7 @@
          it->what = IT_IMAGE;
          it->image_id = -1; /* no image */
          it->position = start_pos;
-         it->object = NILP (object) ? WGET (it->w, buffer) : object;
+         it->object = NILP (object) ? it->w->buffer : object;
          it->method = GET_FROM_IMAGE;
          it->from_overlay = Qnil;
          it->face_id = face_id;
@@ -4962,7 +4962,7 @@
          it->what = IT_IMAGE;
          it->image_id = lookup_image (it->f, value);
          it->position = start_pos;
-         it->object = NILP (object) ? WGET (it->w, buffer) : object;
+         it->object = NILP (object) ? it->w->buffer : object;
          it->method = GET_FROM_IMAGE;
 
          /* Say that we haven't consumed the characters with
@@ -5785,7 +5785,7 @@
       it->object = p->u.stretch.object;
       break;
     case GET_FROM_BUFFER:
-      it->object = WGET (it->w, buffer);
+      it->object = it->w->buffer;
       break;
     case GET_FROM_STRING:
       it->object = it->string;
@@ -5798,7 +5798,7 @@
       else
        {
          it->method = GET_FROM_BUFFER;
-         it->object = WGET (it->w, buffer);
+         it->object = it->w->buffer;
        }
     }
   it->end_charpos = p->end_charpos;
@@ -6236,7 +6236,7 @@
   IT_STRING_BYTEPOS (*it) = -1;
   it->string = Qnil;
   it->method = GET_FROM_BUFFER;
-  it->object = WGET (it->w, buffer);
+  it->object = it->w->buffer;
   it->area = TEXT_AREA;
   it->multibyte_p = !NILP (BVAR (current_buffer, enable_multibyte_characters));
   it->sp = 0;
@@ -7085,7 +7085,7 @@
          else
            {
              it->method = GET_FROM_BUFFER;
-             it->object = WGET (it->w, buffer);
+             it->object = it->w->buffer;
            }
 
          it->dpvec = NULL;
@@ -7660,7 +7660,7 @@
         setting face_before_selective_p.  */
       it->saved_face_id = it->face_id;
       it->method = GET_FROM_BUFFER;
-      it->object = WGET (it->w, buffer);
+      it->object = it->w->buffer;
       reseat_at_next_visible_line_start (it, 1);
       it->face_before_selective_p = 1;
     }
@@ -7924,7 +7924,7 @@
 
       /* Record what we have and where it came from.  */
       it->what = IT_CHARACTER;
-      it->object = WGET (it->w, buffer);
+      it->object = it->w->buffer;
       it->position = it->current.pos;
 
       /* Normally we return the character found above, except when we
@@ -8030,7 +8030,7 @@
          return 0;
        }
       it->position = it->current.pos;
-      it->object = WGET (it->w, buffer);
+      it->object = it->w->buffer;
       it->c = composition_update_it (&it->cmp_it, IT_CHARPOS (*it),
                                     IT_BYTEPOS (*it), Qnil);
     }
@@ -8891,7 +8891,7 @@
       && it->current_x == it->last_visible_x - 1
       && it->c != '\n'
       && it->c != '\t'
-      && it->vpos < XFASTINT (WGET (it->w, window_end_vpos)))
+      && it->vpos < XFASTINT (it->w->window_end_vpos))
     {
       it->continuation_lines_width += it->current_x;
       it->current_x = it->hpos = it->max_ascent = it->max_descent = 0;
@@ -9643,7 +9643,7 @@
       /* Get the frame containing the mini-buffer
         that the selected frame is using.  */
       mini_window = FRAME_MINIBUF_WINDOW (sf);
-      frame = WGET (XWINDOW (mini_window), frame);
+      frame = XWINDOW (mini_window)->frame;
       f = XFRAME (frame);
 
       FRAME_SAMPLE_VISIBILITY (f);
@@ -9970,7 +9970,7 @@
   if (w)
     {
       WSET (w, buffer, buffer);
-      set_marker_both (WGET (w, pointm), buffer, BEG, BEG_BYTE);
+      set_marker_both (w->pointm, buffer, BEG, BEG_BYTE);
     }
 
   BVAR (current_buffer, undo_list) = Qt;
@@ -10018,9 +10018,9 @@
   if (w)
     {
       XSETWINDOW (tmp, w); ASET (vector, i, tmp); ++i;
-      ASET (vector, i, WGET (w, buffer)); ++i;
-      ASET (vector, i, make_number (XMARKER (WGET (w, pointm))->charpos)); ++i;
-      ASET (vector, i, make_number (XMARKER (WGET (w, pointm))->bytepos)); ++i;
+      ASET (vector, i, w->buffer); ++i;
+      ASET (vector, i, make_number (XMARKER (w->pointm)->charpos)); ++i;
+      ASET (vector, i, make_number (XMARKER (w->pointm)->bytepos)); ++i;
     }
   else
     {
@@ -10055,7 +10055,7 @@
       bytepos = AREF (vector, 6);
 
       WSET (w, buffer, buffer);
-      set_marker_both (WGET (w, pointm), buffer,
+      set_marker_both (w->pointm, buffer,
                       XFASTINT (charpos), XFASTINT (bytepos));
     }
 
@@ -10194,7 +10194,7 @@
   window_height_changed_p = resize_mini_window (w, 0);
 
   /* Use the starting position chosen by resize_mini_window.  */
-  SET_TEXT_POS_FROM_MARKER (start, WGET (w, start));
+  SET_TEXT_POS_FROM_MARKER (start, w->start);
 
   /* Display.  */
   clear_glyph_matrix (w->desired_matrix);
@@ -10265,15 +10265,15 @@
 int
 resize_mini_window (struct window *w, int exact_p)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   int window_height_changed_p = 0;
 
   eassert (MINI_WINDOW_P (w));
 
   /* By default, start display at the beginning.  */
-  set_marker_both (WGET (w, start), WGET (w, buffer),
-                  BUF_BEGV (XBUFFER (WGET (w, buffer))),
-                  BUF_BEGV_BYTE (XBUFFER (WGET (w, buffer))));
+  set_marker_both (w->start, w->buffer,
+                  BUF_BEGV (XBUFFER (w->buffer)),
+                  BUF_BEGV_BYTE (XBUFFER (w->buffer)));
 
   /* Don't resize windows while redisplaying a window; it would
      confuse redisplay functions when the size of the window they are
@@ -10300,10 +10300,10 @@
       struct text_pos start;
       struct buffer *old_current_buffer = NULL;
 
-      if (current_buffer != XBUFFER (WGET (w, buffer)))
+      if (current_buffer != XBUFFER (w->buffer))
        {
          old_current_buffer = current_buffer;
-         set_buffer_internal (XBUFFER (WGET (w, buffer)));
+         set_buffer_internal (XBUFFER (w->buffer));
        }
 
       init_iterator (&it, w, BEGV, BEGV_BYTE, NULL, DEFAULT_FACE_ID);
@@ -10345,7 +10345,7 @@
        }
       else
        SET_TEXT_POS (start, BEGV, BEGV_BYTE);
-      SET_MARKER_FROM_TEXT_POS (WGET (w, start), start);
+      SET_MARKER_FROM_TEXT_POS (w->start, start);
 
       if (EQ (Vresize_mini_windows, Qgrow_only))
        {
@@ -11053,7 +11053,7 @@
 
       Fselect_window (f->selected_window, Qt);
       set_buffer_internal_1
-       (XBUFFER (WGET (XWINDOW (f->selected_window), buffer)));
+       (XBUFFER (XWINDOW (f->selected_window)->buffer));
       fmt = FRAME_ICONIFIED_P (f) ? Vicon_title_format : Vframe_title_format;
 
       mode_line_target = MODE_LINE_TITLE;
@@ -11172,8 +11172,7 @@
           if (windows_or_buffers_changed
              && FRAME_NS_P (f))
             ns_set_doc_edited
-             (f, Fbuffer_modified_p
-              (WGET (XWINDOW (f->selected_window), buffer)));
+             (f, Fbuffer_modified_p (XWINDOW (f->selected_window)->buffer));
 #endif
          UNGCPRO;
        }
@@ -11238,19 +11237,19 @@
          /* This used to test w->update_mode_line, but we believe
             there is no need to recompute the menu in that case.  */
          || update_mode_lines
-         || ((BUF_SAVE_MODIFF (XBUFFER (WGET (w, buffer)))
-              < BUF_MODIFF (XBUFFER (WGET (w, buffer))))
+         || ((BUF_SAVE_MODIFF (XBUFFER (w->buffer))
+              < BUF_MODIFF (XBUFFER (w->buffer)))
              != w->last_had_star)
          || ((!NILP (Vtransient_mark_mode)
-              && !NILP (BVAR (XBUFFER (WGET (w, buffer)), mark_active)))
-             != !NILP (WGET (w, region_showing))))
+              && !NILP (BVAR (XBUFFER (w->buffer), mark_active)))
+             != !NILP (w->region_showing)))
        {
          struct buffer *prev = current_buffer;
          ptrdiff_t count = SPECPDL_INDEX ();
 
          specbind (Qinhibit_menubar_update, Qt);
 
-         set_buffer_internal_1 (XBUFFER (WGET (w, buffer)));
+         set_buffer_internal_1 (XBUFFER (w->buffer));
          if (save_match_data)
            record_unwind_save_match_data ();
          if (NILP (Voverriding_local_map_menu_flag))
@@ -11436,12 +11435,12 @@
       if (windows_or_buffers_changed
          || w->update_mode_line
          || update_mode_lines
-         || ((BUF_SAVE_MODIFF (XBUFFER (WGET (w, buffer)))
-              < BUF_MODIFF (XBUFFER (WGET (w, buffer))))
+         || ((BUF_SAVE_MODIFF (XBUFFER (w->buffer))
+              < BUF_MODIFF (XBUFFER (w->buffer)))
              != w->last_had_star)
          || ((!NILP (Vtransient_mark_mode)
-              && !NILP (BVAR (XBUFFER (WGET (w, buffer)), mark_active)))
-             != !NILP (WGET (w, region_showing))))
+              && !NILP (BVAR (XBUFFER (w->buffer), mark_active)))
+             != !NILP (w->region_showing)))
        {
          struct buffer *prev = current_buffer;
          ptrdiff_t count = SPECPDL_INDEX ();
@@ -11452,7 +11451,7 @@
          /* Set current_buffer to the buffer of the selected
             window of the frame, so that we get the right local
             keymaps.  */
-         set_buffer_internal_1 (XBUFFER (WGET (w, buffer)));
+         set_buffer_internal_1 (XBUFFER (w->buffer));
 
          /* Save match data, if we must.  */
          if (save_match_data)
@@ -12323,10 +12322,10 @@
     {
       struct window *w = XWINDOW (window);
 
-      if (WINDOWP (WGET (w, hchild)))
-       hscrolled_p |= hscroll_window_tree (WGET (w, hchild));
-      else if (WINDOWP (WGET (w, vchild)))
-       hscrolled_p |= hscroll_window_tree (WGET (w, vchild));
+      if (WINDOWP (w->hchild))
+       hscrolled_p |= hscroll_window_tree (w->hchild);
+      else if (WINDOWP (w->vchild))
+       hscrolled_p |= hscroll_window_tree (w->vchild);
       else if (w->cursor.vpos >= 0)
        {
          int h_margin;
@@ -12346,7 +12345,7 @@
          /* Scroll when cursor is inside this scroll margin.  */
          h_margin = hscroll_margin * WINDOW_FRAME_COLUMN_WIDTH (w);
 
-         if (!NILP (Fbuffer_local_value (Qauto_hscroll_mode, WGET (w, buffer)))
+         if (!NILP (Fbuffer_local_value (Qauto_hscroll_mode, w->buffer))
              /* For left-to-right rows, hscroll when cursor is either
                 (i) inside the right hscroll margin, or (ii) if it is
                 inside the left margin and the window is already
@@ -12381,13 +12380,13 @@
 
              /* Find point in a display of infinite width.  */
              saved_current_buffer = current_buffer;
-             current_buffer = XBUFFER (WGET (w, buffer));
+             current_buffer = XBUFFER (w->buffer);
 
              if (w == XWINDOW (selected_window))
                pt = PT;
              else
                {
-                 pt = marker_position (WGET (w, pointm));
+                 pt = marker_position (w->pointm);
                  pt = max (BEGV, pt);
                  pt = min (ZV, pt);
                }
@@ -12438,14 +12437,14 @@
                 redisplay.  */
              if (w->hscroll != hscroll)
                {
-                 XBUFFER (WGET (w, buffer))->prevent_redisplay_optimizations_p 
= 1;
+                 XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1;
                  w->hscroll = hscroll;
                  hscrolled_p = 1;
                }
            }
        }
 
-      window = WGET (w, next);
+      window = w->next;
     }
 
   /* Value is non-zero if hscroll of any leaf window has been changed.  */
@@ -12527,9 +12526,9 @@
   if (trace_redisplay_p)
     fprintf (stderr, "%p (%s): %s\n",
             w,
-            ((BUFFERP (WGET (w, buffer))
-              && STRINGP (BVAR (XBUFFER (WGET (w, buffer)), name)))
-             ? SSDATA (BVAR (XBUFFER (WGET (w, buffer)), name))
+            ((BUFFERP (w->buffer)
+              && STRINGP (BVAR (XBUFFER (w->buffer), name)))
+             ? SSDATA (BVAR (XBUFFER (w->buffer), name))
              : "no buffer"),
             method + len);
 }
@@ -12594,8 +12593,8 @@
         require to redisplay the whole paragraph.  It might be worthwhile
         to find the paragraph limits and widen the range of redisplayed
         lines to that, but for now just give up this optimization.  */
-      if (!NILP (BVAR (XBUFFER (WGET (w, buffer)), bidi_display_reordering))
-         && NILP (BVAR (XBUFFER (WGET (w, buffer)), bidi_paragraph_direction)))
+      if (!NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering))
+         && NILP (BVAR (XBUFFER (w->buffer), bidi_paragraph_direction)))
        unchanged_p = 0;
     }
 
@@ -12807,7 +12806,7 @@
 reconsider_clip_changes (struct window *w, struct buffer *b)
 {
   if (b->clip_changed
-          && !NILP (WGET (w, window_end_valid))
+          && !NILP (w->window_end_valid)
           && w->current_matrix->buffer == b
           && w->current_matrix->zv == BUF_ZV (b)
           && w->current_matrix->begv == BUF_BEGV (b))
@@ -12819,20 +12818,20 @@
      b->clip_changed has already been set to 1, we can skip this
      check.  */
   if (!b->clip_changed
-      && BUFFERP (WGET (w, buffer)) && !NILP (WGET (w, window_end_valid)))
+      && BUFFERP (w->buffer) && !NILP (w->window_end_valid))
     {
       ptrdiff_t pt;
 
       if (w == XWINDOW (selected_window))
        pt = PT;
       else
-       pt = marker_position (WGET (w, pointm));
+       pt = marker_position (w->pointm);
 
-      if ((w->current_matrix->buffer != XBUFFER (WGET (w, buffer))
+      if ((w->current_matrix->buffer != XBUFFER (w->buffer)
           || pt != w->last_point)
          && check_point_in_composition (w->current_matrix->buffer,
                                         w->last_point,
-                                        XBUFFER (WGET (w, buffer)), pt))
+                                        XBUFFER (w->buffer), pt))
        b->clip_changed = 1;
     }
 }
@@ -12915,7 +12914,7 @@
   /* Don't examine these until after testing Vinhibit_redisplay.
      When Emacs is shutting down, perhaps because its connection to
      X has dropped, we should not look at them at all.  */
-  fr = XFRAME (WGET (w, frame));
+  fr = XFRAME (w->frame);
   sf = SELECTED_FRAME ();
 
   if (!fr->glyphs_initialized_p)
@@ -13051,18 +13050,18 @@
   specbind (Qinhibit_point_motion_hooks, Qt);
 
   /* If %c is in the mode line, update it if needed.  */
-  if (!NILP (WGET (w, column_number_displayed))
+  if (!NILP (w->column_number_displayed)
       /* This alternative quickly identifies a common case
         where no change is needed.  */
       && !(PT == w->last_point
           && w->last_modified >= MODIFF
           && w->last_overlay_modified >= OVERLAY_MODIFF)
-      && (XFASTINT (WGET (w, column_number_displayed)) != current_column ()))
+      && (XFASTINT (w->column_number_displayed) != current_column ()))
     w->update_mode_line = 1;
 
   unbind_to (count1, Qnil);
 
-  FRAME_SCROLL_BOTTOM_VPOS (XFRAME (WGET (w, frame))) = -1;
+  FRAME_SCROLL_BOTTOM_VPOS (XFRAME (w->frame)) = -1;
 
   /* The variable buffer_shared is set in redisplay_window and
      indicates that we redisplay a buffer in different windows.  See
@@ -13146,11 +13145,11 @@
      the whole window.  The assignment to this_line_start_pos prevents
      the optimization directly below this if-statement.  */
   if (((!NILP (Vtransient_mark_mode)
-       && !NILP (BVAR (XBUFFER (WGET (w, buffer)), mark_active)))
-       != !NILP (WGET (w, region_showing)))
-      || (!NILP (WGET (w, region_showing))
-         && !EQ (WGET (w, region_showing),
-                 Fmarker_position (BVAR (XBUFFER (WGET (w, buffer)), mark)))))
+       && !NILP (BVAR (XBUFFER (w->buffer), mark_active)))
+       != !NILP (w->region_showing))
+      || (!NILP (w->region_showing)
+         && !EQ (w->region_showing,
+                 Fmarker_position (BVAR (XBUFFER (w->buffer), mark)))))
     CHARPOS (this_line_start_pos) = 0;
 
   /* Optimize the case that only the line containing the cursor in the
@@ -13164,11 +13163,11 @@
       && !w->update_mode_line
       && !current_buffer->clip_changed
       && !current_buffer->prevent_redisplay_optimizations_p
-      && FRAME_VISIBLE_P (XFRAME (WGET (w, frame)))
-      && !FRAME_OBSCURED_P (XFRAME (WGET (w, frame)))
+      && FRAME_VISIBLE_P (XFRAME (w->frame))
+      && !FRAME_OBSCURED_P (XFRAME (w->frame))
       /* Make sure recorded data applies to current buffer, etc.  */
       && this_line_buffer == current_buffer
-      && current_buffer == XBUFFER (WGET (w, buffer))
+      && current_buffer == XBUFFER (w->buffer)
       && !w->force_start
       && !w->optional_new_start
       /* Point must be on the line that we have info recorded about.  */
@@ -13266,10 +13265,10 @@
                 adjusted.  */
              if ((it.glyph_row - 1)->displays_text_p)
                {
-                 if (XFASTINT (WGET (w, window_end_vpos)) < this_line_vpos)
+                 if (XFASTINT (w->window_end_vpos) < this_line_vpos)
                    WSET (w, window_end_vpos, make_number (this_line_vpos));
                }
-             else if (XFASTINT (WGET (w, window_end_vpos)) == 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);
@@ -13318,7 +13317,7 @@
               && (EQ (selected_window,
                       BVAR (current_buffer, last_selected_window))
                   || highlight_nonselected_windows)
-              && NILP (WGET (w, region_showing))
+              && NILP (w->region_showing)
               && NILP (Vshow_trailing_whitespace)
               && !cursor_in_echo_area)
        {
@@ -13479,7 +13478,7 @@
       Lisp_Object mini_window = FRAME_MINIBUF_WINDOW (sf);
       struct frame *mini_frame;
 
-      displayed_buffer = XBUFFER (WGET (XWINDOW (selected_window), buffer));
+      displayed_buffer = XBUFFER (XWINDOW (selected_window)->buffer);
       /* Use list_of_error, not Qerror, so that
         we catch only errors and don't run the debugger.  */
       internal_condition_case_1 (redisplay_window_1, selected_window,
@@ -13545,7 +13544,7 @@
       /* If we pause after scrolling, some rows in the current
         matrices of some windows are not valid.  */
       if (!WINDOW_FULL_WIDTH_P (w)
-         && !FRAME_WINDOW_P (XFRAME (WGET (w, frame))))
+         && !FRAME_WINDOW_P (XFRAME (w->frame)))
        update_mode_lines = 1;
     }
   else
@@ -13703,9 +13702,9 @@
 static void
 mark_window_display_accurate_1 (struct window *w, int accurate_p)
 {
-  if (BUFFERP (WGET (w, buffer)))
+  if (BUFFERP (w->buffer))
     {
-      struct buffer *b = XBUFFER (WGET (w, buffer));
+      struct buffer *b = XBUFFER (w->buffer);
 
       w->last_modified = accurate_p ? BUF_MODIFF(b) : 0;
       w->last_overlay_modified = accurate_p ? BUF_OVERLAY_MODIFF(b) : 0;
@@ -13732,13 +13731,13 @@
          if (w == XWINDOW (selected_window))
            w->last_point = BUF_PT (b);
          else
-           w->last_point = XMARKER (WGET (w, pointm))->charpos;
+           w->last_point = XMARKER (w->pointm)->charpos;
        }
     }
 
   if (accurate_p)
     {
-      WSET (w, window_end_valid, WGET (w, buffer));
+      WSET (w, window_end_valid, w->buffer);
       w->update_mode_line = 0;
     }
 }
@@ -13754,15 +13753,15 @@
 {
   struct window *w;
 
-  for (; !NILP (window); window = WGET (w, next))
+  for (; !NILP (window); window = w->next)
     {
       w = XWINDOW (window);
       mark_window_display_accurate_1 (w, accurate_p);
 
-      if (!NILP (WGET (w, vchild)))
-       mark_window_display_accurate (WGET (w, vchild), accurate_p);
-      if (!NILP (WGET (w, hchild)))
-       mark_window_display_accurate (WGET (w, hchild), accurate_p);
+      if (!NILP (w->vchild))
+       mark_window_display_accurate (w->vchild, accurate_p);
+      if (!NILP (w->hchild))
+       mark_window_display_accurate (w->hchild, accurate_p);
     }
 
   if (accurate_p)
@@ -13822,13 +13821,13 @@
     {
       struct window *w = XWINDOW (window);
 
-      if (!NILP (WGET (w, hchild)))
-       redisplay_windows (WGET (w, hchild));
-      else if (!NILP (WGET (w, vchild)))
-       redisplay_windows (WGET (w, vchild));
-      else if (!NILP (WGET (w, buffer)))
+      if (!NILP (w->hchild))
+       redisplay_windows (w->hchild);
+      else if (!NILP (w->vchild))
+       redisplay_windows (w->vchild);
+      else if (!NILP (w->buffer))
        {
-         displayed_buffer = XBUFFER (WGET (w, buffer));
+         displayed_buffer = XBUFFER (w->buffer);
          /* Use list_of_error, not Qerror, so that
             we catch only errors and don't run the debugger.  */
          internal_condition_case_1 (redisplay_window_0, window,
@@ -13836,7 +13835,7 @@
                                     redisplay_window_error);
        }
 
-      window = WGET (w, next);
+      window = w->next;
     }
 }
 
@@ -14470,7 +14469,7 @@
          && !MATRIX_ROW_CONTINUATION_LINE_P (row)
          && row->x == 0)
        {
-         this_line_buffer = XBUFFER (WGET (w, buffer));
+         this_line_buffer = XBUFFER (w->buffer);
 
          CHARPOS (this_line_start_pos)
            = MATRIX_ROW_START_CHARPOS (row) + delta;
@@ -14504,19 +14503,19 @@
 run_window_scroll_functions (Lisp_Object window, struct text_pos startp)
 {
   struct window *w = XWINDOW (window);
-  SET_MARKER_FROM_TEXT_POS (WGET (w, start), startp);
+  SET_MARKER_FROM_TEXT_POS (w->start, startp);
 
-  if (current_buffer != XBUFFER (WGET (w, buffer)))
+  if (current_buffer != XBUFFER (w->buffer))
     abort ();
 
   if (!NILP (Vwindow_scroll_functions))
     {
       run_hook_with_args_2 (Qwindow_scroll_functions, window,
                            make_number (CHARPOS (startp)));
-      SET_TEXT_POS_FROM_MARKER (startp, WGET (w, start));
+      SET_TEXT_POS_FROM_MARKER (startp, w->start);
       /* In case the hook functions switch buffers.  */
-      if (current_buffer != XBUFFER (WGET (w, buffer)))
-       set_buffer_internal_1 (XBUFFER (WGET (w, buffer)));
+      if (current_buffer != XBUFFER (w->buffer))
+       set_buffer_internal_1 (XBUFFER (w->buffer));
     }
 
   return startp;
@@ -14606,7 +14605,7 @@
               int temp_scroll_step, int last_line_misfit)
 {
   struct window *w = XWINDOW (window);
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   struct text_pos pos, startp;
   struct it it;
   int this_scroll_margin, scroll_max, rc, height;
@@ -14620,7 +14619,7 @@
   debug_method_add (w, "try_scrolling");
 #endif
 
-  SET_TEXT_POS_FROM_MARKER (startp, WGET (w, start));
+  SET_TEXT_POS_FROM_MARKER (startp, w->start);
 
   /* Compute scroll margin height in pixels.  We scroll when point is
      within this distance from the top or bottom of the window.  */
@@ -14881,7 +14880,7 @@
   struct text_pos pos, start_pos;
   int window_start_changed_p = 0;
 
-  SET_TEXT_POS_FROM_MARKER (start_pos, WGET (w, start));
+  SET_TEXT_POS_FROM_MARKER (start_pos, w->start);
 
   /* If window start is on a continuation line...  Window start may be
      < BEGV in case there's invisible text at the start of the
@@ -14929,7 +14928,7 @@
            }
 
          /* Set the window start there.  */
-         SET_MARKER_FROM_TEXT_POS (WGET (w, start), pos);
+         SET_MARKER_FROM_TEXT_POS (w->start, pos);
          window_start_changed_p = 1;
        }
     }
@@ -14965,7 +14964,7 @@
 try_cursor_movement (Lisp_Object window, struct text_pos startp, int 
*scroll_step)
 {
   struct window *w = XWINDOW (window);
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   int rc = CURSOR_MOVEMENT_CANNOT_BE_USED;
 
 #ifdef GLYPH_DEBUG
@@ -14996,7 +14995,7 @@
          set the cursor.  */
       && !(!NILP (Vtransient_mark_mode)
           && !NILP (BVAR (current_buffer, mark_active)))
-      && NILP (WGET (w, region_showing))
+      && NILP (w->region_showing)
       && NILP (Vshow_trailing_whitespace)
       /* This code is not used for mini-buffer for the sake of the case
         of redisplaying to replace an echo area message; since in
@@ -15010,8 +15009,8 @@
         larger than the window.  This should really be fixed in
         window.c.  I don't have this on my list, now, so we do
         approximately the same as the old redisplay code.  --gerd.  */
-      && INTEGERP (WGET (w, window_end_vpos))
-      && XFASTINT (WGET (w, window_end_vpos)) < w->current_matrix->nrows
+      && INTEGERP (w->window_end_vpos)
+      && XFASTINT (w->window_end_vpos) < w->current_matrix->nrows
       && (FRAME_WINDOW_P (f)
          || !overlay_arrow_in_current_buffer_p ()))
     {
@@ -15148,7 +15147,7 @@
              must_scroll = 1;
            }
          else if (rc != CURSOR_MOVEMENT_SUCCESS
-                  && !NILP (BVAR (XBUFFER (WGET (w, buffer)), 
bidi_display_reordering)))
+                  && !NILP (BVAR (XBUFFER (w->buffer), 
bidi_display_reordering)))
            {
              struct glyph_row *row1;
 
@@ -15211,7 +15210,7 @@
          else if (scroll_p)
            rc = CURSOR_MOVEMENT_MUST_SCROLL;
          else if (rc != CURSOR_MOVEMENT_SUCCESS
-                  && !NILP (BVAR (XBUFFER (WGET (w, buffer)), 
bidi_display_reordering)))
+                  && !NILP (BVAR (XBUFFER (w->buffer), 
bidi_display_reordering)))
            {
              /* With bidi-reordered rows, there could be more than
                 one candidate row whose start and end positions
@@ -15318,12 +15317,12 @@
       || (w == XWINDOW (minibuf_window)
          && NILP (echo_area_buffer[0])))
     {
-      struct buffer *buf = XBUFFER (WGET (w, buffer));
+      struct buffer *buf = XBUFFER (w->buffer);
       whole = BUF_ZV (buf) - BUF_BEGV (buf);
-      start = marker_position (WGET (w, start)) - BUF_BEGV (buf);
+      start = marker_position (w->start) - BUF_BEGV (buf);
       /* I don't think this is guaranteed to be right.  For the
         moment, we'll pretend it is.  */
-      end = BUF_Z (buf) - XFASTINT (WGET (w, window_end_pos)) - BUF_BEGV (buf);
+      end = BUF_Z (buf) - XFASTINT (w->window_end_pos) - BUF_BEGV (buf);
 
       if (end < start)
        end = start;
@@ -15334,8 +15333,8 @@
     start = end = whole = 0;
 
   /* Indicate what this scroll bar ought to be displaying now.  */
-  if (FRAME_TERMINAL (XFRAME (WGET (w, frame)))->set_vertical_scroll_bar_hook)
-    (*FRAME_TERMINAL (XFRAME (WGET (w, frame)))->set_vertical_scroll_bar_hook)
+  if (FRAME_TERMINAL (XFRAME (w->frame))->set_vertical_scroll_bar_hook)
+    (*FRAME_TERMINAL (XFRAME (w->frame))->set_vertical_scroll_bar_hook)
       (w, end - start, whole, start);
 }
 
@@ -15351,8 +15350,8 @@
 redisplay_window (Lisp_Object window, int just_this_one_p)
 {
   struct window *w = XWINDOW (window);
-  struct frame *f = XFRAME (WGET (w, frame));
-  struct buffer *buffer = XBUFFER (WGET (w, buffer));
+  struct frame *f = XFRAME (w->frame);
+  struct buffer *buffer = XBUFFER (w->buffer);
   struct buffer *old = current_buffer;
   struct text_pos lpoint, opoint, startp;
   int update_mode_line;
@@ -15375,7 +15374,7 @@
   opoint = lpoint;
 
   /* W must be a leaf window here.  */
-  eassert (!NILP (WGET (w, buffer)));
+  eassert (!NILP (w->buffer));
 #ifdef GLYPH_DEBUG
   *w->desired_matrix->method = 0;
 #endif
@@ -15405,10 +15404,10 @@
       else if ((w != XWINDOW (minibuf_window)
                || minibuf_level == 0)
               /* When buffer is nonempty, redisplay window normally. */
-              && BUF_Z (XBUFFER (WGET (w, buffer))) == BUF_BEG (XBUFFER (WGET 
(w, buffer)))
+              && BUF_Z (XBUFFER (w->buffer)) == BUF_BEG (XBUFFER (w->buffer))
               /* Quail displays non-mini buffers in minibuffer window.
                  In that case, redisplay the window normally.  */
-              && !NILP (Fmemq (WGET (w, buffer), Vminibuffer_list)))
+              && !NILP (Fmemq (w->buffer, Vminibuffer_list)))
        {
          /* W is a mini-buffer window, but it's not active, so clear
             it.  */
@@ -15430,10 +15429,10 @@
      value.  */
   /* Really select the buffer, for the sake of buffer-local
      variables.  */
-  set_buffer_internal_1 (XBUFFER (WGET (w, buffer)));
+  set_buffer_internal_1 (XBUFFER (w->buffer));
 
   current_matrix_up_to_date_p
-    = (!NILP (WGET (w, window_end_valid))
+    = (!NILP (w->window_end_valid)
        && !current_buffer->clip_changed
        && !current_buffer->prevent_redisplay_optimizations_p
        && w->last_modified >= MODIFF
@@ -15457,7 +15456,7 @@
   specbind (Qinhibit_point_motion_hooks, Qt);
 
   buffer_unchanged_p
-    = (!NILP (WGET (w, window_end_valid))
+    = (!NILP (w->window_end_valid)
        && !current_buffer->clip_changed
        && w->last_modified >= MODIFF
        && w->last_overlay_modified >= OVERLAY_MODIFF);
@@ -15468,7 +15467,7 @@
     {
       /* If window starts on a continuation line, maybe adjust the
         window start in case the window's width changed.  */
-      if (XMARKER (WGET (w, start))->buffer == current_buffer)
+      if (XMARKER (w->start)->buffer == current_buffer)
        compute_window_start_on_continuation_line (w);
 
       WSET (w, window_end_valid, Qnil);
@@ -15482,13 +15481,13 @@
     abort ();
 
   /* If %c is in mode line, update it if needed.  */
-  if (!NILP (WGET (w, column_number_displayed))
+  if (!NILP (w->column_number_displayed)
       /* This alternative quickly identifies a common case
         where no change is needed.  */
       && !(PT == w->last_point
           && w->last_modified >= MODIFF
           && w->last_overlay_modified >= OVERLAY_MODIFF)
-      && (XFASTINT (WGET (w, column_number_displayed)) != current_column ()))
+      && (XFASTINT (w->column_number_displayed) != current_column ()))
     update_mode_line = 1;
 
   /* Count number of windows showing the selected buffer.  An indirect
@@ -15497,7 +15496,7 @@
     {
       struct buffer *current_base, *window_base;
       current_base = current_buffer;
-      window_base = XBUFFER (WGET (XWINDOW (selected_window), buffer));
+      window_base = XBUFFER (XWINDOW (selected_window)->buffer);
       if (current_base->base_buffer)
        current_base = current_base->base_buffer;
       if (window_base->base_buffer)
@@ -15510,19 +15509,19 @@
      window, set up appropriate value.  */
   if (!EQ (window, selected_window))
     {
-      ptrdiff_t new_pt = XMARKER (WGET (w, pointm))->charpos;
-      ptrdiff_t new_pt_byte = marker_byte_position (WGET (w, pointm));
+      ptrdiff_t new_pt = XMARKER (w->pointm)->charpos;
+      ptrdiff_t new_pt_byte = marker_byte_position (w->pointm);
       if (new_pt < BEGV)
        {
          new_pt = BEGV;
          new_pt_byte = BEGV_BYTE;
-         set_marker_both (WGET (w, pointm), Qnil, BEGV, BEGV_BYTE);
+         set_marker_both (w->pointm, Qnil, BEGV, BEGV_BYTE);
        }
       else if (new_pt > (ZV - 1))
        {
          new_pt = ZV;
          new_pt_byte = ZV_BYTE;
-         set_marker_both (WGET (w, pointm), Qnil, ZV, ZV_BYTE);
+         set_marker_both (w->pointm, Qnil, ZV, ZV_BYTE);
        }
 
       /* We don't use SET_PT so that the point-motion hooks don't run.  */
@@ -15549,10 +15548,10 @@
     }
 
   /* If window-start is screwed up, choose a new one.  */
-  if (XMARKER (WGET (w, start))->buffer != current_buffer)
+  if (XMARKER (w->start)->buffer != current_buffer)
     goto recenter;
 
-  SET_TEXT_POS_FROM_MARKER (startp, WGET (w, start));
+  SET_TEXT_POS_FROM_MARKER (startp, w->start);
 
   /* If someone specified a new starting point but did not insist,
      check whether it can be used.  */
@@ -15651,7 +15650,7 @@
                            MATRIX_ROW_START_BYTEPOS (row));
 
          if (w != XWINDOW (selected_window))
-           set_marker_both (WGET (w, pointm), Qnil, PT, PT_BYTE);
+           set_marker_both (w->pointm, Qnil, PT, PT_BYTE);
          else if (current_buffer == old)
            SET_TEXT_POS (lpoint, PT, PT_BYTE);
 
@@ -15753,7 +15752,7 @@
             sets it.  So, we need to check the return value of
             compute_window_start_on_continuation_line.  (See also
             bug#197).  */
-         && XMARKER (WGET (w, start))->buffer == current_buffer
+         && XMARKER (w->start)->buffer == current_buffer
          && compute_window_start_on_continuation_line (w)
          /* It doesn't make sense to force the window start like we
             do at label force_start if it is already known that point
@@ -15764,7 +15763,7 @@
          && pos_visible_p (w, PT, &d1, &d2, &d3, &d4, &d5, &d6))
        {
          w->force_start = 1;
-         SET_TEXT_POS_FROM_MARKER (startp, WGET (w, start));
+         SET_TEXT_POS_FROM_MARKER (startp, w->start);
          goto force_start;
        }
 
@@ -15974,7 +15973,7 @@
   /* Set the window start position here explicitly, to avoid an
      infinite loop in case the functions in window-scroll-functions
      get errors.  */
-  set_marker_both (WGET (w, start), Qnil, IT_CHARPOS (it), IT_BYTEPOS (it));
+  set_marker_both (w->start, Qnil, IT_CHARPOS (it), IT_BYTEPOS (it));
 
   /* Run scroll hooks.  */
   startp = run_window_scroll_functions (window, it.current.pos);
@@ -16005,8 +16004,8 @@
      line.)  */
   if (w->cursor.vpos < 0)
     {
-      if (!NILP (WGET (w, window_end_valid))
-         && PT >= Z - XFASTINT (WGET (w, window_end_pos)))
+      if (!NILP (w->window_end_valid)
+         && PT >= Z - XFASTINT (w->window_end_pos))
        {
          clear_glyph_matrix (w->desired_matrix);
          move_it_by_lines (&it, 1);
@@ -16078,7 +16077,7 @@
 
  done:
 
-  SET_TEXT_POS_FROM_MARKER (startp, WGET (w, start));
+  SET_TEXT_POS_FROM_MARKER (startp, w->start);
   w->start_at_line_beg = (CHARPOS (startp) == BEGV
                            || FETCH_BYTE (BYTEPOS (startp) - 1) == '\n');
 
@@ -16092,10 +16091,10 @@
           && !FRAME_WINDOW_P (f)
           && !WINDOW_FULL_WIDTH_P (w))
        /* Line number to display.  */
-       || INTEGERP (WGET (w, base_line_pos))
+       || INTEGERP (w->base_line_pos)
        /* Column number is displayed and different from the one displayed.  */
-       || (!NILP (WGET (w, column_number_displayed))
-          && (XFASTINT (WGET (w, column_number_displayed)) != current_column 
())))
+       || (!NILP (w->column_number_displayed)
+          && (XFASTINT (w->column_number_displayed) != current_column ())))
       /* This means that the window has a mode line.  */
       && (WINDOW_WANTS_MODELINE_P (w)
          || WINDOW_WANTS_HEADER_LINE_P (w)))
@@ -16127,7 +16126,7 @@
     }
 
   if (!line_number_displayed
-      && !BUFFERP (WGET (w, base_line_pos)))
+      && !BUFFERP (w->base_line_pos))
     {
       WSET (w, base_line_pos, Qnil);
       WSET (w, base_line_number, Qnil);
@@ -16243,10 +16242,10 @@
   struct window *w = XWINDOW (window);
   struct it it;
   struct glyph_row *last_text_row = NULL;
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
 
   /* Make POS the new window start.  */
-  set_marker_both (WGET (w, start), Qnil, CHARPOS (pos), BYTEPOS (pos));
+  set_marker_both (w->start, Qnil, CHARPOS (pos), BYTEPOS (pos));
 
   /* Mark cursor position as unknown.  No overlay arrow seen.  */
   w->cursor.vpos = -1;
@@ -16295,7 +16294,7 @@
     }
 
   /* If bottom moved off end of frame, change mode line percentage.  */
-  if (XFASTINT (WGET (w, window_end_pos)) <= 0
+  if (XFASTINT (w->window_end_pos) <= 0
       && Z != IT_CHARPOS (it))
     w->update_mode_line = 1;
 
@@ -16308,12 +16307,12 @@
       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)));
+           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)));
+           make_number (MATRIX_ROW_VPOS (last_text_row, w->desired_matrix)));
       eassert
        (MATRIX_ROW (w->desired_matrix,
-                    XFASTINT (WGET (w, window_end_vpos)))->displays_text_p);
+                    XFASTINT (w->window_end_vpos))->displays_text_p);
     }
   else
     {
@@ -16341,7 +16340,7 @@
 static int
 try_window_reusing_current_matrix (struct window *w)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   struct glyph_row *bottom_row;
   struct it it;
   struct run run;
@@ -16368,7 +16367,7 @@
   /* Can't do this if region may have changed.  */
   if ((!NILP (Vtransient_mark_mode)
        && !NILP (BVAR (current_buffer, mark_active)))
-      || !NILP (WGET (w, region_showing))
+      || !NILP (w->region_showing)
       || !NILP (Vshow_trailing_whitespace))
     return 0;
 
@@ -16385,7 +16384,7 @@
 
   /* The variable new_start now holds the new window start.  The old
      start `start' can be determined from the current matrix.  */
-  SET_TEXT_POS_FROM_MARKER (new_start, WGET (w, start));
+  SET_TEXT_POS_FROM_MARKER (new_start, w->start);
   start = start_row->minpos;
   start_vpos = MATRIX_ROW_VPOS (start_row, w->current_matrix);
 
@@ -16548,18 +16547,18 @@
          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)));
+               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)));
+               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)));
+               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)));
+               make_number (MATRIX_ROW_VPOS (last_text_row, 
w->desired_matrix)));
        }
       else
        {
@@ -16722,7 +16721,7 @@
 
              /* Can't use this optimization with bidi-reordered glyph
                 rows, unless cursor is already at point. */
-             if (!NILP (BVAR (XBUFFER (WGET (w, buffer)), 
bidi_display_reordering)))
+             if (!NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering)))
                {
                  if (!(w->cursor.hpos >= 0
                        && w->cursor.hpos < row->used[TEXT_AREA]
@@ -16750,14 +16749,14 @@
          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)));
+               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)));
+               make_number (MATRIX_ROW_VPOS (last_text_row, 
w->desired_matrix)));
        }
       else
        {
          WSET (w, window_end_vpos,
-               make_number (XFASTINT (WGET (w, window_end_vpos)) - 
nrows_scrolled));
+               make_number (XFASTINT (w->window_end_vpos) - nrows_scrolled));
        }
 
       WSET (w, window_end_valid, Qnil);
@@ -16893,16 +16892,16 @@
 
   /* Display must not have been paused, otherwise the current matrix
      is not up to date.  */
-  eassert (!NILP (WGET (w, window_end_valid)));
+  eassert (!NILP (w->window_end_valid));
 
   /* A value of window_end_pos >= END_UNCHANGED means that the window
      end is in the range of changed text.  If so, there is no
      unchanged row at the end of W's current matrix.  */
-  if (XFASTINT (WGET (w, window_end_pos)) >= END_UNCHANGED)
+  if (XFASTINT (w->window_end_pos) >= END_UNCHANGED)
     return NULL;
 
   /* Set row to the last row in W's current matrix displaying text.  */
-  row = MATRIX_ROW (w->current_matrix, XFASTINT (WGET (w, window_end_vpos)));
+  row = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
 
   /* If matrix is entirely empty, no unchanged row exists.  */
   if (MATRIX_ROW_DISPLAYS_TEXT_P (row))
@@ -16913,7 +16912,7 @@
         buffer positions in the current matrix to current buffer
         positions for characters not in changed text.  */
       ptrdiff_t Z_old =
-       MATRIX_ROW_END_CHARPOS (row) + XFASTINT (WGET (w, window_end_pos));
+       MATRIX_ROW_END_CHARPOS (row) + XFASTINT (w->window_end_pos);
       ptrdiff_t Z_BYTE_old =
        MATRIX_ROW_END_BYTEPOS (row) + w->window_end_bytepos;
       ptrdiff_t last_unchanged_pos, last_unchanged_pos_old;
@@ -16961,12 +16960,12 @@
 static void
 sync_frame_with_window_matrix_rows (struct window *w)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   struct glyph_row *window_row, *window_row_end, *frame_row;
 
   /* Preconditions: W must be a leaf window and full-width.  Its frame
      must have a frame matrix.  */
-  eassert (NILP (WGET (w, hchild)) && NILP (WGET (w, vchild)));
+  eassert (NILP (w->hchild) && NILP (w->vchild));
   eassert (WINDOW_FULL_WIDTH_P (w));
   eassert (!FRAME_WINDOW_P (f));
 
@@ -17008,7 +17007,7 @@
 {
   struct glyph_row *row = start;
   struct glyph_row *best_row = NULL;
-  ptrdiff_t mindif = BUF_ZV (XBUFFER (WGET (w, buffer))) + 1;
+  ptrdiff_t mindif = BUF_ZV (XBUFFER (w->buffer)) + 1;
   int last_y;
 
   /* If we happen to start on a header-line, skip that.  */
@@ -17044,7 +17043,7 @@
        {
          struct glyph *g;
 
-         if (NILP (BVAR (XBUFFER (WGET (w, buffer)), bidi_display_reordering))
+         if (NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering))
              || (!best_row && !row->continued_p))
            return row;
          /* In bidi-reordered rows, there could be several rows
@@ -17113,7 +17112,7 @@
 static int
 try_window_id (struct window *w)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   struct glyph_matrix *current_matrix = w->current_matrix;
   struct glyph_matrix *desired_matrix = w->desired_matrix;
   struct glyph_row *last_unchanged_at_beg_row;
@@ -17147,7 +17146,7 @@
 #define GIVE_UP(X) return 0
 #endif
 
-  SET_TEXT_POS_FROM_MARKER (start, WGET (w, start));
+  SET_TEXT_POS_FROM_MARKER (start, w->start);
 
   /* Don't use this for mini-windows because these can show
      messages and mini-buffers, and we don't handle that here.  */
@@ -17185,7 +17184,7 @@
     GIVE_UP (7);
 
   /* Verify that display wasn't paused.  */
-  if (NILP (WGET (w, window_end_valid)))
+  if (NILP (w->window_end_valid))
     GIVE_UP (8);
 
   /* Can't use this if highlighting a region because a cursor movement
@@ -17199,7 +17198,7 @@
     GIVE_UP (11);
 
   /* Likewise if showing a region.  */
-  if (!NILP (WGET (w, region_showing)))
+  if (!NILP (w->region_showing))
     GIVE_UP (10);
 
   /* Can't use this if overlay arrow position and/or string have
@@ -17211,7 +17210,7 @@
      wrapped line can change the wrap position, altering the line
      above it.  It might be worthwhile to handle this more
      intelligently, but for now just redisplay from scratch.  */
-  if (!NILP (BVAR (XBUFFER (WGET (w, buffer)), word_wrap)))
+  if (!NILP (BVAR (XBUFFER (w->buffer), word_wrap)))
     GIVE_UP (21);
 
   /* Under bidi reordering, adding or deleting a character in the
@@ -17222,8 +17221,8 @@
      to find the paragraph limits and widen the range of redisplayed
      lines to that, but for now just give up this optimization and
      redisplay from scratch.  */
-  if (!NILP (BVAR (XBUFFER (WGET (w, buffer)), bidi_display_reordering))
-      && NILP (BVAR (XBUFFER (WGET (w, buffer)), bidi_paragraph_direction)))
+  if (!NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering))
+      && NILP (BVAR (XBUFFER (w->buffer), bidi_paragraph_direction)))
     GIVE_UP (22);
 
   /* Make sure beg_unchanged and end_unchanged are up to date.  Do it
@@ -17249,7 +17248,7 @@
      This case happens with stealth-fontification.  Note that although
      the display is unchanged, glyph positions in the matrix have to
      be adjusted, of course.  */
-  row = MATRIX_ROW (w->current_matrix, XFASTINT (WGET (w, window_end_vpos)));
+  row = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
   if (MATRIX_ROW_DISPLAYS_TEXT_P (row)
       && ((last_changed_charpos < CHARPOS (start)
           && CHARPOS (start) == BEGV)
@@ -17261,7 +17260,7 @@
 
       /* Compute how many chars/bytes have been added to or removed
         from the buffer.  */
-      Z_old = MATRIX_ROW_END_CHARPOS (row) + XFASTINT (WGET (w, 
window_end_pos));
+      Z_old = MATRIX_ROW_END_CHARPOS (row) + XFASTINT (w->window_end_pos);
       Z_BYTE_old = MATRIX_ROW_END_BYTEPOS (row) + w->window_end_bytepos;
       Z_delta = Z - Z_old;
       Z_delta_bytes = Z_BYTE - Z_BYTE_old;
@@ -17368,7 +17367,7 @@
 
   /* Give up if the window ends in strings.  Overlay strings
      at the end are difficult to handle, so don't try.  */
-  row = MATRIX_ROW (current_matrix, XFASTINT (WGET (w, window_end_vpos)));
+  row = MATRIX_ROW (current_matrix, XFASTINT (w->window_end_vpos));
   if (MATRIX_ROW_START_CHARPOS (row) == MATRIX_ROW_END_CHARPOS (row))
     GIVE_UP (20);
 
@@ -17711,7 +17710,7 @@
       /* Set last_row to the glyph row in the current matrix where the
         window end line is found.  It has been moved up or down in
         the matrix by dvpos.  */
-      int last_vpos = XFASTINT (WGET (w, window_end_vpos)) + dvpos;
+      int last_vpos = XFASTINT (w->window_end_vpos) + dvpos;
       struct glyph_row *last_row = MATRIX_ROW (current_matrix, last_vpos);
 
       /* If last_row is the window end line, it should display text.  */
@@ -17770,18 +17769,18 @@
       WSET (w, window_end_pos, 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)));
+           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)));
+           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)));
+           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"));
     }
@@ -17791,11 +17790,11 @@
         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)));
+           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)));
+           make_number (MATRIX_ROW_VPOS (last_text_row, desired_matrix)));
       eassert (w->window_end_bytepos >= 0);
     }
   else if (first_unchanged_at_end_row == NULL
@@ -17805,7 +17804,7 @@
       /* Displayed to end of window, but no line containing text was
         displayed.  Lines were deleted at the end of the window.  */
       int first_vpos = WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0;
-      int vpos = XFASTINT (WGET (w, window_end_vpos));
+      int vpos = XFASTINT (w->window_end_vpos);
       struct glyph_row *current_row = current_matrix->rows + vpos;
       struct glyph_row *desired_row = desired_matrix->rows + vpos;
 
@@ -17832,8 +17831,8 @@
   else
     abort ();
 
-  IF_DEBUG (debug_end_pos = XFASTINT (WGET (w, window_end_pos));
-           debug_end_vpos = XFASTINT (WGET (w, window_end_vpos)));
+  IF_DEBUG (debug_end_pos = XFASTINT (w->window_end_pos);
+           debug_end_vpos = XFASTINT (w->window_end_vpos));
 
   /* Record that display has not been completed.  */
   WSET (w, window_end_valid, Qnil);
@@ -18066,7 +18065,7 @@
   (Lisp_Object glyphs)
 {
   struct window *w = XWINDOW (selected_window);
-  struct buffer *buffer = XBUFFER (WGET (w, buffer));
+  struct buffer *buffer = XBUFFER (w->buffer);
 
   fprintf (stderr, "PT = %"pI"d, BEGV = %"pI"d. ZV = %"pI"d\n",
           BUF_PT (buffer), BUF_BEGV (buffer), BUF_ZV (buffer));
@@ -18172,7 +18171,7 @@
 get_overlay_arrow_glyph_row (struct window *w, Lisp_Object 
overlay_arrow_string)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
-  struct buffer *buffer = XBUFFER (WGET (w, buffer));
+  struct buffer *buffer = XBUFFER (w->buffer);
   struct buffer *old = current_buffer;
   const unsigned char *arrow_string = SDATA (overlay_arrow_string);
   int arrow_len = SCHARS (overlay_arrow_string);
@@ -19364,7 +19363,7 @@
              row->glyphs[TEXT_AREA]->charpos = -1;
              row->displays_text_p = 0;
 
-             if (!NILP (BVAR (XBUFFER (WGET (it->w, buffer)), 
indicate_empty_lines))
+             if (!NILP (BVAR (XBUFFER (it->w->buffer), indicate_empty_lines))
                  && (!MINI_WINDOW_P (it->w)
                      || (minibuf_level && EQ (it->window, minibuf_window))))
                row->indicate_empty_line_p = 1;
@@ -20187,12 +20186,12 @@
     {
       struct window *w = XWINDOW (window);
 
-      if (WINDOWP (WGET (w, hchild)))
-       nwindows += redisplay_mode_lines (WGET (w, hchild), force);
-      else if (WINDOWP (WGET (w, vchild)))
-       nwindows += redisplay_mode_lines (WGET (w, vchild), force);
+      if (WINDOWP (w->hchild))
+       nwindows += redisplay_mode_lines (w->hchild, force);
+      else if (WINDOWP (w->vchild))
+       nwindows += redisplay_mode_lines (w->vchild, force);
       else if (force
-              || FRAME_GARBAGED_P (XFRAME (WGET (w, frame)))
+              || FRAME_GARBAGED_P (XFRAME (w->frame))
               || !MATRIX_MODE_LINE_ROW (w->current_matrix)->enabled_p)
        {
          struct text_pos lpoint;
@@ -20200,7 +20199,7 @@
 
          /* Set the window's buffer for the mode line display.  */
          SET_TEXT_POS (lpoint, PT, PT_BYTE);
-         set_buffer_internal_1 (XBUFFER (WGET (w, buffer)));
+         set_buffer_internal_1 (XBUFFER (w->buffer));
 
          /* Point refers normally to the selected window.  For any
             other window, set up appropriate value.  */
@@ -20208,7 +20207,7 @@
            {
              struct text_pos pt;
 
-             SET_TEXT_POS_FROM_MARKER (pt, WGET (w, pointm));
+             SET_TEXT_POS_FROM_MARKER (pt, w->pointm);
              if (CHARPOS (pt) < BEGV)
                TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE);
              else if (CHARPOS (pt) > (ZV - 1))
@@ -20230,7 +20229,7 @@
          TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint));
        }
 
-      window = WGET (w, next);
+      window = w->next;
     }
 
   return nwindows;
@@ -20247,7 +20246,7 @@
   int n = 0;
 
   old_selected_frame = selected_frame;
-  selected_frame = WGET (w, frame);
+  selected_frame = w->frame;
   old_selected_window = selected_window;
   XSETWINDOW (selected_window, w);
 
@@ -20983,7 +20982,7 @@
   w = XWINDOW (window);
 
   if (NILP (buffer))
-    buffer = WGET (w, buffer);
+    buffer = w->buffer;
   CHECK_BUFFER (buffer);
 
   /* Make formatting the modeline a non-op when noninteractive, otherwise
@@ -21442,16 +21441,16 @@
        if (mode_line_target == MODE_LINE_TITLE)
          return "";
 
-       startpos = XMARKER (WGET (w, start))->charpos;
-       startpos_byte = marker_byte_position (WGET (w, start));
+       startpos = XMARKER (w->start)->charpos;
+       startpos_byte = marker_byte_position (w->start);
        height = WINDOW_TOTAL_LINES (w);
 
        /* If we decided that this buffer isn't suitable for line numbers,
           don't forget that too fast.  */
-       if (EQ (WGET (w, base_line_pos), WGET (w, buffer)))
+       if (EQ (w->base_line_pos, w->buffer))
          goto no_value;
        /* But do forget it, if the window shows a different buffer now.  */
-       else if (BUFFERP (WGET (w, base_line_pos)))
+       else if (BUFFERP (w->base_line_pos))
          WSET (w, base_line_pos, Qnil);
 
        /* If the buffer is very big, don't waste time.  */
@@ -21463,12 +21462,12 @@
            goto no_value;
          }
 
-       if (INTEGERP (WGET (w, base_line_number))
-           && INTEGERP (WGET (w, base_line_pos))
-           && XFASTINT (WGET (w, base_line_pos)) <= startpos)
+       if (INTEGERP (w->base_line_number)
+           && INTEGERP (w->base_line_pos)
+           && XFASTINT (w->base_line_pos) <= startpos)
          {
-           line = XFASTINT (WGET (w, base_line_number));
-           linepos = XFASTINT (WGET (w, base_line_pos));
+           line = XFASTINT (w->base_line_number);
+           linepos = XFASTINT (w->base_line_pos);
            linepos_byte = buf_charpos_to_bytepos (b, linepos);
          }
        else
@@ -21518,7 +21517,7 @@
               give up on line numbers for this window.  */
            if (position == limit_byte && limit == startpos - distance)
              {
-               WSET (w, base_line_pos, WGET (w, buffer));
+               WSET (w, base_line_pos, w->buffer);
                WSET (w, base_line_number, Qnil);
                goto no_value;
              }
@@ -21562,10 +21561,10 @@
 
     case 'p':
       {
-       ptrdiff_t pos = marker_position (WGET (w, start));
+       ptrdiff_t pos = marker_position (w->start);
        ptrdiff_t total = BUF_ZV (b) - BUF_BEGV (b);
 
-       if (XFASTINT (WGET (w, window_end_pos)) <= BUF_Z (b) - BUF_ZV (b))
+       if (XFASTINT (w->window_end_pos) <= BUF_Z (b) - BUF_ZV (b))
          {
            if (pos <= BUF_BEGV (b))
              return "All";
@@ -21593,8 +21592,8 @@
       /* Display percentage of size above the bottom of the screen.  */
     case 'P':
       {
-       ptrdiff_t toppos = marker_position (WGET (w, start));
-       ptrdiff_t botpos = BUF_Z (b) - XFASTINT (WGET (w, window_end_pos));
+       ptrdiff_t toppos = marker_position (w->start);
+       ptrdiff_t botpos = BUF_Z (b) - XFASTINT (w->window_end_pos);
        ptrdiff_t total = BUF_ZV (b) - BUF_BEGV (b);
 
        if (botpos >= BUF_ZV (b))
@@ -22301,7 +22300,7 @@
            return OK_PIXELS (WINDOW_SCROLL_BAR_AREA_WIDTH (it->w));
        }
 
-      prop = buffer_local_value_1 (prop, WGET (it->w, buffer));
+      prop = buffer_local_value_1 (prop, it->w->buffer);
       if (EQ (prop, Qunbound))
        prop = Qnil;
     }
@@ -22353,7 +22352,7 @@
              return OK_PIXELS (pixels);
            }
 
-         car = buffer_local_value_1 (car, WGET (it->w, buffer));
+         car = buffer_local_value_1 (car, it->w->buffer);
          if (EQ (car, Qunbound))
            car = Qnil;
        }
@@ -22434,7 +22433,7 @@
 {
   memset (s, 0, sizeof *s);
   s->w = w;
-  s->f = XFRAME (WGET (w, frame));
+  s->f = XFRAME (w->frame);
 #ifdef HAVE_NTGUI
   s->hdc = hdc;
 #endif
@@ -22766,7 +22765,7 @@
   int voffset;
   int glyph_not_available_p;
 
-  eassert (s->f == XFRAME (WGET (s->w, frame)));
+  eassert (s->f == XFRAME (s->w->frame));
   eassert (s->nchars == 0);
   eassert (start >= 0 && end > start);
 
@@ -24161,7 +24160,7 @@
       int n = width;
 
       if (!STRINGP (object))
-       object = WGET (it->w, buffer);
+       object = it->w->buffer;
 #ifdef HAVE_WINDOW_SYSTEM
       if (FRAME_WINDOW_P (it->f))
        append_stretch_glyph (it, object, width, height, ascent);
@@ -25388,7 +25387,7 @@
   int from_x, from_y, to_y;
 
   eassert (updated_window && updated_row);
-  f = XFRAME (WGET (w, frame));
+  f = XFRAME (w->frame);
 
   if (updated_row->full_width_p)
     max_x = WINDOW_TOTAL_WIDTH (w);
@@ -25546,8 +25545,8 @@
 get_window_cursor_type (struct window *w, struct glyph *glyph, int *width,
                        int *active_cursor)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
-  struct buffer *b = XBUFFER (WGET (w, buffer));
+  struct frame *f = XFRAME (w->frame);
+  struct buffer *b = XBUFFER (w->buffer);
   int cursor_type = DEFAULT_CURSOR;
   Lisp_Object alt_cursor;
   int non_selected = 0;
@@ -25858,7 +25857,7 @@
 void
 erase_phys_cursor (struct window *w)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
   int hpos = w->phys_cursor.hpos;
   int vpos = w->phys_cursor.vpos;
@@ -25977,7 +25976,7 @@
 display_and_set_cursor (struct window *w, int on,
                        int hpos, int vpos, int x, int y)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   int new_cursor_type;
   int new_cursor_width;
   int active_cursor;
@@ -26098,14 +26097,14 @@
 {
   while (w)
     {
-      if (!NILP (WGET (w, hchild)))
-       update_cursor_in_window_tree (XWINDOW (WGET (w, hchild)), on_p);
-      else if (!NILP (WGET (w, vchild)))
-       update_cursor_in_window_tree (XWINDOW (WGET (w, vchild)), on_p);
+      if (!NILP (w->hchild))
+       update_cursor_in_window_tree (XWINDOW (w->hchild), on_p);
+      else if (!NILP (w->vchild))
+       update_cursor_in_window_tree (XWINDOW (w->vchild), on_p);
       else
        update_window_cursor (w, on_p);
 
-      w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
+      w = NILP (w->next) ? 0 : XWINDOW (w->next);
     }
 }
 
@@ -26129,7 +26128,7 @@
 void
 x_clear_cursor (struct window *w)
 {
-  if (FRAME_VISIBLE_P (XFRAME (WGET (w, frame))) && w->phys_cursor_on_p)
+  if (FRAME_VISIBLE_P (XFRAME (w->frame)) && w->phys_cursor_on_p)
     update_window_cursor (w, 0);
 }
 
@@ -26143,7 +26142,7 @@
                          enum draw_glyphs_face draw)
 {
 #ifdef HAVE_WINDOW_SYSTEM
-  if (FRAME_WINDOW_P (XFRAME (WGET (w, frame))))
+  if (FRAME_WINDOW_P (XFRAME (w->frame)))
     {
       draw_glyphs (w, start_x, row, TEXT_AREA, start_hpos, end_hpos, draw, 0);
       return;
@@ -26314,7 +26313,7 @@
 static int
 coords_in_mouse_face_p (struct window *w, int hpos, int vpos)
 {
-  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (WGET (w, frame)));
+  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
 
   /* Quickly resolve the easy cases.  */
   if (!(WINDOWP (hlinfo->mouse_face_window)
@@ -26566,7 +26565,7 @@
   /* Find the rows corresponding to START_CHARPOS and END_CHARPOS.  */
   rows_from_pos_range (w, start_charpos, end_charpos, disp_string, &r1, &r2);
   if (r1 == NULL)
-    r1 = MATRIX_ROW (w->current_matrix, XFASTINT (WGET (w, window_end_vpos)));
+    r1 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
   /* If the before-string or display-string contains newlines,
      rows_from_pos_range skips to its last row.  Move back.  */
   if (!NILP (before_string) || !NILP (disp_string))
@@ -26588,7 +26587,7 @@
     }
   if (r2 == NULL)
     {
-      r2 = MATRIX_ROW (w->current_matrix, XFASTINT (WGET (w, 
window_end_vpos)));
+      r2 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
       hlinfo->mouse_face_past_end = 1;
     }
   else if (!NILP (after_string))
@@ -26596,7 +26595,7 @@
       /* If the after-string has newlines, advance to its last row.  */
       struct glyph_row *next;
       struct glyph_row *last
-       = MATRIX_ROW (w->current_matrix, XFASTINT (WGET (w, window_end_vpos)));
+       = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
 
       for (next = r2 + 1;
           next <= last
@@ -27261,7 +27260,7 @@
                                    enum window_part area)
 {
   struct window *w = XWINDOW (window);
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
 #ifdef HAVE_WINDOW_SYSTEM
   Display_Info *dpyinfo;
@@ -27345,7 +27344,7 @@
                {
                  help_echo_string = help;
                  XSETWINDOW (help_echo_window, w);
-                 help_echo_object = WGET (w, buffer);
+                 help_echo_object = w->buffer;
                  help_echo_pos = charpos;
                }
            }
@@ -27381,7 +27380,7 @@
            {
              Lisp_Object default_help
                = buffer_local_value_1 (Qmode_line_default_help_echo,
-                                       WGET (w, buffer));
+                                       w->buffer);
 
              if (STRINGP (default_help))
                {
@@ -27662,9 +27661,9 @@
 
   /* Are we in a window whose display is up to date?
      And verify the buffer's text has not changed.  */
-  b = XBUFFER (WGET (w, buffer));
+  b = XBUFFER (w->buffer);
   if (part == ON_TEXT
-      && EQ (WGET (w, window_end_valid), WGET (w, buffer))
+      && EQ (w->window_end_valid, w->buffer)
       && w->last_modified == BUF_MODIFF (b)
       && w->last_overlay_modified == BUF_OVERLAY_MODIFF (b))
     {
@@ -27871,8 +27870,8 @@
                  if (pos > 0)
                    {
                      mouse_face = get_char_property_and_overlay
-                       (make_number (pos), Qmouse_face, WGET (w, buffer), 
&overlay);
-                     buffer = WGET (w, buffer);
+                       (make_number (pos), Qmouse_face, w->buffer, &overlay);
+                     buffer = w->buffer;
                      disp_string = object;
                    }
                }
@@ -27898,12 +27897,12 @@
                     is the smallest.  */
                  Lisp_Object lim1 =
                    NILP (BVAR (XBUFFER (buffer), bidi_display_reordering))
-                   ? Fmarker_position (WGET (w, start))
+                   ? Fmarker_position (w->start)
                    : Qnil;
                  Lisp_Object lim2 =
                    NILP (BVAR (XBUFFER (buffer), bidi_display_reordering))
                    ? make_number (BUF_Z (XBUFFER (buffer))
-                                  - XFASTINT (WGET (w, window_end_pos)))
+                                  - XFASTINT (w->window_end_pos))
                    : Qnil;
 
                  if (NILP (overlay))
@@ -27985,11 +27984,11 @@
                    if (p > 0)
                      {
                        help = Fget_char_property (make_number (p),
-                                                  Qhelp_echo, WGET (w, 
buffer));
+                                                  Qhelp_echo, w->buffer);
                        if (!NILP (help))
                          {
                            charpos = p;
-                           obj = WGET (w, buffer);
+                           obj = w->buffer;
                          }
                      }
                  }
@@ -28040,7 +28039,7 @@
                      ptrdiff_t p = string_buffer_position (obj, start);
                      if (p > 0)
                        pointer = Fget_char_property (make_number (p),
-                                                     Qpointer, WGET (w, 
buffer));
+                                                     Qpointer, w->buffer);
                    }
                }
              else if (BUFFERP (obj)
@@ -28078,7 +28077,7 @@
 void
 x_clear_window_mouse_face (struct window *w)
 {
-  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (WGET (w, frame)));
+  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
   Lisp_Object window;
 
   BLOCK_INPUT;
@@ -28100,7 +28099,7 @@
   Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
 
   window = hlinfo->mouse_face_window;
-  if (! NILP (window) && XFRAME (WGET (XWINDOW (window), frame)) == f)
+  if (! NILP (window) && XFRAME (XWINDOW (window)->frame) == f)
     {
       hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
       hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1;
@@ -28294,7 +28293,7 @@
      do it for frames with vertical scroll bars because either the
      right scroll bar of a window, or the left scroll bar of its
      neighbor will suffice as a border.  */
-  if (FRAME_HAS_VERTICAL_SCROLL_BARS (XFRAME (WGET (w, frame))))
+  if (FRAME_HAS_VERTICAL_SCROLL_BARS (XFRAME (w->frame)))
     return;
 
   if (!WINDOW_RIGHTMOST_P (w)
@@ -28334,7 +28333,7 @@
 static int
 expose_window (struct window *w, XRectangle *fr)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   XRectangle wr, r;
   int mouse_face_overwritten_p = 0;
 
@@ -28475,21 +28474,21 @@
 static int
 expose_window_tree (struct window *w, XRectangle *r)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   int mouse_face_overwritten_p = 0;
 
   while (w && !FRAME_GARBAGED_P (f))
     {
-      if (!NILP (WGET (w, hchild)))
-       mouse_face_overwritten_p
-         |= expose_window_tree (XWINDOW (WGET (w, hchild)), r);
-      else if (!NILP (WGET (w, vchild)))
-       mouse_face_overwritten_p
-         |= expose_window_tree (XWINDOW (WGET (w, vchild)), r);
+      if (!NILP (w->hchild))
+       mouse_face_overwritten_p
+         |= expose_window_tree (XWINDOW (w->hchild), r);
+      else if (!NILP (w->vchild))
+       mouse_face_overwritten_p
+         |= expose_window_tree (XWINDOW (w->vchild), r);
       else
        mouse_face_overwritten_p |= expose_window (w, r);
 
-      w = NILP (WGET (w, next)) ? NULL : XWINDOW (WGET (w, next));
+      w = NILP (w->next) ? NULL : XWINDOW (w->next);
     }
 
   return mouse_face_overwritten_p;
@@ -29281,7 +29280,7 @@
   if (!noninteractive)
     {
       struct window *m = XWINDOW (minibuf_window);
-      Lisp_Object frame = WGET (m, frame);
+      Lisp_Object frame = m->frame;
       struct frame *f = XFRAME (frame);
       Lisp_Object root = FRAME_ROOT_WINDOW (f);
       struct window *r = XWINDOW (root);

=== modified file 'src/xfaces.c'
--- a/src/xfaces.c      2012-08-07 05:29:25 +0000
+++ b/src/xfaces.c      2012-08-07 07:33:18 +0000
@@ -6032,7 +6032,7 @@
                         ptrdiff_t *endptr, ptrdiff_t limit,
                         int mouse, int base_face_id)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   Lisp_Object attrs[LFACE_VECTOR_SIZE];
   Lisp_Object prop, position;
   ptrdiff_t i, noverlays;
@@ -6054,9 +6054,9 @@
 
   /* Get the `face' or `mouse_face' text property at POS, and
      determine the next position at which the property changes.  */
-  prop = Fget_text_property (position, propname, WGET (w, buffer));
+  prop = Fget_text_property (position, propname, w->buffer);
   XSETFASTINT (limit1, (limit < endpos ? limit : endpos));
-  end = Fnext_single_property_change (position, propname, WGET (w, buffer), 
limit1);
+  end = Fnext_single_property_change (position, propname, w->buffer, limit1);
   if (INTEGERP (end))
     endpos = XINT (end);
 
@@ -6142,7 +6142,7 @@
                         ptrdiff_t *endptr, ptrdiff_t limit,
                         int mouse, Lisp_Object overlay)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   Lisp_Object attrs[LFACE_VECTOR_SIZE];
   Lisp_Object prop, position;
   ptrdiff_t endpos;
@@ -6162,9 +6162,9 @@
 
   /* Get the `face' or `mouse_face' text property at POS, and
      determine the next position at which the property changes.  */
-  prop = Fget_text_property (position, propname, WGET (w, buffer));
+  prop = Fget_text_property (position, propname, w->buffer);
   XSETFASTINT (limit1, (limit < endpos ? limit : endpos));
-  end = Fnext_single_property_change (position, propname, WGET (w, buffer), 
limit1);
+  end = Fnext_single_property_change (position, propname, w->buffer, limit1);
   if (INTEGERP (end))
     endpos = XINT (end);
 

=== modified file 'src/xfns.c'
--- a/src/xfns.c        2012-08-07 05:29:25 +0000
+++ b/src/xfns.c        2012-08-07 07:33:18 +0000
@@ -2260,7 +2260,7 @@
 void
 xic_set_preeditarea (struct window *w, int x, int y)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   XVaNestedList attr;
   XPoint spot;
 
@@ -5085,13 +5085,13 @@
       WSET (w, total_lines, make_number (40));
     }
 
-  FRAME_TOTAL_COLS (f) = XINT (WGET (w, total_cols));
+  FRAME_TOTAL_COLS (f) = XINT (w->total_cols);
   adjust_glyphs (f);
   w->pseudo_window_p = 1;
 
   /* Display the tooltip text in a temporary buffer.  */
   old_buffer = current_buffer;
-  set_buffer_internal_1 (XBUFFER (WGET (XWINDOW (FRAME_ROOT_WINDOW (f)), 
buffer)));
+  set_buffer_internal_1 (XBUFFER (XWINDOW (FRAME_ROOT_WINDOW (f))->buffer));
   BVAR (current_buffer, truncate_lines) = Qnil;
   clear_glyph_matrix (w->desired_matrix);
   clear_glyph_matrix (w->current_matrix);

=== modified file 'src/xmenu.c'
--- a/src/xmenu.c       2012-08-07 05:29:25 +0000
+++ b/src/xmenu.c       2012-08-07 07:33:18 +0000
@@ -985,7 +985,7 @@
       if (! menubar_widget)
        previous_menu_items_used = 0;
 
-      buffer = WGET (XWINDOW (FRAME_SELECTED_WINDOW (f)), buffer);
+      buffer = XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer;
       specbind (Qinhibit_quit, Qt);
       /* Don't let the debugger step into this code
         because it is not reentrant.  */

=== modified file 'src/xterm.c'
--- a/src/xterm.c       2012-08-07 05:29:25 +0000
+++ b/src/xterm.c       2012-08-07 07:33:18 +0000
@@ -628,7 +628,7 @@
 static void
 x_update_window_end (struct window *w, int cursor_on_p, int 
mouse_face_overwritten_p)
 {
-  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (WGET (w, frame)));
+  Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
 
   if (!w->pseudo_window_p)
     {
@@ -728,7 +728,7 @@
      overhead is very small.  */
   if (windows_or_buffers_changed
       && desired_row->full_width_p
-      && (f = XFRAME (WGET (w, frame)),
+      && (f = XFRAME (w->frame),
          width = FRAME_INTERNAL_BORDER_WIDTH (f),
          width != 0)
       && (height = desired_row->visible_height,
@@ -3295,7 +3295,7 @@
 static void
 x_scroll_run (struct window *w, struct run *run)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   int x, y, width, height, from_y, to_y, bottom_y;
 
   /* Get frame-relative bounding box of the text display area of W,
@@ -4244,9 +4244,9 @@
                               scroll_bar_end_scroll, 0, 0);
       w = XWINDOW (window_being_scrolled);
 
-      if (!NILP (XSCROLL_BAR (WGET (w, vertical_scroll_bar))->dragging))
+      if (!NILP (XSCROLL_BAR (w->vertical_scroll_bar)->dragging))
        {
-         XSCROLL_BAR (WGET (w, vertical_scroll_bar))->dragging = Qnil;
+         XSCROLL_BAR (w->vertical_scroll_bar)->dragging = Qnil;
          /* The thumb size is incorrect while dragging: fix it.  */
          set_vertical_scroll_bar (w);
        }
@@ -4277,7 +4277,7 @@
   XEvent event;
   XClientMessageEvent *ev = (XClientMessageEvent *) &event;
   struct window *w = XWINDOW (window);
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   ptrdiff_t i;
 
   BLOCK_INPUT;
@@ -4353,7 +4353,7 @@
   ievent->timestamp = CurrentTime;
 #else
   ievent->timestamp =
-    XtLastTimestampProcessed (FRAME_X_DISPLAY (XFRAME (WGET (w, frame))));
+    XtLastTimestampProcessed (FRAME_X_DISPLAY (XFRAME (w->frame)));
 #endif
   ievent->part = ev->data.l[1];
   ievent->code = ev->data.l[2];
@@ -4954,7 +4954,7 @@
 static struct scroll_bar *
 x_scroll_bar_create (struct window *w, int top, int left, int width, int 
height)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   struct scroll_bar *bar
     = ALLOCATE_PSEUDOVECTOR (struct scroll_bar, x_window, PVEC_OTHER);
   Lisp_Object barobj;
@@ -5196,7 +5196,7 @@
 static void
 XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int 
position)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   Lisp_Object barobj;
   struct scroll_bar *bar;
   int top, height, left, sb_left, width, sb_width;
@@ -5248,7 +5248,7 @@
 #endif
 
   /* Does the scroll bar exist yet?  */
-  if (NILP (WGET (w, vertical_scroll_bar)))
+  if (NILP (w->vertical_scroll_bar))
     {
       if (width > 0 && height > 0)
        {
@@ -5271,7 +5271,7 @@
       /* It may just need to be moved and resized.  */
       unsigned int mask = 0;
 
-      bar = XSCROLL_BAR (WGET (w, vertical_scroll_bar));
+      bar = XSCROLL_BAR (w->vertical_scroll_bar);
 
       BLOCK_INPUT;
 
@@ -5441,10 +5441,10 @@
   Lisp_Object barobj;
 
   /* We can't redeem this window's scroll bar if it doesn't have one.  */
-  if (NILP (WGET (window, vertical_scroll_bar)))
+  if (NILP (window->vertical_scroll_bar))
     abort ();
 
-  bar = XSCROLL_BAR (WGET (window, vertical_scroll_bar));
+  bar = XSCROLL_BAR (window->vertical_scroll_bar);
 
   /* Unlink it from the condemned list.  */
   f = XFRAME (WINDOW_FRAME (window));
@@ -5452,11 +5452,11 @@
     {
       /* If the prev pointer is nil, it must be the first in one of
         the lists.  */
-      if (EQ (FRAME_SCROLL_BARS (f), WGET (window, vertical_scroll_bar)))
+      if (EQ (FRAME_SCROLL_BARS (f), window->vertical_scroll_bar))
        /* It's not condemned.  Everything's fine.  */
        return;
       else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f),
-                  WGET (window, vertical_scroll_bar)))
+                  window->vertical_scroll_bar))
        FSET (f, condemned_scroll_bars, bar->next);
       else
        /* If its prev pointer is nil, it must be at the front of
@@ -5616,7 +5616,7 @@
 static void
 x_scroll_bar_note_movement (struct scroll_bar *bar, XEvent *event)
 {
-  FRAME_PTR f = XFRAME (WGET (XWINDOW (bar->window), frame));
+  FRAME_PTR f = XFRAME (XWINDOW (bar->window)->frame);
 
   last_mouse_movement_time = event->xmotion.time;
 
@@ -6790,8 +6790,8 @@
                       create event iff we don't leave the
                       selected frame.  */
                    && (focus_follows_mouse
-                       || (EQ (WGET (XWINDOW (window), frame),
-                               WGET (XWINDOW (selected_window), frame)))))
+                       || (EQ (XWINDOW (window)->frame,
+                               XWINDOW (selected_window)->frame))))
                   {
                     inev.ie.kind = SELECT_WINDOW_EVENT;
                     inev.ie.frame_or_window = window;
@@ -7340,7 +7340,7 @@
 static void
 x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum 
text_cursor_kinds kind)
 {
-  struct frame *f = XFRAME (WGET (w, frame));
+  struct frame *f = XFRAME (w->frame);
   struct glyph *cursor_glyph;
 
   /* If cursor is out of bounds, don't draw garbage.  This can happen


reply via email to

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