diff src/composite.c @ 39973:579177964efa

Avoid (most) uses of XCAR/XCDR as lvalues, for flexibility in experimenting with lisp system changes.
author Ken Raeburn <raeburn@raeburn.org>
date Tue, 16 Oct 2001 09:09:51 +0000
parents a61b3d907098
children cdfd4d09b79a
line wrap: on
line diff
--- a/src/composite.c	Mon Oct 15 20:52:59 2001 +0000
+++ b/src/composite.c	Tue Oct 16 09:09:51 2001 +0000
@@ -249,8 +249,8 @@
 	 modify the cons cell of PROP because it is not shared.  */
       key = HASH_KEY (hash_table, hash_index);
       id = HASH_VALUE (hash_table, hash_index);
-      XCAR (prop) = id;
-      XCDR (prop) = Fcons (make_number (nchars), Fcons (key, XCDR (prop)));
+      XSETCAR (prop, id);
+      XSETCDR (prop, Fcons (make_number (nchars), Fcons (key, XCDR (prop))));
       return XINT (id);
     }
 
@@ -297,8 +297,8 @@
   /* Change PROP from Form-A above to Form-B.  We can directly modify
      the cons cell of PROP because it is not shared.  */
   XSETFASTINT (id, n_compositions);
-  XCAR (prop) = id;
-  XCDR (prop) = Fcons (make_number (nchars), Fcons (key, XCDR (prop)));
+  XSETCAR (prop, id);
+  XSETCDR (prop, Fcons (make_number (nchars), Fcons (key, XCDR (prop))));
 
   /* Register the composition in composition_hash_table.  */
   hash_index = hash_put (hash_table, key, id, hash_code);
@@ -569,7 +569,7 @@
 	{
 	  if (EQ (XCAR (plist), Qcomposition)
 	      && (val = XCAR (XCDR (plist)), CONSP (val)))
-	    XCAR (XCDR (plist)) = Fcons (XCAR (val), XCDR (val));
+	    XSETCAR (XCDR (plist), Fcons (XCAR (val), XCDR (val)));
 	  plist = XCDR (XCDR (plist));
 	}
     }