Mercurial > emacs
changeset 1525:f79a22ad87d0
* 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 ==.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sat, 31 Oct 1992 05:39:49 +0000 |
parents | 91454bf15944 |
children | a45910fb5bbc |
files | src/window.c |
diffstat | 1 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- 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; }