Commit 9beb8baa authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* xfns.c (Fx_create_frame, Fx_display_list):

* window.c (window_fixed_size_p, enlarge_window, shrink_window_lowest_first):
* macterm.c (init_font_name_table):
* macfns.c (Fx_create_frame, Fx_display_list):
* lread.c (close_load_descs):
* keyboard.c (read_char_x_menu_prompt):
* fns.c (Fmember, Fmemql, Fdelete, Fset_char_table_parent):
* coding.c (code_convert_region_unwind): Test the type of an object
rather than just !NILP before extracting data from it.
parent d3f41ff5
2007-10-16 Stefan Monnier <monnier@iro.umontreal.ca>
* xfns.c (Fx_create_frame, Fx_display_list):
* window.c (window_fixed_size_p, enlarge_window)
(shrink_window_lowest_first):
* macterm.c (init_font_name_table):
* macfns.c (Fx_create_frame, Fx_display_list):
* lread.c (close_load_descs):
* keyboard.c (read_char_x_menu_prompt):
* fns.c (Fmember, Fmemql, Fdelete, Fset_char_table_parent):
* coding.c (code_convert_region_unwind): Test the type of an object
rather than just !NILP before extracting data from it.
* alloc.c (Fpurecopy): Set the pvec tag on pseudo vectors.
* lisp.h (enum Lisp_Misc_Type): Del Lisp_Misc_Some_Buffer_Local_Value.
......
......@@ -5371,7 +5371,7 @@ code_convert_region_unwind (arg)
inhibit_pre_post_conversion = 0;
Vlast_coding_system_used = XCAR (arg);
for (arg = XCDR (arg); ! NILP (arg); arg = XCDR (arg))
for (arg = XCDR (arg); CONSP (arg); arg = XCDR (arg))
Fkill_buffer (XCAR (arg));
UNGCPRO;
......
......@@ -1451,7 +1451,7 @@ The value is actually the tail of LIST whose car is ELT. */)
Lisp_Object list;
{
register Lisp_Object tail;
for (tail = list; !NILP (tail); tail = XCDR (tail))
for (tail = list; CONSP (tail); tail = XCDR (tail))
{
register Lisp_Object tem;
CHECK_LIST_CONS (tail, list);
......@@ -1502,7 +1502,7 @@ The value is actually the tail of LIST whose car is ELT. */)
if (!FLOATP (elt))
return Fmemq (elt, list);
for (tail = list; !NILP (tail); tail = XCDR (tail))
for (tail = list; CONSP (tail); tail = XCDR (tail))
{
register Lisp_Object tem;
CHECK_LIST_CONS (tail, list);
......@@ -1806,7 +1806,7 @@ to be sure of changing the value of `foo'. */)
{
Lisp_Object tail, prev;
for (tail = seq, prev = Qnil; !NILP (tail); tail = XCDR (tail))
for (tail = seq, prev = Qnil; CONSP (tail); tail = XCDR (tail))
{
CHECK_LIST_CONS (tail, seq);
......@@ -2440,7 +2440,8 @@ Return PARENT. PARENT must be either nil or another char-table. */)
{
CHECK_CHAR_TABLE (parent);
for (temp = parent; !NILP (temp); temp = XCHAR_TABLE (temp)->parent)
for (temp = parent; CHAR_TABLE_P (temp);
temp = XCHAR_TABLE (temp)->parent)
if (EQ (temp, char_table))
error ("Attempt to make a chartable be its own parent");
}
......
......@@ -8538,7 +8538,7 @@ read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu)
to indicate that they came from a mouse menu,
so that when present in last_nonmenu_event
they won't confuse things. */
for (tem = XCDR (value); !NILP (tem); tem = XCDR (tem))
for (tem = XCDR (value); CONSP (tem); tem = XCDR (tem))
{
record_menu_key (XCAR (tem));
if (SYMBOLP (XCAR (tem))
......
......@@ -1100,7 +1100,7 @@ close_load_descs ()
{
#ifndef WINDOWSNT
Lisp_Object tail;
for (tail = load_descriptor_list; !NILP (tail); tail = XCDR (tail))
for (tail = load_descriptor_list; CONSP (tail); tail = XCDR (tail))
emacs_close (XFASTINT (XCAR (tail)));
#endif
}
......
......@@ -2826,7 +2826,7 @@ This function is an internal primitive--use `make-frame' instead. */)
/* All remaining specified parameters, which have not been "used"
by x_get_arg and friends, now go in the misc. alist of the frame. */
for (tem = parameters; !NILP (tem); tem = XCDR (tem))
for (tem = parameters; CONSP (tem); tem = XCDR (tem))
if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
f->param_alist = Fcons (XCAR (tem), f->param_alist);
......@@ -3402,7 +3402,7 @@ DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0,
Lisp_Object tail, result;
result = Qnil;
for (tail = x_display_name_list; ! NILP (tail); tail = XCDR (tail))
for (tail = x_display_name_list; CONSP (tail); tail = XCDR (tail))
result = Fcons (XCAR (XCAR (tail)), result);
return result;
......
......@@ -8281,7 +8281,7 @@ init_font_name_table ()
Lisp_Object rest = XCDR (XCDR (text_encoding_info));
if (size > 0 || style == normal)
for (; !NILP (rest); rest = XCDR (rest))
for (; CONSP (rest); rest = XCDR (rest))
add_mac_font_name (name, size, style, SDATA (XCAR (rest)));
}
}
......@@ -8356,7 +8356,7 @@ init_font_name_table ()
{
Lisp_Object rest = XCDR (XCDR (text_encoding_info));
for (; !NILP (rest); rest = XCDR (rest))
for (; CONSP (rest); rest = XCDR (rest))
add_mac_font_name (name, assc_entry->fontSize,
assc_entry->fontStyle,
SDATA (XCAR (rest)));
......
......@@ -2670,12 +2670,12 @@ window_fixed_size_p (w, width_p, check_siblings_p)
{
Lisp_Object child;
for (child = w->prev; !NILP (child); child = XWINDOW (child)->prev)
for (child = w->prev; WINDOWP (child); child = XWINDOW (child)->prev)
if (!window_fixed_size_p (XWINDOW (child), width_p, 0))
break;
if (NILP (child))
for (child = w->next; !NILP (child); child = XWINDOW (child)->next)
for (child = w->next; WINDOWP (child); child = XWINDOW (child)->next)
if (!window_fixed_size_p (XWINDOW (child), width_p, 0))
break;
......@@ -4291,10 +4291,10 @@ enlarge_window (window, delta, horiz_flag)
/* Find the total we can get from other siblings without deleting them. */
maximum = 0;
for (next = p->next; ! NILP (next); next = XWINDOW (next)->next)
for (next = p->next; WINDOWP (next); next = XWINDOW (next)->next)
maximum += (*sizefun) (next) - window_min_size (XWINDOW (next),
horiz_flag, 0, 0);
for (prev = p->prev; ! NILP (prev); prev = XWINDOW (prev)->prev)
for (prev = p->prev; WINDOWP (prev); prev = XWINDOW (prev)->prev)
maximum += (*sizefun) (prev) - window_min_size (XWINDOW (prev),
horiz_flag, 0, 0);
......@@ -4442,10 +4442,10 @@ enlarge_window (window, delta, horiz_flag)
Lisp_Object s;
int n = 1;
for (s = w->next; !NILP (s); s = XWINDOW (s)->next)
for (s = w->next; WINDOWP (s); s = XWINDOW (s)->next)
if (!window_fixed_size_p (XWINDOW (s), horiz_flag, 0))
++n;
for (s = w->prev; !NILP (s); s = XWINDOW (s)->prev)
for (s = w->prev; WINDOWP (s); s = XWINDOW (s)->prev)
if (!window_fixed_size_p (XWINDOW (s), horiz_flag, 0))
++n;
......@@ -4701,7 +4701,7 @@ shrink_window_lowest_first (w, height)
/* Find the last child. We are taking space from lowest windows
first, so we iterate over children from the last child
backwards. */
for (child = w->vchild; !NILP (child); child = XWINDOW (child)->next)
for (child = w->vchild; WINDOWP (child); child = XWINDOW (child)->next)
last_child = child;
/* Assign new heights. We leave only MIN_SAFE_WINDOW_HEIGHT. */
......
......@@ -3468,7 +3468,7 @@ This function is an internal primitive--use `make-frame' instead. */)
/* All remaining specified parameters, which have not been "used"
by x_get_arg and friends, now go in the misc. alist of the frame. */
for (tem = parms; !NILP (tem); tem = XCDR (tem))
for (tem = parms; CONSP (tem); tem = XCDR (tem))
if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
f->param_alist = Fcons (XCAR (tem), f->param_alist);
......@@ -4156,7 +4156,7 @@ DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0,
Lisp_Object tail, result;
result = Qnil;
for (tail = x_display_name_list; ! NILP (tail); tail = XCDR (tail))
for (tail = x_display_name_list; CONSP (tail); tail = XCDR (tail))
result = Fcons (XCAR (XCAR (tail)), result);
return result;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment