Mercurial > emacs
diff src/xselect.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 | 6bf3530c700d |
children | e528f2adeed4 |
line wrap: on
line diff
--- a/src/xselect.c Mon Oct 15 20:52:59 2001 +0000 +++ b/src/xselect.c Tue Oct 16 09:09:51 2001 +0000 @@ -338,7 +338,7 @@ for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) if (EQ (prev_value, Fcar (XCDR (rest)))) { - XCDR (rest) = Fcdr (XCDR (rest)); + XSETCDR (rest, Fcdr (XCDR (rest))); break; } } @@ -905,7 +905,7 @@ for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) if (EQ (local_selection_data, Fcar (XCDR (rest)))) { - XCDR (rest) = Fcdr (XCDR (rest)); + XSETCDR (rest, Fcdr (XCDR (rest))); break; } } @@ -982,7 +982,7 @@ redisplay_preserve_echo_area (22); #endif } - XCDR (rest) = Fcdr (XCDR (rest)); + XSETCDR (rest, Fcdr (XCDR (rest))); break; } } @@ -1076,13 +1076,13 @@ Lisp_Object tem; tem = Fcons (Qnil, Qnil); - XSETFASTINT (XCAR (tem), (EMACS_UINT)location >> 16); - XSETFASTINT (XCDR (tem), (EMACS_UINT)location & 0xffff); + XSETCARFASTINT (tem, (EMACS_UINT)location >> 16); + XSETCDRFASTINT (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); - XCAR (property_change_reply) = Qnil; + XSETCAR (property_change_reply, Qnil); property_change_reply_object = location; /* If the event we are waiting for arrives beyond here, it will set @@ -1128,7 +1128,7 @@ /* If this is the one wait_for_property_change is waiting for, tell it to wake up. */ if (rest == property_change_reply_object) - XCAR (property_change_reply) = Qt; + XSETCAR (property_change_reply, Qt); if (prev) prev->next = rest->next; @@ -1239,7 +1239,7 @@ /* Prepare to block until the reply has been read. */ reading_selection_window = requestor_window; reading_which_selection = selection_atom; - XCAR (reading_selection_reply) = Qnil; + XSETCAR (reading_selection_reply, Qnil); frame = some_frame_on_display (dpyinfo); @@ -1942,8 +1942,8 @@ return; TRACE0 ("Received SelectionNotify"); - XCAR (reading_selection_reply) - = (event->property != 0 ? Qt : Qlambda); + XSETCAR (reading_selection_reply, + (event->property != 0 ? Qt : Qlambda)); }