Mercurial > emacs
diff src/data.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 | 280975f8c65e |
| children | 528dd5f565ba |
line wrap: on
line diff
--- a/src/data.c Mon Oct 15 20:52:59 2001 +0000 +++ b/src/data.c Tue Oct 16 09:09:51 2001 +0000 @@ -582,7 +582,7 @@ cell = wrong_type_argument (Qconsp, cell); CHECK_IMPURE (cell); - XCAR (cell) = newcar; + XSETCAR (cell, newcar); return newcar; } @@ -595,7 +595,7 @@ cell = wrong_type_argument (Qconsp, cell); CHECK_IMPURE (cell); - XCDR (cell) = newcdr; + XSETCDR (cell, newcdr); return newcdr; } @@ -937,7 +937,7 @@ do_symval_forwarding (XBUFFER_LOCAL_VALUE (valcontents)->realvalue)); /* Select the global binding in the symbol. */ - XCAR (cdr) = cdr; + XSETCAR (cdr, cdr); store_symval_forwarding (symbol, valcontents, XCDR (cdr), NULL); /* Indicate that the global binding is set up now. */ @@ -991,7 +991,7 @@ XBUFFER_LOCAL_VALUE (valcontents)->found_for_buffer = 1; /* Load the new binding. */ - XCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr) = tem1; + XSETCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr, tem1); XSETBUFFER (XBUFFER_LOCAL_VALUE (valcontents)->buffer, current_buffer); XBUFFER_LOCAL_VALUE (valcontents)->frame = selected_frame; store_symval_forwarding (symbol, @@ -1210,8 +1210,8 @@ } /* Record which binding is now loaded. */ - XCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr) - = tem1; + XSETCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr, + tem1); /* Set `buffer' and `frame' slots for thebinding now loaded. */ XSETBUFFER (XBUFFER_LOCAL_VALUE (valcontents)->buffer, buf); @@ -1243,7 +1243,7 @@ the default binding is loaded, the loaded binding may be the wrong one. */ if (XBUFFER_LOCAL_VALUE (valcontents)->found_for_frame) - XCDR (current_alist_element) = newval; + XSETCDR (current_alist_element, newval); } return newval; @@ -1362,7 +1362,7 @@ return Fset (symbol, value); /* Store new value into the DEFAULT-VALUE slot. */ - XCDR (XBUFFER_LOCAL_VALUE (valcontents)->cdr) = value; + XSETCDR (XBUFFER_LOCAL_VALUE (valcontents)->cdr, value); /* If the default binding is now loaded, set the REALVALUE slot too. */ current_alist_element @@ -1448,7 +1448,7 @@ if (EQ (valcontents, Qunbound)) SET_SYMBOL_VALUE (variable, Qnil); tem = Fcons (Qnil, Fsymbol_value (variable)); - XCAR (tem) = tem; + XSETCAR (tem, tem); newval = allocate_misc (); XMISCTYPE (newval) = Lisp_Misc_Buffer_Local_Value; XBUFFER_LOCAL_VALUE (newval)->realvalue = SYMBOL_VALUE (variable); @@ -1505,7 +1505,7 @@ { Lisp_Object newval; tem = Fcons (Qnil, do_symval_forwarding (valcontents)); - XCAR (tem) = tem; + XSETCAR (tem, tem); newval = allocate_misc (); XMISCTYPE (newval) = Lisp_Misc_Some_Buffer_Local_Value; XBUFFER_LOCAL_VALUE (newval)->realvalue = SYMBOL_VALUE (variable); @@ -1644,7 +1644,7 @@ if (EQ (valcontents, Qunbound)) SET_SYMBOL_VALUE (variable, Qnil); tem = Fcons (Qnil, Fsymbol_value (variable)); - XCAR (tem) = tem; + XSETCAR (tem, tem); newval = allocate_misc (); XMISCTYPE (newval) = Lisp_Misc_Some_Buffer_Local_Value; XBUFFER_LOCAL_VALUE (newval)->realvalue = SYMBOL_VALUE (variable);
