aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2007-10-17 23:43:52 +0000
committerStefan Monnier2007-10-17 23:43:52 +0000
commit99784d6399c1f49ca5d98a3156a7c3262b5e7ee9 (patch)
treec7439e93bed59b50df298601b04e55ac90d68892 /src
parentb5307e9c2bd6222f9af6a6792ae69f3bb45fdf45 (diff)
downloademacs-99784d6399c1f49ca5d98a3156a7c3262b5e7ee9.tar.gz
emacs-99784d6399c1f49ca5d98a3156a7c3262b5e7ee9.zip
* xselect.c (x_own_selection, x_handle_selection_clear)
(x_clear_frame_selections): * w32menu.c (list_of_panes, list_of_items): * w32fns.c (w32_color_map_lookup, Fx_create_frame, Fx_display_list): * textprop.c (validate_plist, interval_has_all_properties) (interval_has_some_properties, interval_has_some_properties_list) (add_properties, text_property_list): * process.c (Fget_buffer_process, list_processes_1, status_notify): * minibuf.c (Fassoc_string): * macselect.c (x_own_selection, x_clear_frame_selections) (Fx_disown_selection_internal): * keymap.c (Fcommand_remapping, where_is_internal, describe_map_tree): Use CONSP rather than !NILP and XC[AD]R rather than Fc[ad]r.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog16
-rw-r--r--src/keymap.c18
-rw-r--r--src/macselect.c6
-rw-r--r--src/minibuf.c4
-rw-r--r--src/process.c16
-rw-r--r--src/textprop.c44
-rw-r--r--src/w32fns.c8
-rw-r--r--src/w32menu.c8
-rw-r--r--src/xselect.c6
9 files changed, 71 insertions, 55 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 98bf9978907..dcd9f0955dd 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,19 @@
12007-10-17 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * xselect.c (x_own_selection, x_handle_selection_clear)
4 (x_clear_frame_selections):
5 * w32menu.c (list_of_panes, list_of_items):
6 * w32fns.c (w32_color_map_lookup, Fx_create_frame, Fx_display_list):
7 * textprop.c (validate_plist, interval_has_all_properties)
8 (interval_has_some_properties, interval_has_some_properties_list)
9 (add_properties, text_property_list):
10 * process.c (Fget_buffer_process, list_processes_1, status_notify):
11 * minibuf.c (Fassoc_string):
12 * macselect.c (x_own_selection, x_clear_frame_selections)
13 (Fx_disown_selection_internal):
14 * keymap.c (Fcommand_remapping, where_is_internal, describe_map_tree):
15 Use CONSP rather than !NILP and XC[AD]R rather than Fc[ad]r.
16
12007-10-17 Chong Yidong <cyd@stupidchicken.com> 172007-10-17 Chong Yidong <cyd@stupidchicken.com>
2 18
3 * process.c: Link to libs for calling res_init() if available. 19 * process.c: Link to libs for calling res_init() if available.
diff --git a/src/keymap.c b/src/keymap.c
index be23c20a3aa..2edad90b732 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1247,9 +1247,9 @@ remapping in all currently active keymaps. */)
1247 { 1247 {
1248 Lisp_Object maps, binding; 1248 Lisp_Object maps, binding;
1249 1249
1250 for (maps = keymaps; !NILP (maps); maps = Fcdr (maps)) 1250 for (maps = keymaps; CONSP (maps); maps = XCDR (maps))
1251 { 1251 {
1252 binding = Flookup_key (Fcar (maps), command_remapping_vector, Qnil); 1252 binding = Flookup_key (XCAR (maps), command_remapping_vector, Qnil);
1253 if (!NILP (binding) && !INTEGERP (binding)) 1253 if (!NILP (binding) && !INTEGERP (binding))
1254 return binding; 1254 return binding;
1255 } 1255 }
@@ -2681,7 +2681,7 @@ where_is_internal (definition, keymaps, firstonly, noindirect, no_remap)
2681 && !NILP (Fcommand_remapping (definition, Qnil, keymaps))) 2681 && !NILP (Fcommand_remapping (definition, Qnil, keymaps)))
2682 RETURN_UNGCPRO (Qnil); 2682 RETURN_UNGCPRO (Qnil);
2683 2683
2684 for (; !NILP (maps); maps = Fcdr (maps)) 2684 for (; CONSP (maps); maps = XCDR (maps))
2685 { 2685 {
2686 /* Key sequence to reach map, and the map that it reaches */ 2686 /* Key sequence to reach map, and the map that it reaches */
2687 register Lisp_Object this, map, tem; 2687 register Lisp_Object this, map, tem;
@@ -2693,8 +2693,8 @@ where_is_internal (definition, keymaps, firstonly, noindirect, no_remap)
2693 Lisp_Object last; 2693 Lisp_Object last;
2694 int last_is_meta; 2694 int last_is_meta;
2695 2695
2696 this = Fcar (Fcar (maps)); 2696 this = Fcar (XCAR (maps));
2697 map = Fcdr (Fcar (maps)); 2697 map = Fcdr (XCAR (maps));
2698 last = make_number (XINT (Flength (this)) - 1); 2698 last = make_number (XINT (Flength (this)) - 1);
2699 last_is_meta = (XINT (last) >= 0 2699 last_is_meta = (XINT (last) >= 0
2700 && EQ (Faref (this, last), meta_prefix_char)); 2700 && EQ (Faref (this, last), meta_prefix_char));
@@ -3179,11 +3179,11 @@ key binding\n\
3179 Lisp_Object list; 3179 Lisp_Object list;
3180 3180
3181 /* Delete from MAPS each element that is for the menu bar. */ 3181 /* Delete from MAPS each element that is for the menu bar. */
3182 for (list = maps; !NILP (list); list = XCDR (list)) 3182 for (list = maps; CONSP (list); list = XCDR (list))
3183 { 3183 {
3184 Lisp_Object elt, prefix, tem; 3184 Lisp_Object elt, prefix, tem;
3185 3185
3186 elt = Fcar (list); 3186 elt = XCAR (list);
3187 prefix = Fcar (elt); 3187 prefix = Fcar (elt);
3188 if (XVECTOR (prefix)->size >= 1) 3188 if (XVECTOR (prefix)->size >= 1)
3189 { 3189 {
@@ -3210,11 +3210,11 @@ key binding\n\
3210 something = 1; 3210 something = 1;
3211 } 3211 }
3212 3212
3213 for (; !NILP (maps); maps = Fcdr (maps)) 3213 for (; CONSP (maps); maps = XCDR (maps))
3214 { 3214 {
3215 register Lisp_Object elt, prefix, tail; 3215 register Lisp_Object elt, prefix, tail;
3216 3216
3217 elt = Fcar (maps); 3217 elt = XCAR (maps);
3218 prefix = Fcar (elt); 3218 prefix = Fcar (elt);
3219 3219
3220 sub_shadows = Qnil; 3220 sub_shadows = Qnil;
diff --git a/src/macselect.c b/src/macselect.c
index 9515a5774ec..f8038effd8b 100644
--- a/src/macselect.c
+++ b/src/macselect.c
@@ -487,7 +487,7 @@ x_own_selection (selection_name, selection_value)
487 if (!NILP (prev_value)) 487 if (!NILP (prev_value))
488 { 488 {
489 Lisp_Object rest; /* we know it's not the CAR, so it's easy. */ 489 Lisp_Object rest; /* we know it's not the CAR, so it's easy. */
490 for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) 490 for (rest = Vselection_alist; CONSP (rest); rest = XCDR (rest))
491 if (EQ (prev_value, Fcar (XCDR (rest)))) 491 if (EQ (prev_value, Fcar (XCDR (rest))))
492 { 492 {
493 XSETCDR (rest, Fcdr (XCDR (rest))); 493 XSETCDR (rest, Fcdr (XCDR (rest)));
@@ -619,7 +619,7 @@ x_clear_frame_selections (f)
619 } 619 }
620 620
621 /* Delete elements after the beginning of Vselection_alist. */ 621 /* Delete elements after the beginning of Vselection_alist. */
622 for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) 622 for (rest = Vselection_alist; CONSP (rest); rest = XCDR (rest))
623 if (EQ (frame, Fcar (Fcdr (Fcdr (Fcdr (Fcar (XCDR (rest)))))))) 623 if (EQ (frame, Fcar (Fcdr (Fcdr (Fcdr (Fcar (XCDR (rest))))))))
624 { 624 {
625 /* Let random Lisp code notice that the selection has been stolen. */ 625 /* Let random Lisp code notice that the selection has been stolen. */
@@ -762,7 +762,7 @@ Disowning it means there is no such selection. */)
762 else 762 else
763 { 763 {
764 Lisp_Object rest; 764 Lisp_Object rest;
765 for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) 765 for (rest = Vselection_alist; CONSP (rest); rest = XCDR (rest))
766 if (EQ (local_selection_data, Fcar (XCDR (rest)))) 766 if (EQ (local_selection_data, Fcar (XCDR (rest))))
767 { 767 {
768 XSETCDR (rest, Fcdr (XCDR (rest))); 768 XSETCDR (rest, Fcdr (XCDR (rest)));
diff --git a/src/minibuf.c b/src/minibuf.c
index e7c2aec7b3f..d3c9eb505b6 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -2110,10 +2110,10 @@ string rather than a cons cell whose car is a string. */)
2110 if (SYMBOLP (key)) 2110 if (SYMBOLP (key))
2111 key = Fsymbol_name (key); 2111 key = Fsymbol_name (key);
2112 2112
2113 for (tail = list; !NILP (tail); tail = Fcdr (tail)) 2113 for (tail = list; CONSP (tail); tail = XCDR (tail))
2114 { 2114 {
2115 register Lisp_Object elt, tem, thiscar; 2115 register Lisp_Object elt, tem, thiscar;
2116 elt = Fcar (tail); 2116 elt = XCAR (tail);
2117 thiscar = CONSP (elt) ? XCAR (elt) : elt; 2117 thiscar = CONSP (elt) ? XCAR (elt) : elt;
2118 if (SYMBOLP (thiscar)) 2118 if (SYMBOLP (thiscar))
2119 thiscar = Fsymbol_name (thiscar); 2119 thiscar = Fsymbol_name (thiscar);
diff --git a/src/process.c b/src/process.c
index 6749ebda117..37181158a19 100644
--- a/src/process.c
+++ b/src/process.c
@@ -739,9 +739,9 @@ BUFFER may be a buffer or the name of one. */)
739 buf = Fget_buffer (buffer); 739 buf = Fget_buffer (buffer);
740 if (NILP (buf)) return Qnil; 740 if (NILP (buf)) return Qnil;
741 741
742 for (tail = Vprocess_alist; !NILP (tail); tail = Fcdr (tail)) 742 for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail))
743 { 743 {
744 proc = Fcdr (Fcar (tail)); 744 proc = Fcdr (XCAR (tail));
745 if (PROCESSP (proc) && EQ (XPROCESS (proc)->buffer, buf)) 745 if (PROCESSP (proc) && EQ (XPROCESS (proc)->buffer, buf))
746 return proc; 746 return proc;
747 } 747 }
@@ -1345,11 +1345,11 @@ list_processes_1 (query_only)
1345 w_buffer = 6; /* Buffer */ 1345 w_buffer = 6; /* Buffer */
1346 w_tty = 0; /* Omit if no ttys */ 1346 w_tty = 0; /* Omit if no ttys */
1347 1347
1348 for (tail = Vprocess_alist; !NILP (tail); tail = Fcdr (tail)) 1348 for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail))
1349 { 1349 {
1350 int i; 1350 int i;
1351 1351
1352 proc = Fcdr (Fcar (tail)); 1352 proc = Fcdr (XCAR (tail));
1353 p = XPROCESS (proc); 1353 p = XPROCESS (proc);
1354 if (NILP (p->childp)) 1354 if (NILP (p->childp))
1355 continue; 1355 continue;
@@ -1408,11 +1408,11 @@ list_processes_1 (query_only)
1408 Findent_to (i_command, minspace); write_string ("-------", -1); 1408 Findent_to (i_command, minspace); write_string ("-------", -1);
1409 write_string ("\n", -1); 1409 write_string ("\n", -1);
1410 1410
1411 for (tail = Vprocess_alist; !NILP (tail); tail = Fcdr (tail)) 1411 for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail))
1412 { 1412 {
1413 Lisp_Object symbol; 1413 Lisp_Object symbol;
1414 1414
1415 proc = Fcdr (Fcar (tail)); 1415 proc = Fcdr (XCAR (tail));
1416 p = XPROCESS (proc); 1416 p = XPROCESS (proc);
1417 if (NILP (p->childp)) 1417 if (NILP (p->childp))
1418 continue; 1418 continue;
@@ -6799,12 +6799,12 @@ status_notify (deleting_process)
6799 that we run, we get called again to handle their status changes. */ 6799 that we run, we get called again to handle their status changes. */
6800 update_tick = process_tick; 6800 update_tick = process_tick;
6801 6801
6802 for (tail = Vprocess_alist; !NILP (tail); tail = Fcdr (tail)) 6802 for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail))
6803 { 6803 {
6804 Lisp_Object symbol; 6804 Lisp_Object symbol;
6805 register struct Lisp_Process *p; 6805 register struct Lisp_Process *p;
6806 6806
6807 proc = Fcdr (Fcar (tail)); 6807 proc = Fcdr (XCAR (tail));
6808 p = XPROCESS (proc); 6808 p = XPROCESS (proc);
6809 6809
6810 if (p->tick != p->update_tick) 6810 if (p->tick != p->update_tick)
diff --git a/src/textprop.c b/src/textprop.c
index 8ce5656e5a2..e8ba1d87afc 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -201,9 +201,9 @@ validate_plist (list)
201 { 201 {
202 register int i; 202 register int i;
203 register Lisp_Object tail; 203 register Lisp_Object tail;
204 for (i = 0, tail = list; !NILP (tail); i++) 204 for (i = 0, tail = list; CONSP (tail); i++)
205 { 205 {
206 tail = Fcdr (tail); 206 tail = XCDR (tail);
207 QUIT; 207 QUIT;
208 } 208 }
209 if (i & 1) 209 if (i & 1)
@@ -226,18 +226,18 @@ interval_has_all_properties (plist, i)
226 register int found; 226 register int found;
227 227
228 /* Go through each element of PLIST. */ 228 /* Go through each element of PLIST. */
229 for (tail1 = plist; ! NILP (tail1); tail1 = Fcdr (Fcdr (tail1))) 229 for (tail1 = plist; CONSP (tail1); tail1 = Fcdr (XCDR (tail1)))
230 { 230 {
231 sym1 = Fcar (tail1); 231 sym1 = XCAR (tail1);
232 found = 0; 232 found = 0;
233 233
234 /* Go through I's plist, looking for sym1 */ 234 /* Go through I's plist, looking for sym1 */
235 for (tail2 = i->plist; ! NILP (tail2); tail2 = Fcdr (Fcdr (tail2))) 235 for (tail2 = i->plist; CONSP (tail2); tail2 = Fcdr (XCDR (tail2)))
236 if (EQ (sym1, Fcar (tail2))) 236 if (EQ (sym1, XCAR (tail2)))
237 { 237 {
238 /* Found the same property on both lists. If the 238 /* Found the same property on both lists. If the
239 values are unequal, return zero. */ 239 values are unequal, return zero. */
240 if (! EQ (Fcar (Fcdr (tail1)), Fcar (Fcdr (tail2)))) 240 if (! EQ (Fcar (XCDR (tail1)), Fcar (XCDR (tail2))))
241 return 0; 241 return 0;
242 242
243 /* Property has same value on both lists; go to next one. */ 243 /* Property has same value on both lists; go to next one. */
@@ -263,13 +263,13 @@ interval_has_some_properties (plist, i)
263 register Lisp_Object tail1, tail2, sym; 263 register Lisp_Object tail1, tail2, sym;
264 264
265 /* Go through each element of PLIST. */ 265 /* Go through each element of PLIST. */
266 for (tail1 = plist; ! NILP (tail1); tail1 = Fcdr (Fcdr (tail1))) 266 for (tail1 = plist; CONSP (tail1); tail1 = Fcdr (XCDR (tail1)))
267 { 267 {
268 sym = Fcar (tail1); 268 sym = XCAR (tail1);
269 269
270 /* Go through i's plist, looking for tail1 */ 270 /* Go through i's plist, looking for tail1 */
271 for (tail2 = i->plist; ! NILP (tail2); tail2 = Fcdr (Fcdr (tail2))) 271 for (tail2 = i->plist; CONSP (tail2); tail2 = Fcdr (XCDR (tail2)))
272 if (EQ (sym, Fcar (tail2))) 272 if (EQ (sym, XCAR (tail2)))
273 return 1; 273 return 1;
274 } 274 }
275 275
@@ -287,12 +287,12 @@ interval_has_some_properties_list (list, i)
287 register Lisp_Object tail1, tail2, sym; 287 register Lisp_Object tail1, tail2, sym;
288 288
289 /* Go through each element of LIST. */ 289 /* Go through each element of LIST. */
290 for (tail1 = list; ! NILP (tail1); tail1 = XCDR (tail1)) 290 for (tail1 = list; CONSP (tail1); tail1 = XCDR (tail1))
291 { 291 {
292 sym = Fcar (tail1); 292 sym = Fcar (tail1);
293 293
294 /* Go through i's plist, looking for tail1 */ 294 /* Go through i's plist, looking for tail1 */
295 for (tail2 = i->plist; ! NILP (tail2); tail2 = XCDR (XCDR (tail2))) 295 for (tail2 = i->plist; CONSP (tail2); tail2 = XCDR (XCDR (tail2)))
296 if (EQ (sym, XCAR (tail2))) 296 if (EQ (sym, XCAR (tail2)))
297 return 1; 297 return 1;
298 } 298 }
@@ -391,21 +391,21 @@ add_properties (plist, i, object)
391 GCPRO3 (tail1, sym1, val1); 391 GCPRO3 (tail1, sym1, val1);
392 392
393 /* Go through each element of PLIST. */ 393 /* Go through each element of PLIST. */
394 for (tail1 = plist; ! NILP (tail1); tail1 = Fcdr (Fcdr (tail1))) 394 for (tail1 = plist; CONSP (tail1); tail1 = Fcdr (XCDR (tail1)))
395 { 395 {
396 sym1 = Fcar (tail1); 396 sym1 = XCAR (tail1);
397 val1 = Fcar (Fcdr (tail1)); 397 val1 = Fcar (XCDR (tail1));
398 found = 0; 398 found = 0;
399 399
400 /* Go through I's plist, looking for sym1 */ 400 /* Go through I's plist, looking for sym1 */
401 for (tail2 = i->plist; ! NILP (tail2); tail2 = Fcdr (Fcdr (tail2))) 401 for (tail2 = i->plist; CONSP (tail2); tail2 = Fcdr (XCDR (tail2)))
402 if (EQ (sym1, Fcar (tail2))) 402 if (EQ (sym1, XCAR (tail2)))
403 { 403 {
404 /* No need to gcpro, because tail2 protects this 404 /* No need to gcpro, because tail2 protects this
405 and it must be a cons cell (we get an error otherwise). */ 405 and it must be a cons cell (we get an error otherwise). */
406 register Lisp_Object this_cdr; 406 register Lisp_Object this_cdr;
407 407
408 this_cdr = Fcdr (tail2); 408 this_cdr = XCDR (tail2);
409 /* Found the property. Now check its value. */ 409 /* Found the property. Now check its value. */
410 found = 1; 410 found = 1;
411 411
@@ -1965,10 +1965,10 @@ text_property_list (object, start, end, prop)
1965 plist = i->plist; 1965 plist = i->plist;
1966 1966
1967 if (!NILP (prop)) 1967 if (!NILP (prop))
1968 for (; !NILP (plist); plist = Fcdr (Fcdr (plist))) 1968 for (; CONSP (plist); plist = Fcdr (XCDR (plist)))
1969 if (EQ (Fcar (plist), prop)) 1969 if (EQ (XCAR (plist), prop))
1970 { 1970 {
1971 plist = Fcons (prop, Fcons (Fcar (Fcdr (plist)), Qnil)); 1971 plist = Fcons (prop, Fcons (Fcar (XCDR (plist)), Qnil));
1972 break; 1972 break;
1973 } 1973 }
1974 1974
diff --git a/src/w32fns.c b/src/w32fns.c
index 8af99a2d0b9..41a1994f3fe 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -845,11 +845,11 @@ w32_color_map_lookup (colorname)
845 845
846 BLOCK_INPUT; 846 BLOCK_INPUT;
847 847
848 for (tail = Vw32_color_map; !NILP (tail); tail = Fcdr (tail)) 848 for (tail = Vw32_color_map; CONSP (tail); tail = XCDR (tail))
849 { 849 {
850 register Lisp_Object elt, tem; 850 register Lisp_Object elt, tem;
851 851
852 elt = Fcar (tail); 852 elt = XCAR (tail);
853 if (!CONSP (elt)) continue; 853 if (!CONSP (elt)) continue;
854 854
855 tem = Fcar (elt); 855 tem = Fcar (elt);
@@ -4450,7 +4450,7 @@ This function is an internal primitive--use `make-frame' instead. */)
4450 4450
4451 /* All remaining specified parameters, which have not been "used" 4451 /* All remaining specified parameters, which have not been "used"
4452 by x_get_arg and friends, now go in the misc. alist of the frame. */ 4452 by x_get_arg and friends, now go in the misc. alist of the frame. */
4453 for (tem = parameters; !NILP (tem); tem = XCDR (tem)) 4453 for (tem = parameters; CONSP (tem); tem = XCDR (tem))
4454 if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem)))) 4454 if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
4455 f->param_alist = Fcons (XCAR (tem), f->param_alist); 4455 f->param_alist = Fcons (XCAR (tem), f->param_alist);
4456 4456
@@ -6838,7 +6838,7 @@ DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0,
6838 Lisp_Object tail, result; 6838 Lisp_Object tail, result;
6839 6839
6840 result = Qnil; 6840 result = Qnil;
6841 for (tail = w32_display_name_list; ! NILP (tail); tail = XCDR (tail)) 6841 for (tail = w32_display_name_list; CONSP (tail); tail = XCDR (tail))
6842 result = Fcons (XCAR (XCAR (tail)), result); 6842 result = Fcons (XCAR (XCAR (tail)), result);
6843 6843
6844 return result; 6844 return result;
diff --git a/src/w32menu.c b/src/w32menu.c
index a94be08902d..a0ce8c655cb 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -567,10 +567,10 @@ list_of_panes (menu)
567 567
568 init_menu_items (); 568 init_menu_items ();
569 569
570 for (tail = menu; !NILP (tail); tail = Fcdr (tail)) 570 for (tail = menu; CONSP (tail); tail = XCDR (tail))
571 { 571 {
572 Lisp_Object elt, pane_name, pane_data; 572 Lisp_Object elt, pane_name, pane_data;
573 elt = Fcar (tail); 573 elt = XCAR (tail);
574 pane_name = Fcar (elt); 574 pane_name = Fcar (elt);
575 CHECK_STRING (pane_name); 575 CHECK_STRING (pane_name);
576 push_menu_pane (pane_name, Qnil); 576 push_menu_pane (pane_name, Qnil);
@@ -590,9 +590,9 @@ list_of_items (pane)
590{ 590{
591 Lisp_Object tail, item, item1; 591 Lisp_Object tail, item, item1;
592 592
593 for (tail = pane; !NILP (tail); tail = Fcdr (tail)) 593 for (tail = pane; CONSP (tail); tail = XCDR (tail))
594 { 594 {
595 item = Fcar (tail); 595 item = XCAR (tail);
596 if (STRINGP (item)) 596 if (STRINGP (item))
597 push_menu_item (item, Qnil, Qnil, Qt, Qnil, Qnil, Qnil, Qnil); 597 push_menu_item (item, Qnil, Qnil, Qt, Qnil, Qnil, Qnil, Qnil);
598 else if (NILP (item)) 598 else if (NILP (item))
diff --git a/src/xselect.c b/src/xselect.c
index d71ac42aa7c..0db5ef57767 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -442,7 +442,7 @@ x_own_selection (selection_name, selection_value)
442 if (!NILP (prev_value)) 442 if (!NILP (prev_value))
443 { 443 {
444 Lisp_Object rest; /* we know it's not the CAR, so it's easy. */ 444 Lisp_Object rest; /* we know it's not the CAR, so it's easy. */
445 for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) 445 for (rest = Vselection_alist; CONSP (rest); rest = XCDR (rest))
446 if (EQ (prev_value, Fcar (XCDR (rest)))) 446 if (EQ (prev_value, Fcar (XCDR (rest))))
447 { 447 {
448 XSETCDR (rest, Fcdr (XCDR (rest))); 448 XSETCDR (rest, Fcdr (XCDR (rest)));
@@ -1072,7 +1072,7 @@ x_handle_selection_clear (event)
1072 else 1072 else
1073 { 1073 {
1074 Lisp_Object rest; 1074 Lisp_Object rest;
1075 for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) 1075 for (rest = Vselection_alist; CONSP (rest); rest = XCDR (rest))
1076 if (EQ (local_selection_data, Fcar (XCDR (rest)))) 1076 if (EQ (local_selection_data, Fcar (XCDR (rest))))
1077 { 1077 {
1078 XSETCDR (rest, Fcdr (XCDR (rest))); 1078 XSETCDR (rest, Fcdr (XCDR (rest)));
@@ -1153,7 +1153,7 @@ x_clear_frame_selections (f)
1153 } 1153 }
1154 1154
1155 /* Delete elements after the beginning of Vselection_alist. */ 1155 /* Delete elements after the beginning of Vselection_alist. */
1156 for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) 1156 for (rest = Vselection_alist; CONSP (rest); rest = XCDR (rest))
1157 if (EQ (frame, Fcar (Fcdr (Fcdr (Fcdr (Fcar (XCDR (rest)))))))) 1157 if (EQ (frame, Fcar (Fcdr (Fcdr (Fcdr (Fcar (XCDR (rest))))))))
1158 { 1158 {
1159 /* Let random Lisp code notice that the selection has been stolen. */ 1159 /* Let random Lisp code notice that the selection has been stolen. */