# HG changeset patch # User Jim Blandy # Date 720509989 0 # Node ID f79a22ad87d09ee0d51b0ab6c7380341216c18c0 # Parent 91454bf159441f324ccb7c96e5149ef576629dc6 * window.c (Fwindow_width, Fset_window_hscroll): Use accessors on w->width, w->left, w->hscroll, and arguments. (replace_window): Use EQ, not ==. (Fdelete_window): p->top and p->left are not C integers. (Fnext_window, Fprevious_window): Use EQ, not ==. diff -r 91454bf15944 -r f79a22ad87d0 src/window.c --- a/src/window.c Sat Oct 31 05:39:17 1992 +0000 +++ b/src/window.c Sat Oct 31 05:39:49 1992 +0000 @@ -267,13 +267,13 @@ Lisp_Object window; { register struct window *w = decode_window (window); - register int width = w->width; + register int width = XFASTINT (w->width); /* If this window does not end at the right margin, must deduct one column for the border */ - if ((width + w->left) == FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) - return width; - return width - 1; + if ((width + XFASTINT (w->left)) == FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) + return make_number (width); + return make_number (width - 1); } DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, @@ -297,7 +297,7 @@ if (XFASTINT (ncol) >= (1 << (SHORTBITS - 1))) args_out_of_range (ncol, Qnil); w = decode_window (window); - if (w->hscroll != ncol) + if (XINT (w->hscroll) != XINT (ncol)) clip_changed = 1; /* Prevent redisplay shortcuts */ w->hscroll = ncol; return ncol; @@ -649,7 +649,7 @@ /* If OLD is its frame's root_window, then replacement is the new root_window for that frame. */ - if (old == FRAME_ROOT_WINDOW (XFRAME (o->frame))) + if (EQ (old, FRAME_ROOT_WINDOW (XFRAME (o->frame)))) FRAME_ROOT_WINDOW (XFRAME (o->frame)) = replacement; p->left = o->left; @@ -762,8 +762,8 @@ set_window_{height,width} will re-position the sibling's children. */ sib = p->next; - XFASTINT (XWINDOW (sib)->top) = p->top; - XFASTINT (XWINDOW (sib)->left) = p->left; + XWINDOW (sib)->top = p->top; + XWINDOW (sib)->left = p->left; } /* Stretch that sibling. */ @@ -891,7 +891,7 @@ we've come all the way around and we're back at the original window. */ while (MINI_WINDOW_P (XWINDOW (window)) && ! EQ (minibuf, Qt) - && window != start_window); + && ! EQ (window, start_window)); return window; } @@ -989,7 +989,7 @@ we've come all the way around and we're back at the original window. */ while (MINI_WINDOW_P (XWINDOW (window)) && !EQ (minibuf, Qt) - && window != start_window); + && !EQ (window, start_window)); return window; }