changeset 25646:9154af188477

Use XCAR and XCDR instead of explicit member references.
author Ken Raeburn <raeburn@raeburn.org>
date Sun, 12 Sep 1999 07:05:34 +0000
parents a14111a2a100
children 947cb0e32a1d
files src/w32faces.c src/w32fns.c src/w32menu.c src/w32proc.c src/w32term.c src/xfns.c src/xmenu.c src/xselect.c src/xterm.c
diffstat 9 files changed, 317 insertions(+), 317 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32faces.c	Sun Sep 12 05:07:01 1999 +0000
+++ b/src/w32faces.c	Sun Sep 12 07:05:34 1999 +0000
@@ -302,16 +302,16 @@
 
   return ((STRINGP (object)
 	   || (CONSP (object)
-	       && CONSP (XCONS (object)->cdr)
-	       && CONSP (XCONS (XCONS (object)->cdr)->cdr)
-	       && NILP (XCONS (XCONS (XCONS (object)->cdr)->cdr)->cdr)
-	       && (width = XCONS (object)->car, INTEGERP (width))
-	       && (height = XCONS (XCONS (object)->cdr)->car, INTEGERP (height))
-	       && STRINGP (XCONS (XCONS (XCONS (object)->cdr)->cdr)->car)
+	       && CONSP (XCDR (object))
+	       && CONSP (XCDR (XCDR (object)))
+	       && NILP (XCDR (XCDR (XCDR (object))))
+	       && (width = XCAR (object), INTEGERP (width))
+	       && (height = XCAR (XCDR (object)), INTEGERP (height))
+	       && STRINGP (XCAR (XCDR (XCDR (object))))
 	       && XINT (width) > 0
 	       && XINT (height) > 0
 	       /* The string must have enough bits for width * height.  */
-	       && ((XSTRING (XCONS (XCONS (XCONS (object)->cdr)->cdr)->car)->size
+	       && ((XSTRING (XCAR (XCDR (XCDR (object))))->size
 		    * (BITS_PER_INT / sizeof (int)))
 		   >= XFASTINT (width) * XFASTINT (height))))
 	  ? Qt : Qnil);
@@ -828,7 +828,7 @@
   int j;
 
   if (CONSP (prop)
-      && ! STRINGP (XCONS (prop)->cdr))
+      && ! STRINGP (XCDR (prop)))
     {
       /* We have a list of faces, merge them in reverse order.  */
 
@@ -855,10 +855,10 @@
     {
       if (CONSP (faces[j]))
 	{
-	  if (EQ (XCONS (faces[j])->car, Qbackground_color))
-	    face->background = load_color (f, XCONS (faces[j])->cdr);
-	  if (EQ (XCONS (faces[j])->car, Qforeground_color))
-	    face->foreground = load_color (f, XCONS (faces[j])->cdr);
+	  if (EQ (XCAR (faces[j]), Qbackground_color))
+	    face->background = load_color (f, XCDR (faces[j]));
+	  if (EQ (XCAR (faces[j]), Qforeground_color))
+	    face->foreground = load_color (f, XCDR (faces[j]));
 	}
       else
 	{
--- a/src/w32fns.c	Sun Sep 12 05:07:01 1999 +0000
+++ b/src/w32fns.c	Sun Sep 12 07:05:34 1999 +0000
@@ -341,9 +341,9 @@
   Lisp_Object tail, frame;
   struct frame *f;
 
-  for (tail = Vframe_list; GC_CONSP (tail); tail = XCONS (tail)->cdr)
+  for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail))
     {
-      frame = XCONS (tail)->car;
+      frame = XCAR (tail);
       if (!GC_FRAMEP (frame))
         continue;
       f = XFRAME (frame);
@@ -867,18 +867,18 @@
 	    if (leftpos < 0)
 	      f->output_data.w32->size_hint_flags |= XNegative;
 	  }
-	else if (CONSP (left) && EQ (XCONS (left)->car, Qminus)
-		 && CONSP (XCONS (left)->cdr)
-		 && INTEGERP (XCONS (XCONS (left)->cdr)->car))
+	else if (CONSP (left) && EQ (XCAR (left), Qminus)
+		 && CONSP (XCDR (left))
+		 && INTEGERP (XCAR (XCDR (left))))
 	  {
-	    leftpos = - XINT (XCONS (XCONS (left)->cdr)->car);
+	    leftpos = - XINT (XCAR (XCDR (left)));
 	    f->output_data.w32->size_hint_flags |= XNegative;
 	  }
-	else if (CONSP (left) && EQ (XCONS (left)->car, Qplus)
-		 && CONSP (XCONS (left)->cdr)
-		 && INTEGERP (XCONS (XCONS (left)->cdr)->car))
+	else if (CONSP (left) && EQ (XCAR (left), Qplus)
+		 && CONSP (XCDR (left))
+		 && INTEGERP (XCAR (XCDR (left))))
 	  {
-	    leftpos = XINT (XCONS (XCONS (left)->cdr)->car);
+	    leftpos = XINT (XCAR (XCDR (left)));
 	  }
 
 	if (EQ (top, Qminus))
@@ -889,18 +889,18 @@
 	    if (toppos < 0)
 	      f->output_data.w32->size_hint_flags |= YNegative;
 	  }
-	else if (CONSP (top) && EQ (XCONS (top)->car, Qminus)
-		 && CONSP (XCONS (top)->cdr)
-		 && INTEGERP (XCONS (XCONS (top)->cdr)->car))
+	else if (CONSP (top) && EQ (XCAR (top), Qminus)
+		 && CONSP (XCDR (top))
+		 && INTEGERP (XCAR (XCDR (top))))
 	  {
-	    toppos = - XINT (XCONS (XCONS (top)->cdr)->car);
+	    toppos = - XINT (XCAR (XCDR (top)));
 	    f->output_data.w32->size_hint_flags |= YNegative;
 	  }
-	else if (CONSP (top) && EQ (XCONS (top)->car, Qplus)
-		 && CONSP (XCONS (top)->cdr)
-		 && INTEGERP (XCONS (XCONS (top)->cdr)->car))
+	else if (CONSP (top) && EQ (XCAR (top), Qplus)
+		 && CONSP (XCDR (top))
+		 && INTEGERP (XCAR (XCDR (top))))
 	  {
-	    toppos = XINT (XCONS (XCONS (top)->cdr)->car);
+	    toppos = XINT (XCAR (XCDR (top)));
 	  }
 
 
@@ -989,7 +989,7 @@
 		  (FRAME_VISIBLE_P (f) ? Qt
 		   : FRAME_ICONIFIED_P (f) ? Qicon : Qnil));
   store_in_alist (alistptr, Qdisplay,
-		  XCONS (FRAME_W32_DISPLAY_INFO (f)->name_list_element)->car);
+		  XCAR (FRAME_W32_DISPLAY_INFO (f)->name_list_element));
 }
 
 
@@ -2049,11 +2049,11 @@
       FRAME_DESIRED_CURSOR (f) = bar_cursor;
       f->output_data.w32->cursor_width = 2;
     }
-  else if (CONSP (arg) && EQ (XCONS (arg)->car, Qbar)
-	   && INTEGERP (XCONS (arg)->cdr))
+  else if (CONSP (arg) && EQ (XCAR (arg), Qbar)
+	   && INTEGERP (XCDR (arg)))
     {
       FRAME_DESIRED_CURSOR (f) = bar_cursor;
-      f->output_data.w32->cursor_width = XINT (XCONS (arg)->cdr);
+      f->output_data.w32->cursor_width = XINT (XCDR (arg));
     }
   else
     /* Treat anything unknown as "box cursor".
@@ -2105,7 +2105,7 @@
 
   tem = assq_no_quit (Qicon_type, f->param_alist);
   if (CONSP (tem))
-    return XCONS (tem)->cdr;
+    return XCDR (tem);
   else
     return Qnil;
 }
@@ -2885,18 +2885,18 @@
 	  f->output_data.w32->top_pos = 0;
 	  window_prompting |= YNegative;
 	}
-      else if (CONSP (tem0) && EQ (XCONS (tem0)->car, Qminus)
-	       && CONSP (XCONS (tem0)->cdr)
-	       && INTEGERP (XCONS (XCONS (tem0)->cdr)->car))
+      else if (CONSP (tem0) && EQ (XCAR (tem0), Qminus)
+	       && CONSP (XCDR (tem0))
+	       && INTEGERP (XCAR (XCDR (tem0))))
 	{
-	  f->output_data.w32->top_pos = - XINT (XCONS (XCONS (tem0)->cdr)->car);
+	  f->output_data.w32->top_pos = - XINT (XCAR (XCDR (tem0)));
 	  window_prompting |= YNegative;
 	}
-      else if (CONSP (tem0) && EQ (XCONS (tem0)->car, Qplus)
-	       && CONSP (XCONS (tem0)->cdr)
-	       && INTEGERP (XCONS (XCONS (tem0)->cdr)->car))
+      else if (CONSP (tem0) && EQ (XCAR (tem0), Qplus)
+	       && CONSP (XCDR (tem0))
+	       && INTEGERP (XCAR (XCDR (tem0))))
 	{
-	  f->output_data.w32->top_pos = XINT (XCONS (XCONS (tem0)->cdr)->car);
+	  f->output_data.w32->top_pos = XINT (XCAR (XCDR (tem0)));
 	}
       else if (EQ (tem0, Qunbound))
 	f->output_data.w32->top_pos = 0;
@@ -2913,18 +2913,18 @@
 	  f->output_data.w32->left_pos = 0;
 	  window_prompting |= XNegative;
 	}
-      else if (CONSP (tem1) && EQ (XCONS (tem1)->car, Qminus)
-	       && CONSP (XCONS (tem1)->cdr)
-	       && INTEGERP (XCONS (XCONS (tem1)->cdr)->car))
+      else if (CONSP (tem1) && EQ (XCAR (tem1), Qminus)
+	       && CONSP (XCDR (tem1))
+	       && INTEGERP (XCAR (XCDR (tem1))))
 	{
-	  f->output_data.w32->left_pos = - XINT (XCONS (XCONS (tem1)->cdr)->car);
+	  f->output_data.w32->left_pos = - XINT (XCAR (XCDR (tem1)));
 	  window_prompting |= XNegative;
 	}
-      else if (CONSP (tem1) && EQ (XCONS (tem1)->car, Qplus)
-	       && CONSP (XCONS (tem1)->cdr)
-	       && INTEGERP (XCONS (XCONS (tem1)->cdr)->car))
+      else if (CONSP (tem1) && EQ (XCAR (tem1), Qplus)
+	       && CONSP (XCDR (tem1))
+	       && INTEGERP (XCAR (XCDR (tem1))))
 	{
-	  f->output_data.w32->left_pos = XINT (XCONS (XCONS (tem1)->cdr)->car);
+	  f->output_data.w32->left_pos = XINT (XCAR (XCDR (tem1)));
 	}
       else if (EQ (tem1, Qunbound))
 	f->output_data.w32->left_pos = 0;
@@ -4833,8 +4833,8 @@
     }
 
   /* Create fontsets from `global_fontset_alist' before handling fonts.  */
