Mercurial > emacs
diff src/w32fns.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 | 66e0816837a8 |
children | f6ecf530f0a3 |
line wrap: on
line diff
--- a/src/w32fns.c Mon Oct 15 20:52:59 2001 +0000 +++ b/src/w32fns.c Tue Oct 16 09:09:51 2001 +0000 @@ -3784,7 +3784,7 @@ thread-safe. The next line is okay because the cons cell is never made into garbage and is not relocated by GC. */ - XCAR ((Lisp_Object) msg.lParam) = Qnil; + XSETCAR ((Lisp_Object) msg.lParam, Qnil); if (!PostThreadMessage (dwMainThreadId, WM_EMACS_DONE, 0, 0)) abort (); break; @@ -6866,9 +6866,9 @@ /* Make a list of the fonts we got back. Store that in the font cache for the display. */ - XCDR (dpyinfo->name_list_element) - = Fcons (Fcons (tpat, list), - XCDR (dpyinfo->name_list_element)); + XSETCDR (dpyinfo->name_list_element, + Fcons (Fcons (tpat, list), + XCDR (dpyinfo->name_list_element))); label_cached: if (NILP (list)) continue; /* Try the remaining alternatives. */ @@ -6915,9 +6915,9 @@ hdc = GetDC (dpyinfo->root_window); oldobj = SelectObject (hdc, thisinfo.hfont); if (GetTextMetrics (hdc, &thisinfo.tm)) - XCDR (tem) = make_number (FONT_WIDTH (&thisinfo)); + XSETCDR (tem, make_number (FONT_WIDTH (&thisinfo))); else - XCDR (tem) = make_number (0); + XSETCDR (tem, make_number (0)); SelectObject (hdc, oldobj); ReleaseDC (dpyinfo->root_window, hdc); DeleteObject(thisinfo.hfont); @@ -13240,7 +13240,7 @@ if (NILP (item)) w32_grabbed_keys = Fcons (key, w32_grabbed_keys); else - XCAR (item) = key; + XSETCAR (item, key); /* Notify input thread about new hot-key definition, so that it takes effect without needing to switch focus. */