Mercurial > emacs
diff src/window.c @ 85330:0bc184c59770
* 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.
| author | Stefan Monnier <monnier@iro.umontreal.ca> |
|---|---|
| date | Tue, 16 Oct 2007 16:28:39 +0000 |
| parents | 96a92ff6e0de |
| children | 4fe615944676 1251cabc40b7 |
line wrap: on
line diff
--- a/src/window.c Tue Oct 16 15:49:43 2007 +0000 +++ b/src/window.c Tue Oct 16 16:28:39 2007 +0000 @@ -2670,12 +2670,12 @@ { 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 @@ /* 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 @@ 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 @@ /* 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. */