-  for (tem = Vglobal_fontset_alist; CONSP (tem); tem = XCONS (tem)->cdr)
-    fs_register_fontset (f, XCONS (tem)->car);
+  for (tem = Vglobal_fontset_alist; CONSP (tem); tem = XCDR (tem))
+    fs_register_fontset (f, XCAR (tem));
 
   /* Extract the window parameters from the supplied values
      that are needed to determine window geometry.  */
@@ -5052,14 +5052,14 @@
       /* First check if any are already loaded, as that is cheaper
          than loading another one. */
       for (i = 0; i < dpyinfo->n_fonts; i++)
-	for (tail = font_names; CONSP (tail); tail = XCONS (tail)->cdr)
+	for (tail = font_names; CONSP (tail); tail = XCDR (tail))
 	  if (!strcmp (dpyinfo->font_table[i].name,
-		       XSTRING (XCONS (tail)->car)->data)
+		       XSTRING (XCAR (tail))->data)
 	      || !strcmp (dpyinfo->font_table[i].full_name,
-			  XSTRING (XCONS (tail)->car)->data))
+			  XSTRING (XCAR (tail))->data))
 	    return (dpyinfo->font_table + i);
 #endif
-      fontname = (char *) XSTRING (XCONS (font_names)->car)->data;
+      fontname = (char *) XSTRING (XCAR (font_names))->data;
     }
   else if (w32_strict_fontnames)
     {
@@ -5234,13 +5234,13 @@
       char *bdf_name, *bdf_file;
       Lisp_Object bdf_pair;
 
-      bdf_name = XSTRING (XCONS (bdf_fonts)->car)->data;
-      bdf_pair = Fassoc (XCONS (bdf_fonts)->car, Vw32_bdf_filename_alist);
-      bdf_file = XSTRING (XCONS (bdf_pair)->cdr)->data;
+      bdf_name = XSTRING (XCAR (bdf_fonts))->data;
+      bdf_pair = Fassoc (XCAR (bdf_fonts), Vw32_bdf_filename_alist);
+      bdf_file = XSTRING (XCDR (bdf_pair))->data;
 
       retval = w32_load_bdf_font (f, bdf_name, size, bdf_file);
 
-      bdf_fonts = XCONS (bdf_fonts)->cdr;
+      bdf_fonts = XCDR (bdf_fonts);
     }
 
   if (retval)
@@ -5831,7 +5831,7 @@
         || w32_font_match (buf, XSTRING (*(lpef->pattern))->data))
       {
 	*lpef->tail = Fcons (Fcons (build_string (buf), width), Qnil);
-	lpef->tail = &(XCONS (*lpef->tail)->cdr);
+	lpef->tail = &(XCDR (*lpef->tail));
 	lpef->numFonts++;
       }
   }
@@ -5899,11 +5899,11 @@
   list = Vw32_bdf_filename_alist;
   ptnstr = XSTRING (pattern)->data;
 
