diff options
| author | Jim Blandy | 1992-10-31 05:39:49 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-10-31 05:39:49 +0000 |
| commit | 7f4161e01138c77302c08292f7667e38fb43775c (patch) | |
| tree | 314e668034d5bf322f9e530f488311d6823de4e1 /src | |
| parent | 213861c758e02024c33e51b0c0f1e21152d412c6 (diff) | |
| download | emacs-7f4161e01138c77302c08292f7667e38fb43775c.tar.gz emacs-7f4161e01138c77302c08292f7667e38fb43775c.zip | |
* 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 ==.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/window.c b/src/window.c index 65c33093ebe..942f1f86d42 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -267,13 +267,13 @@ DEFUN ("window-width", Fwindow_width, Swindow_width, 0, 1, 0, | |||
| 267 | Lisp_Object window; | 267 | Lisp_Object window; |
| 268 | { | 268 | { |
| 269 | register struct window *w = decode_window (window); | 269 | register struct window *w = decode_window (window); |
| 270 | register int width = w->width; | 270 | register int width = XFASTINT (w->width); |
| 271 | 271 | ||
| 272 | /* If this window does not end at the right margin, | 272 | /* If this window does not end at the right margin, |
| 273 | must deduct one column for the border */ | 273 | must deduct one column for the border */ |
| 274 | if ((width + w->left) == FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) | 274 | if ((width + XFASTINT (w->left)) == FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) |
| 275 | return width; | 275 | return make_number (width); |
| 276 | return width - 1; | 276 | return make_number (width - 1); |
| 277 | } | 277 | } |
| 278 | 278 | ||
| 279 | DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, | 279 | DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, |
| @@ -297,7 +297,7 @@ NCOL should be zero or positive.") | |||
| 297 | if (XFASTINT (ncol) >= (1 << (SHORTBITS - 1))) | 297 | if (XFASTINT (ncol) >= (1 << (SHORTBITS - 1))) |
| 298 | args_out_of_range (ncol, Qnil); | 298 | args_out_of_range (ncol, Qnil); |
| 299 | w = decode_window (window); | 299 | w = decode_window (window); |
| 300 | if (w->hscroll != ncol) | 300 | if (XINT (w->hscroll) != XINT (ncol)) |
| 301 | clip_changed = 1; /* Prevent redisplay shortcuts */ | 301 | clip_changed = 1; /* Prevent redisplay shortcuts */ |
| 302 | w->hscroll = ncol; | 302 | w->hscroll = ncol; |
| 303 | return ncol; | 303 | return ncol; |
| @@ -649,7 +649,7 @@ replace_window (old, replacement) | |||
| 649 | /* If OLD is its frame's root_window, then replacement is the new | 649 | /* If OLD is its frame's root_window, then replacement is the new |
| 650 | root_window for that frame. */ | 650 | root_window for that frame. */ |
| 651 | 651 | ||
| 652 | if (old == FRAME_ROOT_WINDOW (XFRAME (o->frame))) | 652 | if (EQ (old, FRAME_ROOT_WINDOW (XFRAME (o->frame)))) |
| 653 | FRAME_ROOT_WINDOW (XFRAME (o->frame)) = replacement; | 653 | FRAME_ROOT_WINDOW (XFRAME (o->frame)) = replacement; |
| 654 | 654 | ||
| 655 | p->left = o->left; | 655 | p->left = o->left; |
| @@ -762,8 +762,8 @@ DEFUN ("delete-window", Fdelete_window, Sdelete_window, 0, 1, "", | |||
| 762 | set_window_{height,width} will re-position the sibling's | 762 | set_window_{height,width} will re-position the sibling's |
| 763 | children. */ | 763 | children. */ |
| 764 | sib = p->next; | 764 | sib = p->next; |
| 765 | XFASTINT (XWINDOW (sib)->top) = p->top; | 765 | XWINDOW (sib)->top = p->top; |
| 766 | XFASTINT (XWINDOW (sib)->left) = p->left; | 766 | XWINDOW (sib)->left = p->left; |
| 767 | } | 767 | } |
| 768 | 768 | ||
| 769 | /* Stretch that sibling. */ | 769 | /* Stretch that sibling. */ |
| @@ -891,7 +891,7 @@ above. If neither nil nor t, restrict to WINDOW's frame.") | |||
| 891 | we've come all the way around and we're back at the original window. */ | 891 | we've come all the way around and we're back at the original window. */ |
| 892 | while (MINI_WINDOW_P (XWINDOW (window)) | 892 | while (MINI_WINDOW_P (XWINDOW (window)) |
| 893 | && ! EQ (minibuf, Qt) | 893 | && ! EQ (minibuf, Qt) |
| 894 | && window != start_window); | 894 | && ! EQ (window, start_window)); |
| 895 | 895 | ||
| 896 | return window; | 896 | return window; |
| 897 | } | 897 | } |
| @@ -989,7 +989,7 @@ above. If neither nil nor t, restrict to WINDOW's frame.") | |||
| 989 | we've come all the way around and we're back at the original window. */ | 989 | we've come all the way around and we're back at the original window. */ |
| 990 | while (MINI_WINDOW_P (XWINDOW (window)) | 990 | while (MINI_WINDOW_P (XWINDOW (window)) |
| 991 | && !EQ (minibuf, Qt) | 991 | && !EQ (minibuf, Qt) |
| 992 | && window != start_window); | 992 | && !EQ (window, start_window)); |
| 993 | 993 | ||
| 994 | return window; | 994 | return window; |
| 995 | } | 995 | } |