-  for ( ; CONSP (list); list = XCONS (list)->cdr)
+  for ( ; CONSP (list); list = XCDR (list))
     {
-      tem = XCONS (list)->car;
+      tem = XCAR (list);
       if (CONSP (tem))
-        fontname = XSTRING (XCONS (tem)->car)->data;
+        fontname = XSTRING (XCAR (tem))->data;
       else if (STRINGP (tem))
         fontname = XSTRING (tem)->data;
       else
@@ -5911,7 +5911,7 @@
 
       if (w32_font_match (fontname, ptnstr))
         {
-          newlist = Fcons (XCONS (tem)->car, newlist);
+          newlist = Fcons (XCAR (tem), newlist);
           n_fonts++;
           if (n_fonts >= max_names)
             break;
@@ -5943,17 +5943,17 @@
   if (NILP (patterns))
     patterns = Fcons (pattern, Qnil);
 
-  for (; CONSP (patterns); patterns = XCONS (patterns)->cdr)
+  for (; CONSP (patterns); patterns = XCDR (patterns))
     {
       enumfont_t ef;
 
-      tpat = XCONS (patterns)->car;
+      tpat = XCAR (patterns);
 
       /* See if we cached the result for this particular query.
          The cache is an alist of the form:
            ((PATTERN (FONTNAME . WIDTH) ...) ...)
       */
-      if (tem = XCONS (dpyinfo->name_list_element)->cdr,
+      if (tem = XCDR (dpyinfo->name_list_element),
           !NILP (list = Fassoc (tpat, tem)))
         {
           list = Fcdr_safe (list);
@@ -6004,9 +6004,9 @@
 
       /* Make a list of the fonts we got back.
          Store that in the font cache for the display. */
-      XCONS (dpyinfo->name_list_element)->cdr
+      XCDR (dpyinfo->name_list_element)
         = Fcons (Fcons (tpat, list),
-                 XCONS (dpyinfo->name_list_element)->cdr);
+                 XCDR (dpyinfo->name_list_element));
 
     label_cached:
       if (NILP (list)) continue; /* Try the remaining alternatives.  */
@@ -6014,25 +6014,25 @@
       newlist = second_best = Qnil;
 
       /* Make a list of the fonts that have the right width.  */          
-      for (; CONSP (list); list = XCONS (list)->cdr)
+      for (; CONSP (list); list = XCDR (list))
         {
           int found_size;
-          tem = XCONS (list)->car;
+          tem = XCAR (list);
 
           if (!CONSP (tem))
             continue;
-          if (NILP (XCONS (tem)->car))
+          if (NILP (XCAR (tem)))
             continue;
           if (!size)
             {
-              newlist = Fcons (XCONS (tem)->car, newlist);
+              newlist = Fcons (XCAR (tem), newlist);
               n_fonts++;
               if (n_fonts >= maxnames)
                 break;
               else
                 continue;
             }
-          if (!INTEGERP (XCONS (tem)->cdr))
+          if (!INTEGERP (XCDR (tem)))
             {
               /* Since we don't yet know the size of the font, we must
                  load it and try GetTextMetrics.  */
@@ -6041,7 +6041,7 @@
               HDC hdc;
               HANDLE oldobj;
 
-              if (!x_to_w32_font (XSTRING (XCONS (tem)->car)->data, &lf))
+              if (!x_to_w32_font (XSTRING (XCAR (tem))->data, &lf))
                 continue;
 
               BLOCK_INPUT;
@@ -6053,18 +6053,18 @@
               hdc = GetDC (dpyinfo->root_window);
               oldobj = SelectObject (hdc, thisinfo.hfont);
               if (GetTextMetrics (hdc, &thisinfo.tm))
-                XCONS (tem)->cdr = make_number (FONT_WIDTH (&thisinfo));
+                XCDR (tem) = make_number (FONT_WIDTH (&thisinfo));
               else
-                XCONS (tem)->cdr = make_number (0);
+                XCDR (tem) = make_number (0);
               SelectObject (hdc, oldobj);
               ReleaseDC (dpyinfo->root_window, hdc);
               DeleteObject(thisinfo.hfont);
               UNBLOCK_INPUT;
             }
-          found_size = XINT (XCONS (tem)->cdr);
+          found_size = XINT (XCDR (tem));
           if (found_size == size)
             {
-              newlist = Fcons (XCONS (tem)->car, newlist);
+              newlist = Fcons (XCAR (tem), newlist);
               n_fonts++;
               if (n_fonts >= maxnames)
                 break;
@@ -6078,14 +6078,14 @@
                   
               else if (found_size < size)
                 {
-                  if (XINT (XCONS (second_best)->cdr) > size
-                      || XINT (XCONS (second_best)->cdr) < found_size)
+                  if (XINT (XCDR (second_best)) > size
+                      || XINT (XCDR (second_best)) < found_size)
                     second_best = tem;
                 }
               else
                 {
-                  if (XINT (XCONS (second_best)->cdr) > size
-                      && XINT (XCONS (second_best)->cdr) >
+                  if (XINT (XCDR (second_best)) > size
+                      && XINT (XCDR (second_best)) >
                       found_size)
                     second_best = tem;
                 }
@@ -6096,7 +6096,7 @@
         break;
       else if (!NILP (second_best))
         {
-          newlist = Fcons (XCONS (second_best)->car, Qnil);
+          newlist = Fcons (XCAR (second_best), Qnil);
           break;
         }
     }
@@ -6150,9 +6150,9 @@
 
   matches = w32_list_fonts (f, build_string (new_pattn), size, max_names);
 
-  for ( ; CONSP (matches); matches = XCONS (matches)->cdr)
+  for ( ; CONSP (matches); matches = XCDR (matches))
     {
-      tem = XCONS (matches)->car;
+      tem = XCAR (matches);
       if (!STRINGP (tem))
         continue;
 
@@ -6208,12 +6208,12 @@
 {
   Lisp_Object list, elt;
 
-  for (list = Vfont_ccl_encoder_alist; CONSP (list); list = XCONS (list)->cdr)
+  for (list = Vfont_ccl_encoder_alist; CONSP (list); list = XCDR (list))
     {
-      elt = XCONS (list)->car;
+      elt = XCAR (list);
       if (CONSP (elt)
-	  && STRINGP (XCONS (elt)->car)
-	  && (fast_c_string_match_ignore_case (XCONS (elt)->car, fontp->name)
+	  && STRINGP (XCAR (elt))
+	  && (fast_c_string_match_ignore_case (XCAR (elt), fontp->name)
 	      >= 0))
 	break;
     }
@@ -6222,7 +6222,7 @@
       struct ccl_program *ccl
 	= (struct ccl_program *) xmalloc (sizeof (struct ccl_program));
 
-      if (setup_ccl_program (ccl, XCONS (elt)->cdr) < 0)
+      if (setup_ccl_program (ccl, XCDR (elt)) < 0)
 	xfree (ccl);
       else
 	fontp->font_encoder = ccl;
@@ -6297,7 +6297,7 @@
 
   /* See if we cached the result for this particular query.  */
   list = Fassoc (pattern,
-		 XCONS (FRAME_W32_DISPLAY_INFO (f)->name_list_element)->cdr);
+		 XCDR (FRAME_W32_DISPLAY_INFO (f)->name_list_element));
 
   /* We have info in the cache for this PATTERN.  */
   if (!NILP (list))
@@ -6305,7 +6305,7 @@
       Lisp_Object tem, newlist;
 
       /* We have info about this pattern.  */
-      list = XCONS (list)->cdr;
+      list = XCDR (list);
 
       if (size_ref == 0)
 	return list;
@@ -6314,16 +6314,16 @@
 
       /* Filter the cached info and return just the fonts that match FACE.  */
       newlist = Qnil;
-      for (tem = list; CONSP (tem); tem = XCONS (tem)->cdr)
+      for (tem = list; CONSP (tem); tem = XCDR (tem))
 	{
 	  struct font_info *fontinf;
           XFontStruct *thisinfo = NULL;
 
-          fontinf = w32_load_font (f, XSTRING (XCONS (tem)->car)->data, 0);
+          fontinf = w32_load_font (f, XSTRING (XCAR (tem))->data, 0);
           if (fontinf)
             thisinfo = (XFontStruct *)fontinf->font;
           if (thisinfo && same_size_fonts (thisinfo, size_ref))
-	    newlist = Fcons (XCONS (tem)->car, newlist);
+	    newlist = Fcons (XCAR (tem), newlist);
 
 	  w32_unload_font (FRAME_W32_DISPLAY_INFO (f), thisinfo);
         }
@@ -6358,9 +6358,9 @@
 
       /* Make a list of all the fonts we got back.
 	 Store that in the font cache for the display.  */
-      XCONS (FRAME_W32_DISPLAY_INFO (f)->name_list_element)->cdr
+      XCDR (FRAME_W32_DISPLAY_INFO (f)->name_list_element)
 	= Fcons (Fcons (pattern, namelist),
-		 XCONS (FRAME_W32_DISPLAY_INFO (f)->name_list_element)->cdr);
+		 XCDR (FRAME_W32_DISPLAY_INFO (f)->name_list_element));
 
       /* Make a list of the fonts that have the right width.  */
       list = Qnil;
@@ -6413,13 +6413,13 @@
   if (!CONSP (directory))
     return w32_find_bdf_fonts_in_dir (directory);
 
-  for ( ; CONSP (directory); directory = XCONS (directory)->cdr)
+  for ( ; CONSP (directory); directory = XCDR (directory))
     {
       Lisp_Object pair[2];
       pair[0] = list;
       pair[1] = Qnil;
       GCPRO2 (directory, list);
-      pair[1] = w32_find_bdf_fonts_in_dir( XCONS (directory)->car );
+      pair[1] = w32_find_bdf_fonts_in_dir( XCAR (directory) );
       list = Fnconc( 2, pair );
       UNGCPRO;
     }
@@ -6439,9 +6439,9 @@
   filelist = Fdirectory_files (directory, Qt,
                               build_string (".*\\.[bB][dD][fF]"), Qt);
 
-  for ( ; CONSP(filelist); filelist = XCONS (filelist)->cdr)
+  for ( ; CONSP(filelist); filelist = XCDR (filelist))
     {
-      Lisp_Object filename = XCONS (filelist)->car;
+      Lisp_Object filename = XCAR (filelist);
       if (w32_BDF_to_x_font (XSTRING (filename)->data, fontname, 100))
           store_in_alist (&list, build_string (fontname), filename);
     }
@@ -6803,10 +6803,10 @@
 
   for (dpyinfo = &one_w32_display_info, names = w32_display_name_list;
        dpyinfo;
-       dpyinfo = dpyinfo->next, names = XCONS (names)->cdr)
+       dpyinfo = dpyinfo->next, names = XCDR (names))
     {
       Lisp_Object tem;
-      tem = Fstring_equal (XCONS (XCONS (names)->car)->car, name);
+      tem = Fstring_equal (XCAR (XCAR (names)), name);
       if (!NILP (tem))
 	return dpyinfo;
     }
@@ -6949,8 +6949,8 @@
   Lisp_Object tail, result;
 
   result = Qnil;
-  for (tail = w32_display_name_list; ! NILP (tail); tail = XCONS (tail)->cdr)
-    result = Fcons (XCONS (XCONS (tail)->car)->car, result);
+  for (tail = w32_display_name_list; ! NILP (tail); tail = XCDR (tail))
+    result = Fcons (XCAR (XCAR (tail)), result);
 
   return result;
 }
--- a/src/w32menu.c	Sun Sep 12 05:07:01 1999 +0000
+++ b/src/w32menu.c	Sun Sep 12 07:05:34 1999 +0000
@@ -214,9 +214,9 @@
   Lisp_Object tail, frame;
   FRAME_PTR f;
 
-  for (tail = Vframe_list; GC_CONSP (tail); tail = XCONS (tail)->cdr)
+  for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail))
     {
-      frame = XCONS (tail)->car;
+      frame = XCAR (tail);
       if (!GC_FRAMEP (frame))
         continue;
       f = XFRAME (frame);
@@ -416,14 +416,14 @@
   notbuttons = menu_items_used;
 #endif
 
-  for (tail = keymap; CONSP (tail); tail = XCONS (tail)->cdr)
+  for (tail = keymap; CONSP (tail); tail = XCDR (tail))
     {
       GCPRO2 (keymap, pending_maps);
       /* Look at each key binding, and if it is a menu item add it
 	 to this menu.  */
-      item = XCONS (tail)->car;
+      item = XCAR (tail);
       if (CONSP (item))
-	single_menu_item (XCONS (item)->car, XCONS (item)->cdr,
+	single_menu_item (XCAR (item), XCDR (item),
 			  &pending_maps, notreal, maxdepth, &notbuttons);
       else if (VECTORP (item))
 	{
@@ -446,12 +446,12 @@
     {
       Lisp_Object elt, eltcdr, string;
       elt = Fcar (pending_maps);
-      eltcdr = XCONS (elt)->cdr;
-      string = XCONS (eltcdr)->car;
+      eltcdr = XCDR (elt);
+      string = XCAR (eltcdr);
       /* We no longer discard the @ from the beginning of the string here.
 	 Instead, we do this in w32_menu_show.  */
       single_keymap_panes (Fcar (elt), string,
-			   XCONS (eltcdr)->cdr, notreal, maxdepth - 1);
+			   XCDR (eltcdr), notreal, maxdepth - 1);
       pending_maps = Fcdr (pending_maps);
     }
 }
@@ -702,7 +702,7 @@
 
       /* Decode the first argument: find the window and the coordinates.  */
       if (EQ (position, Qt)
-	  || (CONSP (position) && EQ (XCONS (position)->car, Qmenu_bar)))
+	  || (CONSP (position) && EQ (XCAR (position), Qmenu_bar)))
 	{
 	  /* Use the mouse's current position.  */
 	  FRAME_PTR new_f = selected_frame;
@@ -900,7 +900,7 @@
 
   /* Decode the first argument: find the window or frame to use.  */
   if (EQ (position, Qt)
-      || (CONSP (position) && EQ (XCONS (position)->car, Qmenu_bar)))
+      || (CONSP (position) && EQ (XCAR (position), Qmenu_bar)))
     {
 #if 0 /* Using the frame the mouse is on may not be right.  */
       /* Use the mouse's current position.  */
--- a/src/w32proc.c	Sun Sep 12 05:07:01 1999 +0000
+++ b/src/w32proc.c	Sun Sep 12 07:05:34 1999 +0000
@@ -2068,11 +2068,11 @@
   DWORD kl;
 
   CHECK_CONS (layout, 0);
-  CHECK_NUMBER (XCONS (layout)->car, 0);
-  CHECK_NUMBER (XCONS (layout)->cdr, 0);
+  CHECK_NUMBER (XCAR (layout), 0);
+  CHECK_NUMBER (XCDR (layout), 0);
 
-  kl = (XINT (XCONS (layout)->car) & 0xffff)
-    | (XINT (XCONS (layout)->cdr) << 16);
+  kl = (XINT (XCAR (layout)) & 0xffff)
+    | (XINT (XCDR (layout)) << 16);
 
   /* Synchronize layout with input thread.  */
   if (dwWindowsThreadId)
--- a/src/w32term.c	Sun Sep 12 05:07:01 1999 +0000
+++ b/src/w32term.c	Sun Sep 12 07:05:34 1999 +0000
@@ -2588,11 +2588,11 @@
 
   for (tail = Vframe_list;
        XGCTYPE (tail) == Lisp_Cons;
-       tail = XCONS (tail)->cdr)
+       tail = XCDR (tail))
     {
       Lisp_Object frame, bar, condemned;
 
-      frame = XCONS (tail)->car;
+      frame = XCAR (tail);
       /* All elements of Vframe_list should be frames.  */
       if (! GC_FRAMEP (frame))
 	abort ();
@@ -3473,7 +3473,7 @@
 			numchars--;
 		      }
 		    else if (! NILP(Vframe_list)
-			     && ! NILP (XCONS (Vframe_list)->cdr))
+			     && ! NILP (XCDR (Vframe_list)))
 		      /* Force a redisplay sooner or later to update the
 			 frame titles in case this is the second frame.  */
 		      record_asynch_buffer_change ();
@@ -4981,7 +4981,7 @@
   /* Put it on w32_display_name_list as well, to keep them parallel.  */ 
   w32_display_name_list = Fcons (Fcons (display_name, Qnil),
 				   w32_display_name_list);
-  dpyinfo->name_list_element = XCONS (w32_display_name_list)->car;
+  dpyinfo->name_list_element = XCAR (w32_display_name_list);
   
   dpyinfo->w32_id_name
     = (char *) xmalloc (XSTRING (Vinvocation_name)->size
@@ -5071,22 +5071,22 @@
   /* Discard this display from w32_display_name_list and w32_display_list.
      We can't use Fdelq because that can quit.  */
   if (! NILP (w32_display_name_list)
-      && EQ (XCONS (w32_display_name_list)->car, dpyinfo->name_list_element))
-    w32_display_name_list = XCONS (w32_display_name_list)->cdr;
+      && EQ (XCAR (w32_display_name_list), dpyinfo->name_list_element))
+    w32_display_name_list = XCDR (w32_display_name_list);
   else
     {
       Lisp_Object tail;
 
       tail = w32_display_name_list;
-      while (CONSP (tail) && CONSP (XCONS (tail)->cdr))
+      while (CONSP (tail) && CONSP (XCDR (tail)))
 	{
-	  if (EQ (XCONS (XCONS (tail)->cdr)->car,
+	  if (EQ (XCAR (XCDR (tail)),
 		  dpyinfo->name_list_element))
 	    {
-	      XCONS (tail)->cdr = XCONS (XCONS (tail)->cdr)->cdr;
+	      XCDR (tail) = XCDR (XCDR (tail));
 	      break;
 	    }
-	  tail = XCONS (tail)->cdr;
+	  tail = XCDR (tail);
 	}
     }
 
--- a/src/xfns.c	Sun Sep 12 05:07:01 1999 +0000
+++ b/src/xfns.c	Sun Sep 12 07:05:34 1999 +0000
@@ -351,9 +351,9 @@
   Lisp_Object tail, frame;
   struct frame *f;
 
-  for (tail = Vframe_list; GC_CONSP (tail); tail = XCONS (tail)->cdr)
-    {
-      frame = XCONS (tail)->car;
+  for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail))
+    {
+      frame = XCAR (tail);
       if (!GC_FRAMEP (frame))
         continue;
       f = XFRAME (frame);
@@ -389,9 +389,9 @@
   struct frame *f;
   struct x_output *x;
 
-  for (tail = Vframe_list; GC_CONSP (tail); tail = XCONS (tail)->cdr)
-    {
-      frame = XCONS (tail)->car;
+  for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail))
+    {
+      frame = XCAR (tail);
       if (!GC_FRAMEP (frame))
         continue;
       f = XFRAME (frame);
@@ -427,9 +427,9 @@
   struct frame *f;
   struct x_output *x;
 
-  for (tail = Vframe_list; GC_CONSP (tail); tail = XCONS (tail)->cdr)
-    {
-      frame = XCONS (tail)->car;
+  for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail))
+    {
+      frame = XCAR (tail);
       if (!GC_FRAMEP (frame))
         continue;
       f = XFRAME (frame);
@@ -462,9 +462,9 @@
   struct frame *f;
   struct x_output *x;
 
-  for (tail = Vframe_list; GC_CONSP (tail); tail = XCONS (tail)->cdr)
-    {
-      frame = XCONS (tail)->car;
+  for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail))
+    {
+      frame = XCAR (tail);
       if (!GC_FRAMEP (frame))
         continue;
       f = XFRAME (frame);
@@ -491,9 +491,9 @@
   struct frame *f;
   struct x_output *x;
 
-  for (tail = Vframe_list; GC_CONSP (tail); tail = XCONS (tail)->cdr)
-    {
-      frame = XCONS (tail)->car;
+  for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail))
+    {
+      frame = XCAR (tail);
       if (!GC_FRAMEP (frame))
         continue;
       f = XFRAME (frame);
@@ -1027,18 +1027,18 @@
 	    if (leftpos < 0)
 	      f->output_data.x->size_hint_flags |= XNegative;
 	  }
-	else if (CONSP (left) && EQ (XCONS (left)->car, Qminus)
-		 && CONSP (XCONS (left)->cdr)
-		 && INTEGERP (XCONS (XCONS (left)->cdr)->car))
+	else if (CONSP (left) && EQ (XCAR (left), Qminus)
+		 && CONSP (XCDR (left))
+		 && INTEGERP (XCAR (XCDR (left))))
 	  {
-	    leftpos = - XINT (XCONS (XCONS (left)->cdr)->car);
+	    leftpos = - XINT (XCAR (XCDR (left)));
 	    f->output_data.x->size_hint_flags |= XNegative;
 	  }
-	else if (CONSP (left) && EQ (XCONS (left)->car, Qplus)
-		 && CONSP (XCONS (left)->cdr)
-		 && INTEGERP (XCONS (XCONS (left)->cdr)->car))
+	else if (CONSP (left) && EQ (XCAR (left), Qplus)
+		 && CONSP (XCDR (left))
+		 && INTEGERP (XCAR (XCDR (left))))
 	  {
-	    leftpos = XINT (XCONS (XCONS (left)->cdr)->car);
+	    leftpos = XINT (XCAR (XCDR (left)));
 	  }
 
 	if (EQ (top, Qminus))
@@ -1049,18 +1049,18 @@
 	    if (toppos < 0)
 	      f->output_data.x->size_hint_flags |= YNegative;
 	  }
-	else if (CONSP (top) && EQ (XCONS (top)->car, Qminus)
-		 && CONSP (XCONS (top)->cdr)
-		 && INTEGERP (XCONS (XCONS (top)->cdr)->car))
+	else if (CONSP (top) && EQ (XCAR (top), Qminus)
+		 && CONSP (XCDR (top))
+		 && INTEGERP (XCAR (XCDR (top))))
 	  {
-	    toppos = - XINT (XCONS (XCONS (top)->cdr)->car);
+	    toppos = - XINT (XCAR (XCDR (top)));
 	    f->output_data.x->size_hint_flags |= YNegative;
 	  }
-	else if (CONSP (top) && EQ (XCONS (top)->car, Qplus)
-		 && CONSP (XCONS (top)->cdr)
-		 && INTEGERP (XCONS (XCONS (top)->cdr)->car))
+	else if (CONSP (top) && EQ (XCAR (top), Qplus)
+		 && CONSP (XCDR (top))
+		 && INTEGERP (XCAR (XCDR (top))))
 	  {
-	    toppos = XINT (XCONS (XCONS (top)->cdr)->car);
+	    toppos = XINT (XCAR (XCDR (top)));
 	  }
 
 
@@ -1205,7 +1205,7 @@
 		  (FRAME_VISIBLE_P (f) ? Qt
 		   : FRAME_ICONIFIED_P (f) ? Qicon : Qnil));
   store_in_alist (alistptr, Qdisplay,
-		  XCONS (FRAME_X_DISPLAY_INFO (f)->name_list_element)->car);
+		  XCAR (FRAME_X_DISPLAY_INFO (f)->name_list_element));
 
   if (f->output_data.x->parent_desc == FRAME_X_DISPLAY_INFO (f)->root_window)
     tem = Qnil;
@@ -1698,11 +1698,11 @@
       FRAME_DESIRED_CURSOR (f) = BAR_CURSOR;
       f->output_data.x->cursor_width = 2;
     }
-  else if (CONSP (arg) && EQ (XCONS (arg)->car, Qbar)
-	   && INTEGERP (XCONS (arg)->cdr))
+  else if (CONSP (arg) && EQ (XCAR (arg), Qbar)
+	   && INTEGERP (XCDR (arg)))
     {
       FRAME_DESIRED_CURSOR (f) = BAR_CURSOR;
-      f->output_data.x->cursor_width = XINT (XCONS (arg)->cdr);
+      f->output_data.x->cursor_width = XINT (XCDR (arg));
     }
   else
     /* Treat anything unknown as "box cursor".
@@ -1759,7 +1759,7 @@
 
   tem = assq_no_quit (Qicon_type, f->param_alist);
   if (CONSP (tem))
-    return XCONS (tem)->cdr;
+    return XCDR (tem);
   else
     return Qnil;
 }
@@ -2921,18 +2921,18 @@
 	  f->output_data.x->top_pos = 0;
 	  window_prompting |= YNegative;
 	}
-      else if (CONSP (tem0) && EQ (XCONS (tem0)->car, Qminus)
-	       && CONSP (XCONS (tem0)->cdr)
-	       && INTEGERP (XCONS (XCONS (tem0)->cdr)->car))
+      else if (CONSP (tem0) && EQ (XCAR (tem0), Qminus)
+	       && CONSP (XCDR (tem0))
+	       && INTEGERP (XCAR (XCDR (tem0))))
 	{
-	  f->output_data.x->top_pos = - XINT (XCONS (XCONS (tem0)->cdr)->car);
+	  f->output_data.x->top_pos = - XINT (XCAR (XCDR (tem0)));
 	  window_prompting |= YNegative;
 	}
-      else if (CONSP (tem0) && EQ (XCONS (tem0)->car, Qplus)
-	       && CONSP (XCONS (tem0)->cdr)
-	       && INTEGERP (XCONS (XCONS (tem0)->cdr)->car))
+      else if (CONSP (tem0) && EQ (XCAR (tem0), Qplus)
+	       && CONSP (XCDR (tem0))
+	       && INTEGERP (XCAR (XCDR (tem0))))
 	{
-	  f->output_data.x->top_pos = XINT (XCONS (XCONS (tem0)->cdr)->car);
+	  f->output_data.x->top_pos = XINT (XCAR (XCDR (tem0)));
 	}
       else if (EQ (tem0, Qunbound))
 	f->output_data.x->top_pos = 0;
@@ -2949,18 +2949,18 @@
 	  f->output_data.x->left_pos = 0;
 	  window_prompting |= XNegative;
 	}
-      else if (CONSP (tem1) && EQ (XCONS (tem1)->car, Qminus)
-	       && CONSP (XCONS (tem1)->cdr)
-	       && INTEGERP (XCONS (XCONS (tem1)->cdr)->car))
+      else if (CONSP (tem1) && EQ (XCAR (tem1), Qminus)
+	       && CONSP (XCDR (tem1))
+	       && INTEGERP (XCAR (XCDR (tem1))))
 	{
-	  f->output_data.x->left_pos = - XINT (XCONS (XCONS (tem1)->cdr)->car);
+	  f->output_data.x->left_pos = - XINT (XCAR (XCDR (tem1)));
 	  window_prompting |= XNegative;
 	}
-      else if (CONSP (tem1) && EQ (XCONS (tem1)->car, Qplus)
-	       && CONSP (XCONS (tem1)->cdr)
-	       && INTEGERP (XCONS (XCONS (tem1)->cdr)->car))
+      else if (CONSP (tem1) && EQ (XCAR (tem1), Qplus)
+	       && CONSP (XCDR (tem1))
+	       && INTEGERP (XCAR (XCDR (tem1))))
 	{
-	  f->output_data.x->left_pos = XINT (XCONS (XCONS (tem1)->cdr)->car);
+	  f->output_data.x->left_pos = XINT (XCAR (XCDR (tem1)));
 	}
       else if (EQ (tem1, Qunbound))
 	f->output_data.x->left_pos = 0;
@@ -3673,8 +3673,8 @@
     }
 
   /* Create fontsets from `global_fontset_alist' before handling fonts.  */
-  for (tem = Vglobal_fontset_alist; CONSP (tem); tem = XCONS (tem)->cdr)
-    fs_register_fontset (f, XCONS (tem)->car);
+  for (tem = Vglobal_fontset_alist; CONSP (tem); tem = XCDR (tem))
+    fs_register_fontset (f, XCAR (tem));
 
   /* Extract the window parameters from the supplied values
      that are needed to determine window geometry.  */
@@ -5262,10 +5262,10 @@
 
   for (dpyinfo = x_display_list, names = x_display_name_list;
        dpyinfo;
-       dpyinfo = dpyinfo->next, names = XCONS (names)->cdr)
+       dpyinfo = dpyinfo->next, names = XCDR (names))
     {
       Lisp_Object tem;
-      tem = Fstring_equal (XCONS (XCONS (names)->car)->car, name);
+      tem = Fstring_equal (XCAR (XCAR (names)), name);
       if (!NILP (tem))
 	return dpyinfo;
     }
@@ -5383,8 +5383,8 @@
   Lisp_Object tail, result;
 
   result = Qnil;
-  for (tail = x_display_name_list; ! NILP (tail); tail = XCONS (tail)->cdr)
-    result = Fcons (XCONS (XCONS (tail)->car)->car, result);
+  for (tail = x_display_name_list; ! NILP (tail); tail = XCDR (tail))
+    result = Fcons (XCAR (XCAR (tail)), result);
 
   return result;
 }
@@ -9591,8 +9591,8 @@
     }
 
   /* Create fontsets from `global_fontset_alist' before handling fonts.  */
-  for (tem = Vglobal_fontset_alist; CONSP (tem); tem = XCONS (tem)->cdr)
-    fs_register_fontset (f, XCONS (tem)->car);
+  for (tem = Vglobal_fontset_alist; CONSP (tem); tem = XCDR (tem))
+    fs_register_fontset (f, XCAR (tem));
 
   /* Extract the window parameters from the supplied values
      that are needed to determine window geometry.  */
--- a/src/xmenu.c	Sun Sep 12 05:07:01 1999 +0000
+++ b/src/xmenu.c	Sun Sep 12 07:05:34 1999 +0000
@@ -211,9 +211,9 @@
   Lisp_Object tail, frame;
   FRAME_PTR f;
 
-  for (tail = Vframe_list; GC_CONSP (tail); tail = XCONS (tail)->cdr)
+  for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail))
     {
-      frame = XCONS (tail)->car;
+      frame = XCAR (tail);
       if (!GC_FRAMEP (frame))
         continue;
       f = XFRAME (frame);
@@ -417,14 +417,14 @@
   notbuttons = menu_items_used;
 #endif
 
-  for (tail = keymap; CONSP (tail); tail = XCONS (tail)->cdr)
+  for (tail = keymap; CONSP (tail); tail = XCDR (tail))
     {
       GCPRO2 (keymap, pending_maps);
       /* Look at each key binding, and if it is a menu item add it
 	 to this menu.  */
-      item = XCONS (tail)->car;
+      item = XCAR (tail);
       if (CONSP (item))
-	single_menu_item (XCONS (item)->car, XCONS (item)->cdr,
+	single_menu_item (XCAR (item), XCDR (item),
 			  &pending_maps, notreal, maxdepth, &notbuttons);
       else if (VECTORP (item))
 	{
@@ -447,12 +447,12 @@
     {
       Lisp_Object elt, eltcdr, string;
       elt = Fcar (pending_maps);
-      eltcdr = XCONS (elt)->cdr;
-      string = XCONS (eltcdr)->car;
+      eltcdr = XCDR (elt);
+      string = XCAR (eltcdr);
       /* We no longer discard the @ from the beginning of the string here.
 	 Instead, we do this in xmenu_show.  */
       single_keymap_panes (Fcar (elt), string,
-			   XCONS (eltcdr)->cdr, notreal, maxdepth - 1);
+			   XCDR (eltcdr), notreal, maxdepth - 1);
       pending_maps = Fcdr (pending_maps);
     }
 }
@@ -705,7 +705,7 @@
 
       /* Decode the first argument: find the window and the coordinates.  */
       if (EQ (position, Qt)
-	  || (CONSP (position) && EQ (XCONS (position)->car, Qmenu_bar)))
+	  || (CONSP (position) && EQ (XCAR (position), Qmenu_bar)))
 	{
 	  /* Use the mouse's current position.  */
 	  FRAME_PTR new_f = selected_frame;
@@ -903,7 +903,7 @@
 
   /* Decode the first argument: find the window or frame to use.  */
   if (EQ (position, Qt)
-      || (CONSP (position) && EQ (XCONS (position)->car, Qmenu_bar)))
+      || (CONSP (position) && EQ (XCAR (position), Qmenu_bar)))
     {
 #if 0 /* Using the frame the mouse is on may not be right.  */
       /* Use the mouse's current position.  */
--- a/src/xselect.c	Sun Sep 12 05:07:01 1999 +0000
+++ b/src/xselect.c	Sun Sep 12 07:05:34 1999 +0000
@@ -278,9 +278,9 @@
       {
 	Lisp_Object rest;	/* we know it's not the CAR, so it's easy.  */
 	for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest))
-	  if (EQ (prev_value, Fcar (XCONS (rest)->cdr)))
+	  if (EQ (prev_value, Fcar (XCDR (rest))))
 	    {
-	      XCONS (rest)->cdr = Fcdr (XCONS (rest)->cdr);
+	      XCDR (rest) = Fcdr (XCDR (rest));
 	      break;
 	    }
       }
@@ -311,7 +311,7 @@
   if (EQ (target_type, QTIMESTAMP))
     {
       handler_fn = Qnil;
-      value = XCONS (XCONS (XCONS (local_value)->cdr)->cdr)->car;
+      value = XCAR (XCDR (XCDR (local_value)));
     }
 #if 0
   else if (EQ (target_type, QDELETE))
@@ -319,19 +319,19 @@
       handler_fn = Qnil;
       Fx_disown_selection_internal
 	(selection_symbol,
-	 XCONS (XCONS (XCONS (local_value)->cdr)->cdr)->car);
+	 XCAR (XCDR (XCDR (local_value))));
       value = QNULL;
     }
 #endif
 
 #if 0 /* #### MULTIPLE doesn't work yet */
   else if (CONSP (target_type)
-	   && XCONS (target_type)->car == QMULTIPLE)
+	   && XCAR (target_type) == QMULTIPLE)
     {
       Lisp_Object pairs;
       int size;
       int i;
-      pairs = XCONS (target_type)->cdr;
+      pairs = XCDR (target_type);
       size = XVECTOR (pairs)->size;
       /* If the target is MULTIPLE, then target_type looks like
 	  (MULTIPLE . [[SELECTION1 TARGET1] [SELECTION2 TARGET2] ... ])
@@ -362,7 +362,7 @@
       if (!NILP (handler_fn))
 	value = call3 (handler_fn,
 		       selection_symbol, target_type,
-		       XCONS (XCONS (local_value)->cdr)->car);
+		       XCAR (XCDR (local_value)));
       else
 	value = Qnil;
       unbind_to (count, Qnil);
@@ -373,9 +373,9 @@
 
   check = value;
   if (CONSP (value)
-      && SYMBOLP (XCONS (value)->car))
-    type = XCONS (value)->car,
-    check = XCONS (value)->cdr;
+      && SYMBOLP (XCAR (value)))
+    type = XCAR (value),
+    check = XCDR (value);
   
   if (STRINGP (check)
       || VECTORP (check)
@@ -385,12 +385,12 @@
     return value;
   /* Check for a value that cons_to_long could handle.  */
   else if (CONSP (check)
-	   && INTEGERP (XCONS (check)->car)
-	   && (INTEGERP (XCONS (check)->cdr)
+	   && INTEGERP (XCAR (check))
+	   && (INTEGERP (XCDR (check))
 	       ||
-	       (CONSP (XCONS (check)->cdr)
-		&& INTEGERP (XCONS (XCONS (check)->cdr)->car)
-		&& NILP (XCONS (XCONS (check)->cdr)->cdr))))
+	       (CONSP (XCDR (check))
+		&& INTEGERP (XCAR (XCDR (check)))
+		&& NILP (XCDR (XCDR (check))))))
     return value;
   else
     return
@@ -687,7 +687,7 @@
     }
 
   local_selection_time = (Time)
-    cons_to_long (XCONS (XCONS (XCONS (local_selection_data)->cdr)->cdr)->car);
+    cons_to_long (XCAR (XCDR (XCDR (local_selection_data))));
 
   if (SELECTION_EVENT_TIME (event) != CurrentTime
       && local_selection_time > SELECTION_EVENT_TIME (event))
@@ -799,7 +799,7 @@
   if (NILP (local_selection_data)) return;
 
   local_selection_time = (Time)
-    cons_to_long (XCONS (XCONS (XCONS (local_selection_data)->cdr)->cdr)->car);
+    cons_to_long (XCAR (XCDR (XCDR (local_selection_data))));
 
   /* This SelectionClear is for a selection that we no longer own, so we can
      disregard it.  (That is, we have reasserted the selection since this
@@ -818,9 +818,9 @@
     {
       Lisp_Object rest;
       for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest))
-	if (EQ (local_selection_data, Fcar (XCONS (rest)->cdr)))
+	if (EQ (local_selection_data, Fcar (XCDR (rest))))
 	  {
-	    XCONS (rest)->cdr = Fcdr (XCONS (rest)->cdr);
+	    XCDR (rest) = Fcdr (XCDR (rest));
 	    break;
 	  }
     }
@@ -881,13 +881,13 @@
 
   /* Delete elements after the beginning of Vselection_alist.  */
   for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest))
-    if (EQ (frame, Fcar (Fcdr (Fcdr (Fcdr (Fcar (XCONS (rest)->cdr)))))))
+    if (EQ (frame, Fcar (Fcdr (Fcdr (Fcdr (Fcar (XCDR (rest))))))))
       {
 	/* Let random Lisp code notice that the selection has been stolen.  */
 	Lisp_Object hooks, selection_symbol;
 
 	hooks = Vx_lost_selection_hooks;
-	selection_symbol = Fcar (Fcar (XCONS (rest)->cdr));
+	selection_symbol = Fcar (Fcar (XCDR (rest)));
 
 	if (!EQ (hooks, Qunbound))
 	  {
@@ -897,7 +897,7 @@
 	    redisplay_preserve_echo_area ();
 #endif
 	  }
-	XCONS (rest)->cdr = Fcdr (XCONS (rest)->cdr);
+	XCDR (rest) = Fcdr (XCDR (rest));
 	break;
       }
 }
@@ -975,8 +975,8 @@
      Lisp_Object identifierval;
 {
   unexpect_property_change ((struct prop_location *)
-			    (XFASTINT (XCONS (identifierval)->car) << 16
-			     | XFASTINT (XCONS (identifierval)->cdr)));
+			    (XFASTINT (XCAR (identifierval)) << 16
+			     | XFASTINT (XCDR (identifierval))));
   return Qnil;
 }
 
@@ -992,13 +992,13 @@
   Lisp_Object tem;
 
   tem = Fcons (Qnil, Qnil);
-  XSETFASTINT (XCONS (tem)->car, (EMACS_UINT)location >> 16);
-  XSETFASTINT (XCONS (tem)->cdr, (EMACS_UINT)location & 0xffff);
+  XSETFASTINT (XCAR (tem), (EMACS_UINT)location >> 16);
+  XSETFASTINT (XCDR (tem), (EMACS_UINT)location & 0xffff);
 
   /* Make sure to do unexpect_property_change if we quit or err.  */
   record_unwind_protect (wait_for_property_change_unwind, tem);
 
-  XCONS (property_change_reply)->car = Qnil;
+  XCAR (property_change_reply) = Qnil;
 
   property_change_reply_object = location;
   /* If the event we are waiting for arrives beyond here, it will set
@@ -1009,7 +1009,7 @@
       usecs = (x_selection_timeout % 1000) * 1000;
       wait_reading_process_input (secs, usecs, property_change_reply, 0);
 
-      if (NILP (XCONS (property_change_reply)->car))
+      if (NILP (XCAR (property_change_reply)))
 	error ("Timed out waiting for property-notify event");
     }
 
@@ -1043,7 +1043,7 @@
 	  /* If this is the one wait_for_property_change is waiting for,
 	     tell it to wake up.  */
 	  if (rest == property_change_reply_object)
-	    XCONS (property_change_reply)->car = Qt;
+	    XCAR (property_change_reply) = Qt;
 
 	  if (prev)
 	    prev->next = rest->next;
@@ -1092,7 +1092,7 @@
   int i;
   int size;
   if (CONSP (obj))
-    return Fcons (XCONS (obj)->car, copy_multiple_data (XCONS (obj)->cdr));
+    return Fcons (XCAR (obj), copy_multiple_data (XCDR (obj)));
     
   CHECK_VECTOR (obj, 0);
   vec = Fmake_vector (size = XVECTOR (obj)->size, Qnil);
@@ -1140,7 +1140,7 @@
   Lisp_Object frame;
 
   if (CONSP (target_type))
-    type_atom = symbol_to_x_atom (dpyinfo, display, XCONS (target_type)->car);
+    type_atom = symbol_to_x_atom (dpyinfo, display, XCAR (target_type));
   else
     type_atom = symbol_to_x_atom (dpyinfo, display, target_type);
 
@@ -1153,7 +1153,7 @@
   /* Prepare to block until the reply has been read.  */
   reading_selection_window = requestor_window;
   reading_which_selection = selection_atom;
-  XCONS (reading_selection_reply)->car = Qnil;
+  XCAR (reading_selection_reply) = Qnil;
 
   frame = some_frame_on_display (dpyinfo);
 
@@ -1179,9 +1179,9 @@
   x_uncatch_errors (display, count);
   UNBLOCK_INPUT;
 
-  if (NILP (XCONS (reading_selection_reply)->car))
+  if (NILP (XCAR (reading_selection_reply)))
     error ("Timed out waiting for reply from selection owner");
-  if (EQ (XCONS (reading_selection_reply)->car, Qlambda))
+  if (EQ (XCAR (reading_selection_reply), Qlambda))
     error ("No `%s' selection", XSYMBOL (selection_symbol)->name->data);
 
   /* Otherwise, the selection is waiting for us on the requested property.  */
@@ -1627,12 +1627,12 @@
 
   *nofree_ret = 0;
 
-  if (CONSP (obj) && SYMBOLP (XCONS (obj)->car))
+  if (CONSP (obj) && SYMBOLP (XCAR (obj)))
     {
-      type = XCONS (obj)->car;
-      obj = XCONS (obj)->cdr;
-      if (CONSP (obj) && NILP (XCONS (obj)->cdr))
-	obj = XCONS (obj)->car;
+      type = XCAR (obj);
+      obj = XCDR (obj);
+      if (CONSP (obj) && NILP (XCDR (obj)))
+	obj = XCAR (obj);
     }
 
   if (EQ (obj, QNULL) || (EQ (type, QNULL)))
@@ -1722,10 +1722,10 @@
       if (NILP (type)) type = QINTEGER;
     }
   else if (INTEGERP (obj)
-	   || (CONSP (obj) && INTEGERP (XCONS (obj)->car)
-	       && (INTEGERP (XCONS (obj)->cdr)
-		   || (CONSP (XCONS (obj)->cdr)
-		       && INTEGERP (XCONS (XCONS (obj)->cdr)->car)))))
+	   || (CONSP (obj) && INTEGERP (XCAR (obj))
+	       && (INTEGERP (XCDR (obj))
+		   || (CONSP (XCDR (obj))
+		       && INTEGERP (XCAR (XCDR (obj)))))))
     {
       *format_ret = 32;
       *size_ret = 1;
@@ -1831,20 +1831,20 @@
      Lisp_Object obj;
 {
   if (CONSP (obj)
-      && INTEGERP (XCONS (obj)->car)
-      && CONSP (XCONS (obj)->cdr)
-      && INTEGERP (XCONS (XCONS (obj)->cdr)->car)
-      && NILP (XCONS (XCONS (obj)->cdr)->cdr))
-    obj = Fcons (XCONS (obj)->car, XCONS (obj)->cdr);
+      && INTEGERP (XCAR (obj))
+      && CONSP (XCDR (obj))
+      && INTEGERP (XCAR (XCDR (obj)))
+      && NILP (XCDR (XCDR (obj))))
+    obj = Fcons (XCAR (obj), XCDR (obj));
 
   if (CONSP (obj)
-      && INTEGERP (XCONS (obj)->car)
-      && INTEGERP (XCONS (obj)->cdr))
+      && INTEGERP (XCAR (obj))
+      && INTEGERP (XCDR (obj)))
     {
-      if (XINT (XCONS (obj)->car) == 0)
-	return XCONS (obj)->cdr;
-      if (XINT (XCONS (obj)->car) == -1)
-	return make_number (- XINT (XCONS (obj)->cdr));
+      if (XINT (XCAR (obj)) == 0)
+	return XCDR (obj);
+      if (XINT (XCAR (obj)) == -1)
+	return make_number (- XINT (XCDR (obj)));
     }
   if (VECTORP (obj))
     {
@@ -1876,7 +1876,7 @@
   if (event->selection != reading_which_selection)
     return;
 
-  XCONS (reading_selection_reply)->car
+  XCAR (reading_selection_reply)
     = (event->property != 0 ? Qt : Qlambda);
 }
 
@@ -1920,9 +1920,9 @@
 
 #if 0 /* #### MULTIPLE doesn't work yet */
   if (CONSP (target_type)
-      && XCONS (target_type)->car == QMULTIPLE)
+      && XCAR (target_type) == QMULTIPLE)
     {
-      CHECK_VECTOR (XCONS (target_type)->cdr, 0);
+      CHECK_VECTOR (XCDR (target_type), 0);
       /* So we don't destructively modify this...  */
       target_type = copy_multiple_data (target_type);
     }
@@ -1939,11 +1939,11 @@
     }
 
   if (CONSP (val)
-      && SYMBOLP (XCONS (val)->car))
+      && SYMBOLP (XCAR (val)))
     {
-      val = XCONS (val)->cdr;
-      if (CONSP (val) && NILP (XCONS (val)->cdr))
-	val = XCONS (val)->car;
+      val = XCDR (val);
+      if (CONSP (val) && NILP (XCDR (val)))
+	val = XCAR (val);
     }
   val = clean_local_selection_data (val);
  DONE:
@@ -2006,14 +2006,14 @@
   Lisp_Object tail;
   struct buffer *buf = XBUFFER (buffer);
 
-  for (tail = Vselection_alist; CONSP (tail); tail = XCONS (tail)->cdr)
+  for (tail = Vselection_alist; CONSP (tail); tail = XCDR (tail))
     {
       Lisp_Object elt, value;
-      elt = XCONS (tail)->car;
-      value = XCONS (elt)->cdr;
-      if (CONSP (value) && MARKERP (XCONS (value)->car)
-	  && XMARKER (XCONS (value)->car)->buffer == buf)
-	Fx_disown_selection_internal (XCONS (elt)->car, Qnil);
+      elt = XCAR (tail);
+      value = XCDR (elt);
+      if (CONSP (value) && MARKERP (XCAR (value))
+	  && XMARKER (XCAR (value))->buffer == buf)
+	Fx_disown_selection_internal (XCAR (elt), Qnil);
     }
 }
 
--- a/src/xterm.c	Sun Sep 12 05:07:01 1999 +0000
+++ b/src/xterm.c	Sun Sep 12 07:05:34 1999 +0000
@@ -7062,11 +7062,11 @@
 
   for (tail = Vframe_list;
        XGCTYPE (tail) == Lisp_Cons;
-       tail = XCONS (tail)->cdr)
+       tail = XCDR (tail))
     {
       Lisp_Object frame, bar, condemned;
 
-      frame = XCONS (tail)->car;
+      frame = XCAR (tail);
       /* All elements of Vframe_list should be frames.  */
       if (! GC_FRAMEP (frame))
 	abort ();
@@ -9061,7 +9061,7 @@
 		      numchars--;
 		    }
 		  else if (! NILP (Vframe_list)
-			   && ! NILP (XCONS (Vframe_list)->cdr))
+			   && ! NILP (XCDR (Vframe_list)))
 		    /* Force a redisplay sooner or later
 		       to update the frame titles
 		       in case this is the second frame.  */
@@ -11728,17 +11728,17 @@
     /* We can return any single font matching PATTERN.  */
     try_XLoadQueryFont = 1;
 
-  for (; CONSP (patterns); patterns = XCONS (patterns)->cdr)
+  for (; CONSP (patterns); patterns = XCDR (patterns))
     {
       int num_fonts;
       char **names;
 
-      pattern = XCONS (patterns)->car;
+      pattern = XCAR (patterns);
       /* See if we cached the result for this particular query.
          The cache is an alist of the form:
 	   (((PATTERN . MAXNAMES) (FONTNAME . WIDTH) ...) ...)
       */
-      if (f && (tem = XCONS (FRAME_X_DISPLAY_INFO (f)->name_list_element)->cdr,
+      if (f && (tem = XCDR (FRAME_X_DISPLAY_INFO (f)->name_list_element),
 		key = Fcons (pattern, make_number (maxnames)),
 		!NILP (list = Fassoc (key, tem))))
 	{
@@ -11864,30 +11864,30 @@
 
       /* Now store the result in the cache.  */
       if (f != NULL)
-	XCONS (FRAME_X_DISPLAY_INFO (f)->name_list_element)->cdr
+	XCDR (FRAME_X_DISPLAY_INFO (f)->name_list_element)
 	  = Fcons (Fcons (key, list),
-		   XCONS (FRAME_X_DISPLAY_INFO (f)->name_list_element)->cdr);
+		   XCDR (FRAME_X_DISPLAY_INFO (f)->name_list_element));
 
     label_cached:
       if (NILP (list)) continue; /* Try the remaining alternatives.  */
 
       newlist = second_best = Qnil;
       /* Make a list of the fonts that have the right width.  */
-      for (; CONSP (list); list = XCONS (list)->cdr)
+      for (; CONSP (list); list = XCDR (list))
 	{
 	  int found_size;
 
-	  tem = XCONS (list)->car;
-
-	  if (!CONSP (tem) || NILP (XCONS (tem)->car))
+	  tem = XCAR (list);
+
+	  if (!CONSP (tem) || NILP (XCAR (tem)))
 	    continue;
 	  if (!size)
 	    {
-	      newlist = Fcons (XCONS (tem)->car, newlist);
+	      newlist = Fcons (XCAR (tem), newlist);
 	      continue;
 	    }
 
-	  if (!INTEGERP (XCONS (tem)->cdr))
+	  if (!INTEGERP (XCDR (tem)))
 	    {
 	      /* Since we have not yet known the size of this font, we
 		must try slow function call XLoadQueryFont.  */
@@ -11896,7 +11896,7 @@
 	      BLOCK_INPUT;
 	      count = x_catch_errors (dpy);
 	      thisinfo = XLoadQueryFont (dpy,
-					 XSTRING (XCONS (tem)->car)->data);
+					 XSTRING (XCAR (tem))->data);
 	      if (x_had_errors_p (dpy))
 		{
 		  /* This error is perhaps due to insufficient memory on X
@@ -11909,7 +11909,7 @@
 
 	      if (thisinfo)
 		{
-		  XCONS (tem)->cdr
+		  XCDR (tem)
 		    = (thisinfo->min_bounds.width == 0
 		       ? make_number (0)
 		       : make_number (thisinfo->max_bounds.width));
@@ -11919,26 +11919,26 @@
 		/* For unknown reason, the previous call of XListFont had
 		  returned a font which can't be opened.  Record the size
 		  as 0 not to try to open it again.  */
-		XCONS (tem)->cdr = make_number (0);
+		XCDR (tem) = make_number (0);
 	    }
 
-	  found_size = XINT (XCONS (tem)->cdr);
+	  found_size = XINT (XCDR (tem));
 	  if (found_size == size)
-	    newlist = Fcons (XCONS (tem)->car, newlist);
+	    newlist = Fcons (XCAR (tem), newlist);
 	  else if (found_size > 0)
 	    {
 	      if (NILP (second_best))
 		second_best = tem;
 	      else if (found_size < size)
 		{
-		  if (XINT (XCONS (second_best)->cdr) > size
-		      || XINT (XCONS (second_best)->cdr) < found_size)
+		  if (XINT (XCDR (second_best)) > size
+		      || XINT (XCDR (second_best)) < found_size)
 		    second_best = tem;
 		}
 	      else
 		{
-		  if (XINT (XCONS (second_best)->cdr) > size
-		      && XINT (XCONS (second_best)->cdr) > found_size)
+		  if (XINT (XCDR (second_best)) > size
+		      && XINT (XCDR (second_best)) > found_size)
 		    second_best = tem;
 		}
 	    }
@@ -11947,7 +11947,7 @@
 	break;
       else if (!NILP (second_best))
 	{
-	  newlist = Fcons (XCONS (second_best)->car, Qnil);
+	  newlist = Fcons (XCAR (second_best), Qnil);
 	  break;
 	}
     }
@@ -12071,12 +12071,12 @@
       int i;
 
       for (i = 0; i < dpyinfo->n_fonts; i++)
-	for (tail = font_names; CONSP (tail); tail = XCONS (tail)->cdr)
+	for (tail = font_names; CONSP (tail); tail = XCDR (tail))
 	  if (dpyinfo->font_table[i].name
 	      && (!strcmp (dpyinfo->font_table[i].name,
-			   XSTRING (XCONS (tail)->car)->data)
+			   XSTRING (XCAR (tail))->data)
 		  || !strcmp (dpyinfo->font_table[i].full_name,
-			      XSTRING (XCONS (tail)->car)->data)))
+			      XSTRING (XCAR (tail))->data)))
 	    return (dpyinfo->font_table + i);
     }
 
@@ -12094,7 +12094,7 @@
        a bug of not finding a font even if the font surely exists and
        is loadable by XLoadQueryFont.  */
     if (size > 0 && !NILP (font_names))
-      fontname = (char *) XSTRING (XCONS (font_names)->car)->data;
+      fontname = (char *) XSTRING (XCAR (font_names))->data;
 
     BLOCK_INPUT;
     count = x_catch_errors (FRAME_X_DISPLAY (f));
@@ -12190,19 +12190,19 @@
 	Lisp_Object lispy_name = build_string (fontname);
 	Lisp_Object lispy_full_name = build_string (fontp->full_name);
 
-	XCONS (dpyinfo->name_list_element)->cdr
+	XCDR (dpyinfo->name_list_element)
 	  = Fcons (Fcons (Fcons (lispy_name, make_number (256)),
 			  Fcons (Fcons (lispy_full_name,
 					make_number (fontp->size)),
 				 Qnil)),
-		   XCONS (dpyinfo->name_list_element)->cdr);
+		   XCDR (dpyinfo->name_list_element));
 	if (full_name)
-	  XCONS (dpyinfo->name_list_element)->cdr
+	  XCDR (dpyinfo->name_list_element)
 	    = Fcons (Fcons (Fcons (lispy_full_name, make_number (256)),
 			    Fcons (Fcons (lispy_full_name,
 					  make_number (fontp->size)),
 				   Qnil)),
-		     XCONS (dpyinfo->name_list_element)->cdr);
+		     XCDR (dpyinfo->name_list_element));
       }
 
     /* The slot `encoding' specifies how to map a character
@@ -12288,12 +12288,12 @@
 {
   Lisp_Object list, elt;
 
-  for (list = Vfont_ccl_encoder_alist; CONSP (list); list = XCONS (list)->cdr)
-    {
-      elt = XCONS (list)->car;
+  for (list = Vfont_ccl_encoder_alist; CONSP (list); list = XCDR (list))
+    {
+      elt = XCAR (list);
       if (CONSP (elt)
-	  && STRINGP (XCONS (elt)->car)
-	  && (fast_c_string_match_ignore_case (XCONS (elt)->car, fontp->name)
+	  && STRINGP (XCAR (elt))
+	  && (fast_c_string_match_ignore_case (XCAR (elt), fontp->name)
 	      >= 0))
 	break;
     }
@@ -12302,7 +12302,7 @@
       struct ccl_program *ccl
 	= (struct ccl_program *) xmalloc (sizeof (struct ccl_program));
 
-      if (setup_ccl_program (ccl, XCONS (elt)->cdr) < 0)
+      if (setup_ccl_program (ccl, XCDR (elt)) < 0)
 	xfree (ccl);
       else
 	fontp->font_encoder = ccl;
@@ -12487,8 +12487,8 @@
     Lisp_Object tail;
 
     for (share = x_display_list, tail = x_display_name_list; share;
-	 share = share->next, tail = XCONS (tail)->cdr)
-      if (same_x_server (XSTRING (XCONS (XCONS (tail)->car)->car)->data,
+	 share = share->next, tail = XCDR (tail))
+      if (same_x_server (XSTRING (XCAR (XCAR (tail)))->data,
 			 XSTRING (display_name)->data))
 	break;
     if (share)
@@ -12524,7 +12524,7 @@
   /* Put it on x_display_name_list as well, to keep them parallel.  */ 
   x_display_name_list = Fcons (Fcons (display_name, Qnil),
 			       x_display_name_list);
-  dpyinfo->name_list_element = XCONS (x_display_name_list)->car;
+  dpyinfo->name_list_element = XCAR (x_display_name_list);
 
   dpyinfo->display = dpy;
 
@@ -12743,22 +12743,22 @@
   /* Discard this display from x_display_name_list and x_display_list.
      We can't use Fdelq because that can quit.  */
   if (! NILP (x_display_name_list)
-      && EQ (XCONS (x_display_name_list)->car, dpyinfo->name_list_element))
-    x_display_name_list = XCONS (x_display_name_list)->cdr;
+      && EQ (XCAR (x_display_name_list), dpyinfo->name_list_element))
+    x_display_name_list = XCDR (x_display_name_list);
   else
     {
       Lisp_Object tail;
 
       tail = x_display_name_list;
-      while (CONSP (tail) && CONSP (XCONS (tail)->cdr))
-	{
-	  if (EQ (XCONS (XCONS (tail)->cdr)->car,
+      while (CONSP (tail) && CONSP (XCDR (tail)))
+	{
+	  if (EQ (XCAR (XCDR (tail)),
 		  dpyinfo->name_list_element))
 	    {
-	      XCONS (tail)->cdr = XCONS (XCONS (tail)->cdr)->cdr;
+	      XCDR (tail) = XCDR (XCDR (tail));
 	      break;
 	    }
-	  tail = XCONS (tail)->cdr;
+	  tail = XCDR (tail);
 	}
     }