diff options
| author | Dmitry Antipov | 2012-08-07 11:33:18 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-08-07 11:33:18 +0400 |
| commit | d3d50620ed3a8066c15ae3d3701b83371ca5382a (patch) | |
| tree | 817b59ba17d232cd087b0b24d84683c8ff094f62 /src/window.c | |
| parent | d10a51dcdfab2d9283bd2e3229330c511d5af193 (diff) | |
| download | emacs-d3d50620ed3a8066c15ae3d3701b83371ca5382a.tar.gz emacs-d3d50620ed3a8066c15ae3d3701b83371ca5382a.zip | |
Drop WGET and revert read access to Lisp_Objects slots of struct window.
* window.h (WGET): Remove.
(struct window): Do not use INTERNAL_FIELD.
* alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
* fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
* insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
* nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
* w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
Adjust users.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 935 |
1 files changed, 466 insertions, 469 deletions
diff --git a/src/window.c b/src/window.c index 866f4d34a76..1348eab0ff6 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -176,7 +176,7 @@ DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, | |||
| 176 | If WINDOW is omitted or nil, it defaults to the selected window. */) | 176 | If WINDOW is omitted or nil, it defaults to the selected window. */) |
| 177 | (Lisp_Object window) | 177 | (Lisp_Object window) |
| 178 | { | 178 | { |
| 179 | return WGET (decode_any_window (window), frame); | 179 | return decode_any_window (window)->frame; |
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | DEFUN ("frame-root-window", Fframe_root_window, Sframe_root_window, 0, 1, 0, | 182 | DEFUN ("frame-root-window", Fframe_root_window, Sframe_root_window, 0, 1, 0, |
| @@ -242,12 +242,12 @@ the first window of that frame. */) | |||
| 242 | window = XFRAME (frame_or_window)->root_window; | 242 | window = XFRAME (frame_or_window)->root_window; |
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | while (NILP (WGET (XWINDOW (window), buffer))) | 245 | while (NILP (XWINDOW (window)->buffer)) |
| 246 | { | 246 | { |
| 247 | if (! NILP (WGET (XWINDOW (window), hchild))) | 247 | if (! NILP (XWINDOW (window)->hchild)) |
| 248 | window = WGET (XWINDOW (window), hchild); | 248 | window = XWINDOW (window)->hchild; |
| 249 | else if (! NILP (WGET (XWINDOW (window), vchild))) | 249 | else if (! NILP (XWINDOW (window)->vchild)) |
| 250 | window = WGET (XWINDOW (window), vchild); | 250 | window = XWINDOW (window)->vchild; |
| 251 | else | 251 | else |
| 252 | abort (); | 252 | abort (); |
| 253 | } | 253 | } |
| @@ -335,7 +335,7 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap) | |||
| 335 | if (NILP (norecord)) | 335 | if (NILP (norecord)) |
| 336 | { | 336 | { |
| 337 | w->use_time = ++window_select_count; | 337 | w->use_time = ++window_select_count; |
| 338 | record_buffer (WGET (w, buffer)); | 338 | record_buffer (w->buffer); |
| 339 | } | 339 | } |
| 340 | 340 | ||
| 341 | if (EQ (window, selected_window) && !inhibit_point_swap) | 341 | if (EQ (window, selected_window) && !inhibit_point_swap) |
| @@ -363,17 +363,17 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap) | |||
| 363 | if (!inhibit_point_swap) | 363 | if (!inhibit_point_swap) |
| 364 | { | 364 | { |
| 365 | ow = XWINDOW (selected_window); | 365 | ow = XWINDOW (selected_window); |
| 366 | if (! NILP (WGET (ow, buffer))) | 366 | if (! NILP (ow->buffer)) |
| 367 | set_marker_both (WGET (ow, pointm), WGET (ow, buffer), | 367 | set_marker_both (ow->pointm, ow->buffer, |
| 368 | BUF_PT (XBUFFER (WGET (ow, buffer))), | 368 | BUF_PT (XBUFFER (ow->buffer)), |
| 369 | BUF_PT_BYTE (XBUFFER (WGET (ow, buffer)))); | 369 | BUF_PT_BYTE (XBUFFER (ow->buffer))); |
| 370 | } | 370 | } |
| 371 | 371 | ||
| 372 | selected_window = window; | 372 | selected_window = window; |
| 373 | 373 | ||
| 374 | Fset_buffer (WGET (w, buffer)); | 374 | Fset_buffer (w->buffer); |
| 375 | 375 | ||
| 376 | BVAR (XBUFFER (WGET (w, buffer)), last_selected_window) = window; | 376 | BVAR (XBUFFER (w->buffer), last_selected_window) = window; |
| 377 | 377 | ||
| 378 | /* Go to the point recorded in the window. | 378 | /* Go to the point recorded in the window. |
| 379 | This is important when the buffer is in more | 379 | This is important when the buffer is in more |
| @@ -381,7 +381,7 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap) | |||
| 381 | redisplay_window has altered point after scrolling, | 381 | redisplay_window has altered point after scrolling, |
| 382 | because it makes the change only in the window. */ | 382 | because it makes the change only in the window. */ |
| 383 | { | 383 | { |
| 384 | register ptrdiff_t new_point = marker_position (WGET (w, pointm)); | 384 | register ptrdiff_t new_point = marker_position (w->pointm); |
| 385 | if (new_point < BEGV) | 385 | if (new_point < BEGV) |
| 386 | SET_PT (BEGV); | 386 | SET_PT (BEGV); |
| 387 | else if (new_point > ZV) | 387 | else if (new_point > ZV) |
| @@ -416,7 +416,7 @@ If WINDOW is omitted or nil, it defaults to the selected window. | |||
| 416 | Return nil for an internal window or a deleted window. */) | 416 | Return nil for an internal window or a deleted window. */) |
| 417 | (Lisp_Object window) | 417 | (Lisp_Object window) |
| 418 | { | 418 | { |
| 419 | return WGET (decode_any_window (window), buffer); | 419 | return decode_any_window (window)->buffer; |
| 420 | } | 420 | } |
| 421 | 421 | ||
| 422 | DEFUN ("window-parent", Fwindow_parent, Swindow_parent, 0, 1, 0, | 422 | DEFUN ("window-parent", Fwindow_parent, Swindow_parent, 0, 1, 0, |
| @@ -425,7 +425,7 @@ If WINDOW is omitted or nil, it defaults to the selected window. | |||
| 425 | Return nil for a window with no parent (e.g. a root window). */) | 425 | Return nil for a window with no parent (e.g. a root window). */) |
| 426 | (Lisp_Object window) | 426 | (Lisp_Object window) |
| 427 | { | 427 | { |
| 428 | return WGET (decode_any_window (window), parent); | 428 | return decode_any_window (window)->parent; |
| 429 | } | 429 | } |
| 430 | 430 | ||
| 431 | DEFUN ("window-top-child", Fwindow_top_child, Swindow_top_child, 1, 1, 0, | 431 | DEFUN ("window-top-child", Fwindow_top_child, Swindow_top_child, 1, 1, 0, |
| @@ -436,7 +436,7 @@ horizontal combination. */) | |||
| 436 | (Lisp_Object window) | 436 | (Lisp_Object window) |
| 437 | { | 437 | { |
| 438 | CHECK_WINDOW (window); | 438 | CHECK_WINDOW (window); |
| 439 | return WGET (decode_any_window (window), vchild); | 439 | return decode_any_window (window)->vchild; |
| 440 | } | 440 | } |
| 441 | 441 | ||
| 442 | DEFUN ("window-left-child", Fwindow_left_child, Swindow_left_child, 1, 1, 0, | 442 | DEFUN ("window-left-child", Fwindow_left_child, Swindow_left_child, 1, 1, 0, |
| @@ -447,7 +447,7 @@ vertical combination. */) | |||
| 447 | (Lisp_Object window) | 447 | (Lisp_Object window) |
| 448 | { | 448 | { |
| 449 | CHECK_WINDOW (window); | 449 | CHECK_WINDOW (window); |
| 450 | return WGET (decode_any_window (window), hchild); | 450 | return decode_any_window (window)->hchild; |
| 451 | } | 451 | } |
| 452 | 452 | ||
| 453 | DEFUN ("window-next-sibling", Fwindow_next_sibling, Swindow_next_sibling, 0, 1, 0, | 453 | DEFUN ("window-next-sibling", Fwindow_next_sibling, Swindow_next_sibling, 0, 1, 0, |
| @@ -456,7 +456,7 @@ If WINDOW is omitted or nil, it defaults to the selected window. | |||
| 456 | Return nil if WINDOW has no next sibling. */) | 456 | Return nil if WINDOW has no next sibling. */) |
| 457 | (Lisp_Object window) | 457 | (Lisp_Object window) |
| 458 | { | 458 | { |
| 459 | return WGET (decode_any_window (window), next); | 459 | return decode_any_window (window)->next; |
| 460 | } | 460 | } |
| 461 | 461 | ||
| 462 | DEFUN ("window-prev-sibling", Fwindow_prev_sibling, Swindow_prev_sibling, 0, 1, 0, | 462 | DEFUN ("window-prev-sibling", Fwindow_prev_sibling, Swindow_prev_sibling, 0, 1, 0, |
| @@ -465,7 +465,7 @@ If WINDOW is omitted or nil, it defaults to the selected window. | |||
| 465 | Return nil if WINDOW has no previous sibling. */) | 465 | Return nil if WINDOW has no previous sibling. */) |
| 466 | (Lisp_Object window) | 466 | (Lisp_Object window) |
| 467 | { | 467 | { |
| 468 | return WGET (decode_any_window (window), prev); | 468 | return decode_any_window (window)->prev; |
| 469 | } | 469 | } |
| 470 | 470 | ||
| 471 | DEFUN ("window-combination-limit", Fwindow_combination_limit, Swindow_combination_limit, 1, 1, 0, | 471 | DEFUN ("window-combination-limit", Fwindow_combination_limit, Swindow_combination_limit, 1, 1, 0, |
| @@ -475,7 +475,7 @@ WINDOW's siblings. A return value of t means that child windows of | |||
| 475 | WINDOW are never \(re-)combined with WINDOW's siblings. */) | 475 | WINDOW are never \(re-)combined with WINDOW's siblings. */) |
| 476 | (Lisp_Object window) | 476 | (Lisp_Object window) |
| 477 | { | 477 | { |
| 478 | return WGET (decode_any_window (window), combination_limit); | 478 | return decode_any_window (window)->combination_limit; |
| 479 | } | 479 | } |
| 480 | 480 | ||
| 481 | DEFUN ("set-window-combination-limit", Fset_window_combination_limit, Sset_window_combination_limit, 2, 2, 0, | 481 | DEFUN ("set-window-combination-limit", Fset_window_combination_limit, Sset_window_combination_limit, 2, 2, 0, |
| @@ -512,7 +512,7 @@ On a graphical display, this total height is reported as an | |||
| 512 | integer multiple of the default character height. */) | 512 | integer multiple of the default character height. */) |
| 513 | (Lisp_Object window) | 513 | (Lisp_Object window) |
| 514 | { | 514 | { |
| 515 | return WGET (decode_any_window (window), total_lines); | 515 | return decode_any_window (window)->total_lines; |
| 516 | } | 516 | } |
| 517 | 517 | ||
| 518 | DEFUN ("window-total-width", Fwindow_total_width, Swindow_total_width, 0, 1, 0, | 518 | DEFUN ("window-total-width", Fwindow_total_width, Swindow_total_width, 0, 1, 0, |
| @@ -527,7 +527,7 @@ On a graphical display, this total width is reported as an | |||
| 527 | integer multiple of the default character width. */) | 527 | integer multiple of the default character width. */) |
| 528 | (Lisp_Object window) | 528 | (Lisp_Object window) |
| 529 | { | 529 | { |
| 530 | return WGET (decode_any_window (window), total_cols); | 530 | return decode_any_window (window)->total_cols; |
| 531 | } | 531 | } |
| 532 | 532 | ||
| 533 | DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0, | 533 | DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0, |
| @@ -535,7 +535,7 @@ DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0, | |||
| 535 | If WINDOW is omitted or nil, it defaults to the selected window. */) | 535 | If WINDOW is omitted or nil, it defaults to the selected window. */) |
| 536 | (Lisp_Object window) | 536 | (Lisp_Object window) |
| 537 | { | 537 | { |
| 538 | return WGET (decode_any_window (window), new_total); | 538 | return decode_any_window (window)->new_total; |
| 539 | } | 539 | } |
| 540 | 540 | ||
| 541 | DEFUN ("window-normal-size", Fwindow_normal_size, Swindow_normal_size, 0, 2, 0, | 541 | DEFUN ("window-normal-size", Fwindow_normal_size, Swindow_normal_size, 0, 2, 0, |
| @@ -544,10 +544,9 @@ If WINDOW is omitted or nil, it defaults to the selected window. | |||
| 544 | If HORIZONTAL is non-nil, return the normal width of WINDOW. */) | 544 | If HORIZONTAL is non-nil, return the normal width of WINDOW. */) |
| 545 | (Lisp_Object window, Lisp_Object horizontal) | 545 | (Lisp_Object window, Lisp_Object horizontal) |
| 546 | { | 546 | { |
| 547 | if (NILP (horizontal)) | 547 | struct window *w = decode_any_window (window); |
| 548 | return WGET (decode_any_window (window), normal_lines); | 548 | |
| 549 | else | 549 | return NILP (horizontal) ? w->normal_lines : w->normal_cols; |
| 550 | return WGET (decode_any_window (window), normal_cols); | ||
| 551 | } | 550 | } |
| 552 | 551 | ||
| 553 | DEFUN ("window-new-normal", Fwindow_new_normal, Swindow_new_normal, 0, 1, 0, | 552 | DEFUN ("window-new-normal", Fwindow_new_normal, Swindow_new_normal, 0, 1, 0, |
| @@ -555,7 +554,7 @@ DEFUN ("window-new-normal", Fwindow_new_normal, Swindow_new_normal, 0, 1, 0, | |||
| 555 | If WINDOW is omitted or nil, it defaults to the selected window. */) | 554 | If WINDOW is omitted or nil, it defaults to the selected window. */) |
| 556 | (Lisp_Object window) | 555 | (Lisp_Object window) |
| 557 | { | 556 | { |
| 558 | return WGET (decode_any_window (window), new_normal); | 557 | return decode_any_window (window)->new_normal; |
| 559 | } | 558 | } |
| 560 | 559 | ||
| 561 | DEFUN ("window-left-column", Fwindow_left_column, Swindow_left_column, 0, 1, 0, | 560 | DEFUN ("window-left-column", Fwindow_left_column, Swindow_left_column, 0, 1, 0, |
| @@ -567,7 +566,7 @@ value is 0 if there is no window to the left of WINDOW. | |||
| 567 | If WINDOW is omitted or nil, it defaults to the selected window. */) | 566 | If WINDOW is omitted or nil, it defaults to the selected window. */) |
| 568 | (Lisp_Object window) | 567 | (Lisp_Object window) |
| 569 | { | 568 | { |
| 570 | return WGET (decode_any_window (window), left_col); | 569 | return decode_any_window (window)->left_col; |
| 571 | } | 570 | } |
| 572 | 571 | ||
| 573 | DEFUN ("window-top-line", Fwindow_top_line, Swindow_top_line, 0, 1, 0, | 572 | DEFUN ("window-top-line", Fwindow_top_line, Swindow_top_line, 0, 1, 0, |
| @@ -579,7 +578,7 @@ there is no window above WINDOW. | |||
| 579 | If WINDOW is omitted or nil, it defaults to the selected window. */) | 578 | If WINDOW is omitted or nil, it defaults to the selected window. */) |
| 580 | (Lisp_Object window) | 579 | (Lisp_Object window) |
| 581 | { | 580 | { |
| 582 | return WGET (decode_any_window (window), top_line); | 581 | return decode_any_window (window)->top_line; |
| 583 | } | 582 | } |
| 584 | 583 | ||
| 585 | /* Return the number of lines of W's body. Don't count any mode or | 584 | /* Return the number of lines of W's body. Don't count any mode or |
| @@ -588,7 +587,7 @@ If WINDOW is omitted or nil, it defaults to the selected window. */) | |||
| 588 | static int | 587 | static int |
| 589 | window_body_lines (struct window *w) | 588 | window_body_lines (struct window *w) |
| 590 | { | 589 | { |
| 591 | int height = XFASTINT (WGET (w, total_lines)); | 590 | int height = XFASTINT (w->total_lines); |
| 592 | 591 | ||
| 593 | if (!MINI_WINDOW_P (w)) | 592 | if (!MINI_WINDOW_P (w)) |
| 594 | { | 593 | { |
| @@ -610,7 +609,7 @@ int | |||
| 610 | window_body_cols (struct window *w) | 609 | window_body_cols (struct window *w) |
| 611 | { | 610 | { |
| 612 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 611 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 613 | int width = XINT (WGET (w, total_cols)); | 612 | int width = XINT (w->total_cols); |
| 614 | 613 | ||
| 615 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR (w)) | 614 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR (w)) |
| 616 | /* Scroll bars occupy a few columns. */ | 615 | /* Scroll bars occupy a few columns. */ |
| @@ -685,7 +684,7 @@ set_window_hscroll (struct window *w, EMACS_INT hscroll) | |||
| 685 | 684 | ||
| 686 | /* Prevent redisplay shortcuts when changing the hscroll. */ | 685 | /* Prevent redisplay shortcuts when changing the hscroll. */ |
| 687 | if (w->hscroll != new_hscroll) | 686 | if (w->hscroll != new_hscroll) |
| 688 | XBUFFER (WGET (w, buffer))->prevent_redisplay_optimizations_p = 1; | 687 | XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1; |
| 689 | 688 | ||
| 690 | w->hscroll = new_hscroll; | 689 | w->hscroll = new_hscroll; |
| 691 | return make_number (new_hscroll); | 690 | return make_number (new_hscroll); |
| @@ -714,7 +713,7 @@ WINDOW defaults to the selected window. | |||
| 714 | See `set-window-redisplay-end-trigger' for more information. */) | 713 | See `set-window-redisplay-end-trigger' for more information. */) |
| 715 | (Lisp_Object window) | 714 | (Lisp_Object window) |
| 716 | { | 715 | { |
| 717 | return WGET (decode_window (window), redisplay_end_trigger); | 716 | return decode_window (window)->redisplay_end_trigger; |
| 718 | } | 717 | } |
| 719 | 718 | ||
| 720 | DEFUN ("set-window-redisplay-end-trigger", Fset_window_redisplay_end_trigger, | 719 | DEFUN ("set-window-redisplay-end-trigger", Fset_window_redisplay_end_trigger, |
| @@ -744,7 +743,7 @@ just the text area, use `window-inside-edges'. */) | |||
| 744 | (Lisp_Object window) | 743 | (Lisp_Object window) |
| 745 | { | 744 | { |
| 746 | register struct window *w = decode_any_window (window); | 745 | register struct window *w = decode_any_window (window); |
| 747 | CHECK_LIVE_FRAME (WGET (w, frame)); | 746 | CHECK_LIVE_FRAME (w->frame); |
| 748 | 747 | ||
| 749 | return Fcons (make_number (WINDOW_LEFT_EDGE_COL (w)), | 748 | return Fcons (make_number (WINDOW_LEFT_EDGE_COL (w)), |
| 750 | Fcons (make_number (WINDOW_TOP_EDGE_LINE (w)), | 749 | Fcons (make_number (WINDOW_TOP_EDGE_LINE (w)), |
| @@ -766,7 +765,7 @@ of just the text area, use `window-inside-pixel-edges'. */) | |||
| 766 | (Lisp_Object window) | 765 | (Lisp_Object window) |
| 767 | { | 766 | { |
| 768 | register struct window *w = decode_any_window (window); | 767 | register struct window *w = decode_any_window (window); |
| 769 | CHECK_LIVE_FRAME (WGET (w, frame)); | 768 | CHECK_LIVE_FRAME (w->frame); |
| 770 | 769 | ||
| 771 | return Fcons (make_number (WINDOW_LEFT_EDGE_X (w)), | 770 | return Fcons (make_number (WINDOW_LEFT_EDGE_X (w)), |
| 772 | Fcons (make_number (WINDOW_TOP_EDGE_Y (w)), | 771 | Fcons (make_number (WINDOW_TOP_EDGE_Y (w)), |
| @@ -778,7 +777,7 @@ of just the text area, use `window-inside-pixel-edges'. */) | |||
| 778 | static void | 777 | static void |
| 779 | calc_absolute_offset (struct window *w, int *add_x, int *add_y) | 778 | calc_absolute_offset (struct window *w, int *add_x, int *add_y) |
| 780 | { | 779 | { |
| 781 | struct frame *f = XFRAME (WGET (w, frame)); | 780 | struct frame *f = XFRAME (w->frame); |
| 782 | *add_y = f->top_pos; | 781 | *add_y = f->top_pos; |
| 783 | #ifdef FRAME_MENUBAR_HEIGHT | 782 | #ifdef FRAME_MENUBAR_HEIGHT |
| 784 | *add_y += FRAME_MENUBAR_HEIGHT (f); | 783 | *add_y += FRAME_MENUBAR_HEIGHT (f); |
| @@ -813,7 +812,7 @@ of just the text area, use `window-inside-absolute-pixel-edges'. */) | |||
| 813 | register struct window *w = decode_any_window (window); | 812 | register struct window *w = decode_any_window (window); |
| 814 | int add_x, add_y; | 813 | int add_x, add_y; |
| 815 | 814 | ||
| 816 | CHECK_LIVE_FRAME (WGET (w, frame)); | 815 | CHECK_LIVE_FRAME (w->frame); |
| 817 | calc_absolute_offset (w, &add_x, &add_y); | 816 | calc_absolute_offset (w, &add_x, &add_y); |
| 818 | 817 | ||
| 819 | return Fcons (make_number (WINDOW_LEFT_EDGE_X (w) + add_x), | 818 | return Fcons (make_number (WINDOW_LEFT_EDGE_X (w) + add_x), |
| @@ -1090,7 +1089,7 @@ If they are in the windows's left or right marginal areas, `left-margin'\n\ | |||
| 1090 | 1089 | ||
| 1091 | CHECK_LIVE_WINDOW (window); | 1090 | CHECK_LIVE_WINDOW (window); |
| 1092 | w = XWINDOW (window); | 1091 | w = XWINDOW (window); |
| 1093 | f = XFRAME (WGET (w, frame)); | 1092 | f = XFRAME (w->frame); |
| 1094 | CHECK_CONS (coordinates); | 1093 | CHECK_CONS (coordinates); |
| 1095 | lx = Fcar (coordinates); | 1094 | lx = Fcar (coordinates); |
| 1096 | ly = Fcdr (coordinates); | 1095 | ly = Fcdr (coordinates); |
| @@ -1270,9 +1269,9 @@ But that is hard to define. */) | |||
| 1270 | register struct window *w = decode_window (window); | 1269 | register struct window *w = decode_window (window); |
| 1271 | 1270 | ||
| 1272 | if (w == XWINDOW (selected_window) | 1271 | if (w == XWINDOW (selected_window) |
| 1273 | && current_buffer == XBUFFER (WGET (w, buffer))) | 1272 | && current_buffer == XBUFFER (w->buffer)) |
| 1274 | return Fpoint (); | 1273 | return Fpoint (); |
| 1275 | return Fmarker_position (WGET (w, pointm)); | 1274 | return Fmarker_position (w->pointm); |
| 1276 | } | 1275 | } |
| 1277 | 1276 | ||
| 1278 | DEFUN ("window-start", Fwindow_start, Swindow_start, 0, 1, 0, | 1277 | DEFUN ("window-start", Fwindow_start, Swindow_start, 0, 1, 0, |
| @@ -1281,7 +1280,7 @@ WINDOW must be a live window and defaults to the selected one. | |||
| 1281 | This is updated by redisplay or by calling `set-window-start'. */) | 1280 | This is updated by redisplay or by calling `set-window-start'. */) |
| 1282 | (Lisp_Object window) | 1281 | (Lisp_Object window) |
| 1283 | { | 1282 | { |
| 1284 | return Fmarker_position (WGET (decode_window (window), start)); | 1283 | return Fmarker_position (decode_window (window)->start); |
| 1285 | } | 1284 | } |
| 1286 | 1285 | ||
| 1287 | /* This is text temporarily removed from the doc string below. | 1286 | /* This is text temporarily removed from the doc string below. |
| @@ -1312,7 +1311,7 @@ if it isn't already recorded. */) | |||
| 1312 | Lisp_Object buf; | 1311 | Lisp_Object buf; |
| 1313 | struct buffer *b; | 1312 | struct buffer *b; |
| 1314 | 1313 | ||
| 1315 | buf = WGET (w, buffer); | 1314 | buf = w->buffer; |
| 1316 | CHECK_BUFFER (buf); | 1315 | CHECK_BUFFER (buf); |
| 1317 | b = XBUFFER (buf); | 1316 | b = XBUFFER (buf); |
| 1318 | 1317 | ||
| @@ -1321,12 +1320,12 @@ if it isn't already recorded. */) | |||
| 1321 | The user can compute it with vertical-motion if he wants to. | 1320 | The user can compute it with vertical-motion if he wants to. |
| 1322 | It would be nicer to do it automatically, | 1321 | It would be nicer to do it automatically, |
| 1323 | but that's so slow that it would probably bother people. */ | 1322 | but that's so slow that it would probably bother people. */ |
| 1324 | if (NILP (WGET (w, window_end_valid))) | 1323 | if (NILP (w->window_end_valid)) |
| 1325 | return Qnil; | 1324 | return Qnil; |
| 1326 | #endif | 1325 | #endif |
| 1327 | 1326 | ||
| 1328 | if (! NILP (update) | 1327 | if (! NILP (update) |
| 1329 | && ! (! NILP (WGET (w, window_end_valid)) | 1328 | && ! (! NILP (w->window_end_valid) |
| 1330 | && w->last_modified >= BUF_MODIFF (b) | 1329 | && w->last_modified >= BUF_MODIFF (b) |
| 1331 | && w->last_overlay_modified >= BUF_OVERLAY_MODIFF (b)) | 1330 | && w->last_overlay_modified >= BUF_OVERLAY_MODIFF (b)) |
| 1332 | && !noninteractive) | 1331 | && !noninteractive) |
| @@ -1349,12 +1348,12 @@ if it isn't already recorded. */) | |||
| 1349 | `-l' containing a call to `rmail' with subsequent other | 1348 | `-l' containing a call to `rmail' with subsequent other |
| 1350 | commands. At the end, W->start happened to be BEG, while | 1349 | commands. At the end, W->start happened to be BEG, while |
| 1351 | rmail had already narrowed the buffer. */ | 1350 | rmail had already narrowed the buffer. */ |
| 1352 | if (XMARKER (WGET (w, start))->charpos < BEGV) | 1351 | if (XMARKER (w->start)->charpos < BEGV) |
| 1353 | SET_TEXT_POS (startp, BEGV, BEGV_BYTE); | 1352 | SET_TEXT_POS (startp, BEGV, BEGV_BYTE); |
| 1354 | else if (XMARKER (WGET (w, start))->charpos > ZV) | 1353 | else if (XMARKER (w->start)->charpos > ZV) |
| 1355 | SET_TEXT_POS (startp, ZV, ZV_BYTE); | 1354 | SET_TEXT_POS (startp, ZV, ZV_BYTE); |
| 1356 | else | 1355 | else |
| 1357 | SET_TEXT_POS_FROM_MARKER (startp, WGET (w, start)); | 1356 | SET_TEXT_POS_FROM_MARKER (startp, w->start); |
| 1358 | 1357 | ||
| 1359 | itdata = bidi_shelve_cache (); | 1358 | itdata = bidi_shelve_cache (); |
| 1360 | start_display (&it, w, startp); | 1359 | start_display (&it, w, startp); |
| @@ -1368,7 +1367,7 @@ if it isn't already recorded. */) | |||
| 1368 | set_buffer_internal (old_buffer); | 1367 | set_buffer_internal (old_buffer); |
| 1369 | } | 1368 | } |
| 1370 | else | 1369 | else |
| 1371 | XSETINT (value, BUF_Z (b) - XFASTINT (WGET (w, window_end_pos))); | 1370 | XSETINT (value, BUF_Z (b) - XFASTINT (w->window_end_pos)); |
| 1372 | 1371 | ||
| 1373 | return value; | 1372 | return value; |
| 1374 | } | 1373 | } |
| @@ -1382,10 +1381,10 @@ Return POS. */) | |||
| 1382 | 1381 | ||
| 1383 | CHECK_NUMBER_COERCE_MARKER (pos); | 1382 | CHECK_NUMBER_COERCE_MARKER (pos); |
| 1384 | if (w == XWINDOW (selected_window) | 1383 | if (w == XWINDOW (selected_window) |
| 1385 | && XBUFFER (WGET (w, buffer)) == current_buffer) | 1384 | && XBUFFER (w->buffer) == current_buffer) |
| 1386 | Fgoto_char (pos); | 1385 | Fgoto_char (pos); |
| 1387 | else | 1386 | else |
| 1388 | set_marker_restricted (WGET (w, pointm), pos, WGET (w, buffer)); | 1387 | set_marker_restricted (w->pointm, pos, w->buffer); |
| 1389 | 1388 | ||
| 1390 | /* We have to make sure that redisplay updates the window to show | 1389 | /* We have to make sure that redisplay updates the window to show |
| 1391 | the new value of point. */ | 1390 | the new value of point. */ |
| @@ -1405,7 +1404,7 @@ overriding motion of point in order to display at this exact start. */) | |||
| 1405 | register struct window *w = decode_window (window); | 1404 | register struct window *w = decode_window (window); |
| 1406 | 1405 | ||
| 1407 | CHECK_NUMBER_COERCE_MARKER (pos); | 1406 | CHECK_NUMBER_COERCE_MARKER (pos); |
| 1408 | set_marker_restricted (WGET (w, start), pos, WGET (w, buffer)); | 1407 | set_marker_restricted (w->start, pos, w->buffer); |
| 1409 | /* this is not right, but much easier than doing what is right. */ | 1408 | /* this is not right, but much easier than doing what is right. */ |
| 1410 | w->start_at_line_beg = 0; | 1409 | w->start_at_line_beg = 0; |
| 1411 | if (NILP (noforce)) | 1410 | if (NILP (noforce)) |
| @@ -1447,8 +1446,8 @@ display row, and VPOS is the row number (0-based) containing POS. */) | |||
| 1447 | int x, y; | 1446 | int x, y; |
| 1448 | 1447 | ||
| 1449 | w = decode_window (window); | 1448 | w = decode_window (window); |
| 1450 | buf = XBUFFER (WGET (w, buffer)); | 1449 | buf = XBUFFER (w->buffer); |
| 1451 | SET_TEXT_POS_FROM_MARKER (top, WGET (w, start)); | 1450 | SET_TEXT_POS_FROM_MARKER (top, w->start); |
| 1452 | 1451 | ||
| 1453 | if (EQ (pos, Qt)) | 1452 | if (EQ (pos, Qt)) |
| 1454 | posint = -1; | 1453 | posint = -1; |
| @@ -1460,7 +1459,7 @@ display row, and VPOS is the row number (0-based) containing POS. */) | |||
| 1460 | else if (w == XWINDOW (selected_window)) | 1459 | else if (w == XWINDOW (selected_window)) |
| 1461 | posint = PT; | 1460 | posint = PT; |
| 1462 | else | 1461 | else |
| 1463 | posint = XMARKER (WGET (w, pointm))->charpos; | 1462 | posint = XMARKER (w->pointm)->charpos; |
| 1464 | 1463 | ||
| 1465 | /* If position is above window start or outside buffer boundaries, | 1464 | /* If position is above window start or outside buffer boundaries, |
| 1466 | or if window start is out of range, position is not visible. */ | 1465 | or if window start is out of range, position is not visible. */ |
| @@ -1517,11 +1516,11 @@ Return nil if window display is not up-to-date. In that case, use | |||
| 1517 | if (noninteractive || w->pseudo_window_p) | 1516 | if (noninteractive || w->pseudo_window_p) |
| 1518 | return Qnil; | 1517 | return Qnil; |
| 1519 | 1518 | ||
| 1520 | CHECK_BUFFER (WGET (w, buffer)); | 1519 | CHECK_BUFFER (w->buffer); |
| 1521 | b = XBUFFER (WGET (w, buffer)); | 1520 | b = XBUFFER (w->buffer); |
| 1522 | 1521 | ||
| 1523 | /* Fail if current matrix is not up-to-date. */ | 1522 | /* Fail if current matrix is not up-to-date. */ |
| 1524 | if (NILP (WGET (w, window_end_valid)) | 1523 | if (NILP (w->window_end_valid) |
| 1525 | || current_buffer->clip_changed | 1524 | || current_buffer->clip_changed |
| 1526 | || current_buffer->prevent_redisplay_optimizations_p | 1525 | || current_buffer->prevent_redisplay_optimizations_p |
| 1527 | || w->last_modified < BUF_MODIFF (b) | 1526 | || w->last_modified < BUF_MODIFF (b) |
| @@ -1614,7 +1613,7 @@ window, unless that window is "strongly" dedicated to its buffer, that | |||
| 1614 | is the value returned by `window-dedicated-p' is t. */) | 1613 | is the value returned by `window-dedicated-p' is t. */) |
| 1615 | (Lisp_Object window) | 1614 | (Lisp_Object window) |
| 1616 | { | 1615 | { |
| 1617 | return WGET (decode_window (window), dedicated); | 1616 | return decode_window (window)->dedicated; |
| 1618 | } | 1617 | } |
| 1619 | 1618 | ||
| 1620 | DEFUN ("set-window-dedicated-p", Fset_window_dedicated_p, | 1619 | DEFUN ("set-window-dedicated-p", Fset_window_dedicated_p, |
| @@ -1651,7 +1650,7 @@ where BUFFER is a buffer, WINDOW-START is the start position of the | |||
| 1651 | window for that buffer, and POS is a window-specific point value. */) | 1650 | window for that buffer, and POS is a window-specific point value. */) |
| 1652 | (Lisp_Object window) | 1651 | (Lisp_Object window) |
| 1653 | { | 1652 | { |
| 1654 | return WGET (decode_window (window), prev_buffers); | 1653 | return decode_window (window)->prev_buffers; |
| 1655 | } | 1654 | } |
| 1656 | 1655 | ||
| 1657 | DEFUN ("set-window-prev-buffers", Fset_window_prev_buffers, | 1656 | DEFUN ("set-window-prev-buffers", Fset_window_prev_buffers, |
| @@ -1673,7 +1672,7 @@ DEFUN ("window-next-buffers", Fwindow_next_buffers, Swindow_next_buffers, | |||
| 1673 | WINDOW must be a live window and defaults to the selected one. */) | 1672 | WINDOW must be a live window and defaults to the selected one. */) |
| 1674 | (Lisp_Object window) | 1673 | (Lisp_Object window) |
| 1675 | { | 1674 | { |
| 1676 | return WGET (decode_window (window), next_buffers); | 1675 | return decode_window (window)->next_buffers; |
| 1677 | } | 1676 | } |
| 1678 | 1677 | ||
| 1679 | DEFUN ("set-window-next-buffers", Fset_window_next_buffers, | 1678 | DEFUN ("set-window-next-buffers", Fset_window_next_buffers, |
| @@ -1693,7 +1692,7 @@ WINDOW defaults to the selected window. The return value is a list of | |||
| 1693 | elements of the form (PARAMETER . VALUE). */) | 1692 | elements of the form (PARAMETER . VALUE). */) |
| 1694 | (Lisp_Object window) | 1693 | (Lisp_Object window) |
| 1695 | { | 1694 | { |
| 1696 | return Fcopy_alist (WGET (decode_any_window (window), window_parameters)); | 1695 | return Fcopy_alist (decode_any_window (window)->window_parameters); |
| 1697 | } | 1696 | } |
| 1698 | 1697 | ||
| 1699 | DEFUN ("window-parameter", Fwindow_parameter, Swindow_parameter, | 1698 | DEFUN ("window-parameter", Fwindow_parameter, Swindow_parameter, |
| @@ -1704,8 +1703,7 @@ WINDOW defaults to the selected window. */) | |||
| 1704 | { | 1703 | { |
| 1705 | Lisp_Object result; | 1704 | Lisp_Object result; |
| 1706 | 1705 | ||
| 1707 | result = Fassq (parameter, WGET (decode_any_window (window), | 1706 | result = Fassq (parameter, decode_any_window (window)->window_parameters); |
| 1708 | window_parameters)); | ||
| 1709 | return CDR_SAFE (result); | 1707 | return CDR_SAFE (result); |
| 1710 | } | 1708 | } |
| 1711 | 1709 | ||
| @@ -1718,10 +1716,10 @@ WINDOW defaults to the selected window. Return VALUE. */) | |||
| 1718 | register struct window *w = decode_any_window (window); | 1716 | register struct window *w = decode_any_window (window); |
| 1719 | Lisp_Object old_alist_elt; | 1717 | Lisp_Object old_alist_elt; |
| 1720 | 1718 | ||
| 1721 | old_alist_elt = Fassq (parameter, WGET (w, window_parameters)); | 1719 | old_alist_elt = Fassq (parameter, w->window_parameters); |
| 1722 | if (NILP (old_alist_elt)) | 1720 | if (NILP (old_alist_elt)) |
| 1723 | WSET (w, window_parameters, | 1721 | WSET (w, window_parameters, |
| 1724 | Fcons (Fcons (parameter, value), WGET (w, window_parameters))); | 1722 | Fcons (Fcons (parameter, value), w->window_parameters)); |
| 1725 | else | 1723 | else |
| 1726 | Fsetcdr (old_alist_elt, value); | 1724 | Fsetcdr (old_alist_elt, value); |
| 1727 | return value; | 1725 | return value; |
| @@ -1733,7 +1731,7 @@ DEFUN ("window-display-table", Fwindow_display_table, Swindow_display_table, | |||
| 1733 | WINDOW defaults to the selected window. */) | 1731 | WINDOW defaults to the selected window. */) |
| 1734 | (Lisp_Object window) | 1732 | (Lisp_Object window) |
| 1735 | { | 1733 | { |
| 1736 | return WGET (decode_window (window), display_table); | 1734 | return decode_window (window)->display_table; |
| 1737 | } | 1735 | } |
| 1738 | 1736 | ||
| 1739 | /* Get the display table for use on window W. This is either W's | 1737 | /* Get the display table for use on window W. This is either W's |
| @@ -1746,11 +1744,11 @@ window_display_table (struct window *w) | |||
| 1746 | { | 1744 | { |
| 1747 | struct Lisp_Char_Table *dp = NULL; | 1745 | struct Lisp_Char_Table *dp = NULL; |
| 1748 | 1746 | ||
| 1749 | if (DISP_TABLE_P (WGET (w, display_table))) | 1747 | if (DISP_TABLE_P (w->display_table)) |
| 1750 | dp = XCHAR_TABLE (WGET (w, display_table)); | 1748 | dp = XCHAR_TABLE (w->display_table); |
| 1751 | else if (BUFFERP (WGET (w, buffer))) | 1749 | else if (BUFFERP (w->buffer)) |
| 1752 | { | 1750 | { |
| 1753 | struct buffer *b = XBUFFER (WGET (w, buffer)); | 1751 | struct buffer *b = XBUFFER (w->buffer); |
| 1754 | 1752 | ||
| 1755 | if (DISP_TABLE_P (BVAR (b, display_table))) | 1753 | if (DISP_TABLE_P (BVAR (b, display_table))) |
| 1756 | dp = XCHAR_TABLE (BVAR (b, display_table)); | 1754 | dp = XCHAR_TABLE (BVAR (b, display_table)); |
| @@ -1776,14 +1774,14 @@ unshow_buffer (register struct window *w) | |||
| 1776 | Lisp_Object buf; | 1774 | Lisp_Object buf; |
| 1777 | struct buffer *b; | 1775 | struct buffer *b; |
| 1778 | 1776 | ||
| 1779 | buf = WGET (w, buffer); | 1777 | buf = w->buffer; |
| 1780 | b = XBUFFER (buf); | 1778 | b = XBUFFER (buf); |
| 1781 | if (b != XMARKER (WGET (w, pointm))->buffer) | 1779 | if (b != XMARKER (w->pointm)->buffer) |
| 1782 | abort (); | 1780 | abort (); |
| 1783 | 1781 | ||
| 1784 | #if 0 | 1782 | #if 0 |
| 1785 | if (w == XWINDOW (selected_window) | 1783 | if (w == XWINDOW (selected_window) |
| 1786 | || ! EQ (buf, WGET (XWINDOW (selected_window), buffer))) | 1784 | || ! EQ (buf, XWINDOW (selected_window)->buffer)) |
| 1787 | /* Do this except when the selected window's buffer | 1785 | /* Do this except when the selected window's buffer |
| 1788 | is being removed from some other window. */ | 1786 | is being removed from some other window. */ |
| 1789 | #endif | 1787 | #endif |
| @@ -1794,22 +1792,22 @@ unshow_buffer (register struct window *w) | |||
| 1794 | selected window, while last_window_start reflects another | 1792 | selected window, while last_window_start reflects another |
| 1795 | window which was recently showing the same buffer. | 1793 | window which was recently showing the same buffer. |
| 1796 | Some people might say that might be a good thing. Let's see. */ | 1794 | Some people might say that might be a good thing. Let's see. */ |
| 1797 | b->last_window_start = marker_position (WGET (w, start)); | 1795 | b->last_window_start = marker_position (w->start); |
| 1798 | 1796 | ||
| 1799 | /* Point in the selected window's buffer | 1797 | /* Point in the selected window's buffer |
| 1800 | is actually stored in that buffer, and the window's pointm isn't used. | 1798 | is actually stored in that buffer, and the window's pointm isn't used. |
| 1801 | So don't clobber point in that buffer. */ | 1799 | So don't clobber point in that buffer. */ |
| 1802 | if (! EQ (buf, WGET (XWINDOW (selected_window), buffer)) | 1800 | if (! EQ (buf, XWINDOW (selected_window)->buffer) |
| 1803 | /* This line helps to fix Horsley's testbug.el bug. */ | 1801 | /* This line helps to fix Horsley's testbug.el bug. */ |
| 1804 | && !(WINDOWP (BVAR (b, last_selected_window)) | 1802 | && !(WINDOWP (BVAR (b, last_selected_window)) |
| 1805 | && w != XWINDOW (BVAR (b, last_selected_window)) | 1803 | && w != XWINDOW (BVAR (b, last_selected_window)) |
| 1806 | && EQ (buf, WGET (XWINDOW (BVAR (b, last_selected_window)), buffer)))) | 1804 | && EQ (buf, XWINDOW (BVAR (b, last_selected_window))->buffer))) |
| 1807 | temp_set_point_both (b, | 1805 | temp_set_point_both (b, |
| 1808 | clip_to_bounds (BUF_BEGV (b), | 1806 | clip_to_bounds (BUF_BEGV (b), |
| 1809 | XMARKER (WGET (w, pointm))->charpos, | 1807 | XMARKER (w->pointm)->charpos, |
| 1810 | BUF_ZV (b)), | 1808 | BUF_ZV (b)), |
| 1811 | clip_to_bounds (BUF_BEGV_BYTE (b), | 1809 | clip_to_bounds (BUF_BEGV_BYTE (b), |
| 1812 | marker_byte_position (WGET (w, pointm)), | 1810 | marker_byte_position (w->pointm), |
| 1813 | BUF_ZV_BYTE (b))); | 1811 | BUF_ZV_BYTE (b))); |
| 1814 | 1812 | ||
| 1815 | if (WINDOWP (BVAR (b, last_selected_window)) | 1813 | if (WINDOWP (BVAR (b, last_selected_window)) |
| @@ -1828,18 +1826,18 @@ replace_window (Lisp_Object old, Lisp_Object new, int setflag) | |||
| 1828 | 1826 | ||
| 1829 | /* If OLD is its frame's root window, then NEW is the new | 1827 | /* If OLD is its frame's root window, then NEW is the new |
| 1830 | root window for that frame. */ | 1828 | root window for that frame. */ |
| 1831 | if (EQ (old, FRAME_ROOT_WINDOW (XFRAME (WGET (o, frame))))) | 1829 | if (EQ (old, FRAME_ROOT_WINDOW (XFRAME (o->frame)))) |
| 1832 | FSET (XFRAME (WGET (o, frame)), root_window, new); | 1830 | FSET (XFRAME (o->frame), root_window, new); |
| 1833 | 1831 | ||
| 1834 | if (setflag) | 1832 | if (setflag) |
| 1835 | { | 1833 | { |
| 1836 | WSET (n, left_col, WGET (o, left_col)); | 1834 | WSET (n, left_col, o->left_col); |
| 1837 | WSET (n, top_line, WGET (o, top_line)); | 1835 | WSET (n, top_line, o->top_line); |
| 1838 | WSET (n, total_cols, WGET (o, total_cols)); | 1836 | WSET (n, total_cols, o->total_cols); |
| 1839 | WSET (n, total_lines, WGET (o, total_lines)); | 1837 | WSET (n, total_lines, o->total_lines); |
| 1840 | WSET (n, normal_cols, WGET (o, normal_cols)); | 1838 | WSET (n, normal_cols, o->normal_cols); |
| 1841 | WSET (o, normal_cols, make_float (1.0)); | 1839 | WSET (o, normal_cols, make_float (1.0)); |
| 1842 | WSET (n, normal_lines, WGET (o, normal_lines)); | 1840 | WSET (n, normal_lines, o->normal_lines); |
| 1843 | WSET (o, normal_lines, make_float (1.0)); | 1841 | WSET (o, normal_lines, make_float (1.0)); |
| 1844 | n->desired_matrix = n->current_matrix = 0; | 1842 | n->desired_matrix = n->current_matrix = 0; |
| 1845 | n->vscroll = 0; | 1843 | n->vscroll = 0; |
| @@ -1856,23 +1854,23 @@ replace_window (Lisp_Object old, Lisp_Object new, int setflag) | |||
| 1856 | n->frozen_window_start_p = 0; | 1854 | n->frozen_window_start_p = 0; |
| 1857 | } | 1855 | } |
| 1858 | 1856 | ||
| 1859 | tem = WGET (o, next); | 1857 | tem = o->next; |
| 1860 | WSET (n, next, tem); | 1858 | WSET (n, next, tem); |
| 1861 | if (!NILP (tem)) | 1859 | if (!NILP (tem)) |
| 1862 | WSET (XWINDOW (tem), prev, new); | 1860 | WSET (XWINDOW (tem), prev, new); |
| 1863 | 1861 | ||
| 1864 | tem = WGET (o, prev); | 1862 | tem = o->prev; |
| 1865 | WSET (n, prev, tem); | 1863 | WSET (n, prev, tem); |
| 1866 | if (!NILP (tem)) | 1864 | if (!NILP (tem)) |
| 1867 | WSET (XWINDOW (tem), next, new); | 1865 | WSET (XWINDOW (tem), next, new); |
| 1868 | 1866 | ||
| 1869 | tem = WGET (o, parent); | 1867 | tem = o->parent; |
| 1870 | WSET (n, parent, tem); | 1868 | WSET (n, parent, tem); |
| 1871 | if (!NILP (tem)) | 1869 | if (!NILP (tem)) |
| 1872 | { | 1870 | { |
| 1873 | if (EQ (WGET (XWINDOW (tem), vchild), old)) | 1871 | if (EQ (XWINDOW (tem)->vchild, old)) |
| 1874 | WSET (XWINDOW (tem), vchild, new); | 1872 | WSET (XWINDOW (tem), vchild, new); |
| 1875 | if (EQ (WGET (XWINDOW (tem), hchild), old)) | 1873 | if (EQ (XWINDOW (tem)->hchild, old)) |
| 1876 | WSET (XWINDOW (tem), hchild, new); | 1874 | WSET (XWINDOW (tem), hchild, new); |
| 1877 | } | 1875 | } |
| 1878 | } | 1876 | } |
| @@ -1889,30 +1887,30 @@ recombine_windows (Lisp_Object window) | |||
| 1889 | int horflag; | 1887 | int horflag; |
| 1890 | 1888 | ||
| 1891 | w = XWINDOW (window); | 1889 | w = XWINDOW (window); |
| 1892 | parent = WGET (w, parent); | 1890 | parent = w->parent; |
| 1893 | if (!NILP (parent) && NILP (WGET (w, combination_limit))) | 1891 | if (!NILP (parent) && NILP (w->combination_limit)) |
| 1894 | { | 1892 | { |
| 1895 | p = XWINDOW (parent); | 1893 | p = XWINDOW (parent); |
| 1896 | if (((!NILP (WGET (p, vchild)) && !NILP (WGET (w, vchild))) | 1894 | if (((!NILP (p->vchild) && !NILP (w->vchild)) |
| 1897 | || (!NILP (WGET (p, hchild)) && !NILP (WGET (w, hchild))))) | 1895 | || (!NILP (p->hchild) && !NILP (w->hchild)))) |
| 1898 | /* WINDOW and PARENT are both either a vertical or a horizontal | 1896 | /* WINDOW and PARENT are both either a vertical or a horizontal |
| 1899 | combination. */ | 1897 | combination. */ |
| 1900 | { | 1898 | { |
| 1901 | horflag = NILP (WGET (w, vchild)); | 1899 | horflag = NILP (w->vchild); |
| 1902 | child = horflag ? WGET (w, hchild) : WGET (w, vchild); | 1900 | child = horflag ? w->hchild : w->vchild; |
| 1903 | c = XWINDOW (child); | 1901 | c = XWINDOW (child); |
| 1904 | 1902 | ||
| 1905 | /* Splice WINDOW's children into its parent's children and | 1903 | /* Splice WINDOW's children into its parent's children and |
| 1906 | assign new normal sizes. */ | 1904 | assign new normal sizes. */ |
| 1907 | if (NILP (WGET (w, prev))) | 1905 | if (NILP (w->prev)) |
| 1908 | if (horflag) | 1906 | if (horflag) |
| 1909 | WSET (p, hchild, child); | 1907 | WSET (p, hchild, child); |
| 1910 | else | 1908 | else |
| 1911 | WSET (p, vchild, child); | 1909 | WSET (p, vchild, child); |
| 1912 | else | 1910 | else |
| 1913 | { | 1911 | { |
| 1914 | WSET (c, prev, WGET (w, prev)); | 1912 | WSET (c, prev, w->prev); |
| 1915 | WSET (XWINDOW (WGET (w, prev)), next, child); | 1913 | WSET (XWINDOW (w->prev), next, child); |
| 1916 | } | 1914 | } |
| 1917 | 1915 | ||
| 1918 | while (c) | 1916 | while (c) |
| @@ -1921,26 +1919,26 @@ recombine_windows (Lisp_Object window) | |||
| 1921 | 1919 | ||
| 1922 | if (horflag) | 1920 | if (horflag) |
| 1923 | WSET (c, normal_cols, | 1921 | WSET (c, normal_cols, |
| 1924 | make_float (XFLOATINT (WGET (c, total_cols)) | 1922 | make_float (XFLOATINT (c->total_cols) |
| 1925 | / XFLOATINT (WGET (p, total_cols)))); | 1923 | / XFLOATINT (p->total_cols))); |
| 1926 | else | 1924 | else |
| 1927 | WSET (c, normal_lines, | 1925 | WSET (c, normal_lines, |
| 1928 | make_float (XFLOATINT (WGET (c, total_lines)) | 1926 | make_float (XFLOATINT (c->total_lines) |
| 1929 | / XFLOATINT (WGET (p, total_lines)))); | 1927 | / XFLOATINT (p->total_lines))); |
| 1930 | 1928 | ||
| 1931 | if (NILP (WGET (c, next))) | 1929 | if (NILP (c->next)) |
| 1932 | { | 1930 | { |
| 1933 | if (!NILP (WGET (w, next))) | 1931 | if (!NILP (w->next)) |
| 1934 | { | 1932 | { |
| 1935 | WSET (c, next, WGET (w, next)); | 1933 | WSET (c, next, w->next); |
| 1936 | WSET (XWINDOW (WGET (c, next)), prev, child); | 1934 | WSET (XWINDOW (c->next), prev, child); |
| 1937 | } | 1935 | } |
| 1938 | 1936 | ||
| 1939 | c = 0; | 1937 | c = 0; |
| 1940 | } | 1938 | } |
| 1941 | else | 1939 | else |
| 1942 | { | 1940 | { |
| 1943 | child = WGET (c, next); | 1941 | child = c->next; |
| 1944 | c = XWINDOW (child); | 1942 | c = XWINDOW (child); |
| 1945 | } | 1943 | } |
| 1946 | } | 1944 | } |
| @@ -2030,10 +2028,10 @@ static int | |||
| 2030 | candidate_window_p (Lisp_Object window, Lisp_Object owindow, Lisp_Object minibuf, Lisp_Object all_frames) | 2028 | candidate_window_p (Lisp_Object window, Lisp_Object owindow, Lisp_Object minibuf, Lisp_Object all_frames) |
| 2031 | { | 2029 | { |
| 2032 | struct window *w = XWINDOW (window); | 2030 | struct window *w = XWINDOW (window); |
| 2033 | struct frame *f = XFRAME (WGET (w, frame)); | 2031 | struct frame *f = XFRAME (w->frame); |
| 2034 | int candidate_p = 1; | 2032 | int candidate_p = 1; |
| 2035 | 2033 | ||
| 2036 | if (!BUFFERP (WGET (w, buffer))) | 2034 | if (!BUFFERP (w->buffer)) |
| 2037 | candidate_p = 0; | 2035 | candidate_p = 0; |
| 2038 | else if (MINI_WINDOW_P (w) | 2036 | else if (MINI_WINDOW_P (w) |
| 2039 | && (EQ (minibuf, Qlambda) | 2037 | && (EQ (minibuf, Qlambda) |
| @@ -2048,13 +2046,13 @@ candidate_window_p (Lisp_Object window, Lisp_Object owindow, Lisp_Object minibuf | |||
| 2048 | else if (NILP (all_frames)) | 2046 | else if (NILP (all_frames)) |
| 2049 | { | 2047 | { |
| 2050 | eassert (WINDOWP (owindow)); | 2048 | eassert (WINDOWP (owindow)); |
| 2051 | candidate_p = EQ (WGET (w, frame), WGET (XWINDOW (owindow), frame)); | 2049 | candidate_p = EQ (w->frame, XWINDOW (owindow)->frame); |
| 2052 | } | 2050 | } |
| 2053 | else if (EQ (all_frames, Qvisible)) | 2051 | else if (EQ (all_frames, Qvisible)) |
| 2054 | { | 2052 | { |
| 2055 | FRAME_SAMPLE_VISIBILITY (f); | 2053 | FRAME_SAMPLE_VISIBILITY (f); |
| 2056 | candidate_p = FRAME_VISIBLE_P (f) | 2054 | candidate_p = FRAME_VISIBLE_P (f) |
| 2057 | && (FRAME_TERMINAL (XFRAME (WGET (w, frame))) | 2055 | && (FRAME_TERMINAL (XFRAME (w->frame)) |
| 2058 | == FRAME_TERMINAL (XFRAME (selected_frame))); | 2056 | == FRAME_TERMINAL (XFRAME (selected_frame))); |
| 2059 | 2057 | ||
| 2060 | } | 2058 | } |
| @@ -2073,15 +2071,15 @@ candidate_window_p (Lisp_Object window, Lisp_Object owindow, Lisp_Object minibuf | |||
| 2073 | && !f->output_data.x->has_been_visible) | 2071 | && !f->output_data.x->has_been_visible) |
| 2074 | #endif | 2072 | #endif |
| 2075 | ) | 2073 | ) |
| 2076 | && (FRAME_TERMINAL (XFRAME (WGET (w, frame))) | 2074 | && (FRAME_TERMINAL (XFRAME (w->frame)) |
| 2077 | == FRAME_TERMINAL (XFRAME (selected_frame))); | 2075 | == FRAME_TERMINAL (XFRAME (selected_frame))); |
| 2078 | } | 2076 | } |
| 2079 | else if (WINDOWP (all_frames)) | 2077 | else if (WINDOWP (all_frames)) |
| 2080 | candidate_p = (EQ (FRAME_MINIBUF_WINDOW (f), all_frames) | 2078 | candidate_p = (EQ (FRAME_MINIBUF_WINDOW (f), all_frames) |
| 2081 | || EQ (WGET (XWINDOW (all_frames), frame), WGET (w, frame)) | 2079 | || EQ (XWINDOW (all_frames)->frame, w->frame) |
| 2082 | || EQ (WGET (XWINDOW (all_frames), frame), FRAME_FOCUS_FRAME (f))); | 2080 | || EQ (XWINDOW (all_frames)->frame, FRAME_FOCUS_FRAME (f))); |
| 2083 | else if (FRAMEP (all_frames)) | 2081 | else if (FRAMEP (all_frames)) |
| 2084 | candidate_p = EQ (all_frames, WGET (w, frame)); | 2082 | candidate_p = EQ (all_frames, w->frame); |
| 2085 | 2083 | ||
| 2086 | return candidate_p; | 2084 | return candidate_p; |
| 2087 | } | 2085 | } |
| @@ -2114,7 +2112,7 @@ decode_next_window_args (Lisp_Object *window, Lisp_Object *minibuf, Lisp_Object | |||
| 2114 | if (NILP (*all_frames)) | 2112 | if (NILP (*all_frames)) |
| 2115 | *all_frames | 2113 | *all_frames |
| 2116 | = (!EQ (*minibuf, Qlambda) | 2114 | = (!EQ (*minibuf, Qlambda) |
| 2117 | ? FRAME_MINIBUF_WINDOW (XFRAME (WGET (XWINDOW (*window), frame))) | 2115 | ? FRAME_MINIBUF_WINDOW (XFRAME (XWINDOW (*window)->frame)) |
| 2118 | : Qnil); | 2116 | : Qnil); |
| 2119 | else if (EQ (*all_frames, Qvisible)) | 2117 | else if (EQ (*all_frames, Qvisible)) |
| 2120 | ; | 2118 | ; |
| @@ -2140,7 +2138,7 @@ next_window (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames, in | |||
| 2140 | /* If ALL_FRAMES is a frame, and WINDOW isn't on that frame, just | 2138 | /* If ALL_FRAMES is a frame, and WINDOW isn't on that frame, just |
| 2141 | return the first window on the frame. */ | 2139 | return the first window on the frame. */ |
| 2142 | if (FRAMEP (all_frames) | 2140 | if (FRAMEP (all_frames) |
| 2143 | && !EQ (all_frames, WGET (XWINDOW (window), frame))) | 2141 | && !EQ (all_frames, XWINDOW (window)->frame)) |
| 2144 | return Fframe_first_window (all_frames); | 2142 | return Fframe_first_window (all_frames); |
| 2145 | 2143 | ||
| 2146 | if (next_p) | 2144 | if (next_p) |
| @@ -2320,7 +2318,7 @@ MINIBUF neither nil nor t means never include the minibuffer window. */) | |||
| 2320 | if (NILP (frame)) | 2318 | if (NILP (frame)) |
| 2321 | frame = selected_frame; | 2319 | frame = selected_frame; |
| 2322 | 2320 | ||
| 2323 | if (!EQ (frame, WGET (XWINDOW (window), frame))) | 2321 | if (!EQ (frame, XWINDOW (window)->frame)) |
| 2324 | error ("Window is on a different frame"); | 2322 | error ("Window is on a different frame"); |
| 2325 | 2323 | ||
| 2326 | return window_list_1 (window, minibuf, frame); | 2324 | return window_list_1 (window, minibuf, frame); |
| @@ -2441,7 +2439,7 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame | |||
| 2441 | switch (type) | 2439 | switch (type) |
| 2442 | { | 2440 | { |
| 2443 | case GET_BUFFER_WINDOW: | 2441 | case GET_BUFFER_WINDOW: |
| 2444 | if (EQ (WGET (w, buffer), obj) | 2442 | if (EQ (w->buffer, obj) |
| 2445 | /* Don't find any minibuffer window except the one that | 2443 | /* Don't find any minibuffer window except the one that |
| 2446 | is currently in use. */ | 2444 | is currently in use. */ |
| 2447 | && (MINI_WINDOW_P (w) ? EQ (window, minibuf_window) : 1)) | 2445 | && (MINI_WINDOW_P (w) ? EQ (window, minibuf_window) : 1)) |
| @@ -2449,7 +2447,7 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame | |||
| 2449 | if (EQ (window, selected_window)) | 2447 | if (EQ (window, selected_window)) |
| 2450 | /* Preferably return the selected window. */ | 2448 | /* Preferably return the selected window. */ |
| 2451 | RETURN_UNGCPRO (window); | 2449 | RETURN_UNGCPRO (window); |
| 2452 | else if (EQ (WGET (XWINDOW (window), frame), selected_frame) | 2450 | else if (EQ (XWINDOW (window)->frame, selected_frame) |
| 2453 | && !frame_best_window_flag) | 2451 | && !frame_best_window_flag) |
| 2454 | /* Prefer windows on the current frame (but don't | 2452 | /* Prefer windows on the current frame (but don't |
| 2455 | choose another one if we have one already). */ | 2453 | choose another one if we have one already). */ |
| @@ -2465,25 +2463,25 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame | |||
| 2465 | case REPLACE_BUFFER_IN_WINDOWS_SAFELY: | 2463 | case REPLACE_BUFFER_IN_WINDOWS_SAFELY: |
| 2466 | /* We could simply check whether the buffer shown by window | 2464 | /* We could simply check whether the buffer shown by window |
| 2467 | is live, and show another buffer in case it isn't. */ | 2465 | is live, and show another buffer in case it isn't. */ |
| 2468 | if (EQ (WGET (w, buffer), obj)) | 2466 | if (EQ (w->buffer, obj)) |
| 2469 | { | 2467 | { |
| 2470 | /* Undedicate WINDOW. */ | 2468 | /* Undedicate WINDOW. */ |
| 2471 | WSET (w, dedicated, Qnil); | 2469 | WSET (w, dedicated, Qnil); |
| 2472 | /* Make WINDOW show the buffer returned by | 2470 | /* Make WINDOW show the buffer returned by |
| 2473 | other_buffer_safely, don't run any hooks. */ | 2471 | other_buffer_safely, don't run any hooks. */ |
| 2474 | set_window_buffer | 2472 | set_window_buffer |
| 2475 | (window, other_buffer_safely (WGET (w, buffer)), 0, 0); | 2473 | (window, other_buffer_safely (w->buffer), 0, 0); |
| 2476 | /* If WINDOW is the selected window, make its buffer | 2474 | /* If WINDOW is the selected window, make its buffer |
| 2477 | current. But do so only if the window shows the | 2475 | current. But do so only if the window shows the |
| 2478 | current buffer (Bug#6454). */ | 2476 | current buffer (Bug#6454). */ |
| 2479 | if (EQ (window, selected_window) | 2477 | if (EQ (window, selected_window) |
| 2480 | && XBUFFER (WGET (w, buffer)) == current_buffer) | 2478 | && XBUFFER (w->buffer) == current_buffer) |
| 2481 | Fset_buffer (WGET (w, buffer)); | 2479 | Fset_buffer (w->buffer); |
| 2482 | } | 2480 | } |
| 2483 | break; | 2481 | break; |
| 2484 | 2482 | ||
| 2485 | case REDISPLAY_BUFFER_WINDOWS: | 2483 | case REDISPLAY_BUFFER_WINDOWS: |
| 2486 | if (EQ (WGET (w, buffer), obj)) | 2484 | if (EQ (w->buffer, obj)) |
| 2487 | { | 2485 | { |
| 2488 | mark_window_display_accurate (window, 0); | 2486 | mark_window_display_accurate (window, 0); |
| 2489 | w->update_mode_line = 1; | 2487 | w->update_mode_line = 1; |
| @@ -2495,8 +2493,8 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame | |||
| 2495 | 2493 | ||
| 2496 | /* Check for a window that has a killed buffer. */ | 2494 | /* Check for a window that has a killed buffer. */ |
| 2497 | case CHECK_ALL_WINDOWS: | 2495 | case CHECK_ALL_WINDOWS: |
| 2498 | if (! NILP (WGET (w, buffer)) | 2496 | if (! NILP (w->buffer) |
| 2499 | && NILP (BVAR (XBUFFER (WGET (w, buffer)), name))) | 2497 | && NILP (BVAR (XBUFFER (w->buffer), name))) |
| 2500 | abort (); | 2498 | abort (); |
| 2501 | break; | 2499 | break; |
| 2502 | 2500 | ||
| @@ -2582,9 +2580,9 @@ window-start value is reasonable when this function is called. */) | |||
| 2582 | int top IF_LINT (= 0), new_top, resize_failed; | 2580 | int top IF_LINT (= 0), new_top, resize_failed; |
| 2583 | 2581 | ||
| 2584 | w = decode_any_window (window); | 2582 | w = decode_any_window (window); |
| 2585 | CHECK_LIVE_FRAME (WGET (w, frame)); | 2583 | CHECK_LIVE_FRAME (w->frame); |
| 2586 | XSETWINDOW (window, w); | 2584 | XSETWINDOW (window, w); |
| 2587 | f = XFRAME (WGET (w, frame)); | 2585 | f = XFRAME (w->frame); |
| 2588 | 2586 | ||
| 2589 | if (NILP (root)) | 2587 | if (NILP (root)) |
| 2590 | /* ROOT is the frame's root window. */ | 2588 | /* ROOT is the frame's root window. */ |
| @@ -2596,13 +2594,13 @@ window-start value is reasonable when this function is called. */) | |||
| 2596 | /* ROOT must be an ancestor of WINDOW. */ | 2594 | /* ROOT must be an ancestor of WINDOW. */ |
| 2597 | { | 2595 | { |
| 2598 | r = decode_any_window (root); | 2596 | r = decode_any_window (root); |
| 2599 | CHECK_LIVE_FRAME (WGET (r, frame)); | 2597 | CHECK_LIVE_FRAME (r->frame); |
| 2600 | pwindow = WGET (XWINDOW (window), parent); | 2598 | pwindow = XWINDOW (window)->parent; |
| 2601 | while (!NILP (pwindow)) | 2599 | while (!NILP (pwindow)) |
| 2602 | if (EQ (pwindow, root)) | 2600 | if (EQ (pwindow, root)) |
| 2603 | break; | 2601 | break; |
| 2604 | else | 2602 | else |
| 2605 | pwindow = WGET (XWINDOW (pwindow), parent); | 2603 | pwindow = XWINDOW (pwindow)->parent; |
| 2606 | if (!EQ (pwindow, root)) | 2604 | if (!EQ (pwindow, root)) |
| 2607 | error ("Specified root is not an ancestor of specified window"); | 2605 | error ("Specified root is not an ancestor of specified window"); |
| 2608 | } | 2606 | } |
| @@ -2616,15 +2614,15 @@ window-start value is reasonable when this function is called. */) | |||
| 2616 | else if (MINI_WINDOW_P (w)) /* && top > 0) */ | 2614 | else if (MINI_WINDOW_P (w)) /* && top > 0) */ |
| 2617 | error ("Can't expand minibuffer to full frame"); | 2615 | error ("Can't expand minibuffer to full frame"); |
| 2618 | 2616 | ||
| 2619 | if (!NILP (WGET (w, buffer))) | 2617 | if (!NILP (w->buffer)) |
| 2620 | { | 2618 | { |
| 2621 | startpos = marker_position (WGET (w, start)); | 2619 | startpos = marker_position (w->start); |
| 2622 | top = WINDOW_TOP_EDGE_LINE (w) | 2620 | top = WINDOW_TOP_EDGE_LINE (w) |
| 2623 | - FRAME_TOP_MARGIN (XFRAME (WINDOW_FRAME (w))); | 2621 | - FRAME_TOP_MARGIN (XFRAME (WINDOW_FRAME (w))); |
| 2624 | /* Make sure WINDOW is the frame's selected window. */ | 2622 | /* Make sure WINDOW is the frame's selected window. */ |
| 2625 | if (!EQ (window, FRAME_SELECTED_WINDOW (f))) | 2623 | if (!EQ (window, FRAME_SELECTED_WINDOW (f))) |
| 2626 | { | 2624 | { |
| 2627 | if (EQ (selected_frame, WGET (w, frame))) | 2625 | if (EQ (selected_frame, w->frame)) |
| 2628 | Fselect_window (window, Qnil); | 2626 | Fselect_window (window, Qnil); |
| 2629 | else | 2627 | else |
| 2630 | FSET (f, selected_window, window); | 2628 | FSET (f, selected_window, window); |
| @@ -2641,7 +2639,7 @@ window-start value is reasonable when this function is called. */) | |||
| 2641 | { | 2639 | { |
| 2642 | pwindow = swindow; | 2640 | pwindow = swindow; |
| 2643 | while (!NILP (pwindow) && !EQ (window, pwindow)) | 2641 | while (!NILP (pwindow) && !EQ (window, pwindow)) |
| 2644 | pwindow = WGET (XWINDOW (pwindow), parent); | 2642 | pwindow = XWINDOW (pwindow)->parent; |
| 2645 | 2643 | ||
| 2646 | if (EQ (window, pwindow)) | 2644 | if (EQ (window, pwindow)) |
| 2647 | /* If WINDOW is an ancestor of SWINDOW, then SWINDOW is ok | 2645 | /* If WINDOW is an ancestor of SWINDOW, then SWINDOW is ok |
| @@ -2654,7 +2652,7 @@ window-start value is reasonable when this function is called. */) | |||
| 2654 | 2652 | ||
| 2655 | if (!EQ (swindow, FRAME_SELECTED_WINDOW (f))) | 2653 | if (!EQ (swindow, FRAME_SELECTED_WINDOW (f))) |
| 2656 | { | 2654 | { |
| 2657 | if (EQ (selected_frame, WGET (w, frame))) | 2655 | if (EQ (selected_frame, w->frame)) |
| 2658 | Fselect_window (swindow, Qnil); | 2656 | Fselect_window (swindow, Qnil); |
| 2659 | else | 2657 | else |
| 2660 | FSET (f, selected_window, swindow); | 2658 | FSET (f, selected_window, swindow); |
| @@ -2687,12 +2685,12 @@ window-start value is reasonable when this function is called. */) | |||
| 2687 | FRAME_WINDOW_SIZES_CHANGED (f) = 1; | 2685 | FRAME_WINDOW_SIZES_CHANGED (f) = 1; |
| 2688 | resize_failed = 0; | 2686 | resize_failed = 0; |
| 2689 | 2687 | ||
| 2690 | if (NILP (WGET (w, buffer))) | 2688 | if (NILP (w->buffer)) |
| 2691 | { | 2689 | { |
| 2692 | /* Resize child windows vertically. */ | 2690 | /* Resize child windows vertically. */ |
| 2693 | XSETINT (delta, XINT (WGET (r, total_lines)) | 2691 | XSETINT (delta, XINT (r->total_lines) |
| 2694 | - XINT (WGET (w, total_lines))); | 2692 | - XINT (w->total_lines)); |
| 2695 | WSET (w, top_line, WGET (r, top_line)); | 2693 | WSET (w, top_line, r->top_line); |
| 2696 | resize_root_window (window, delta, Qnil, Qnil); | 2694 | resize_root_window (window, delta, Qnil, Qnil); |
| 2697 | if (window_resize_check (w, 0)) | 2695 | if (window_resize_check (w, 0)) |
| 2698 | window_resize_apply (w, 0); | 2696 | window_resize_apply (w, 0); |
| @@ -2708,10 +2706,10 @@ window-start value is reasonable when this function is called. */) | |||
| 2708 | /* Resize child windows horizontally. */ | 2706 | /* Resize child windows horizontally. */ |
| 2709 | if (!resize_failed) | 2707 | if (!resize_failed) |
| 2710 | { | 2708 | { |
| 2711 | WSET (w, left_col, WGET (r, left_col)); | 2709 | WSET (w, left_col, r->left_col); |
| 2712 | XSETINT (delta, XINT (WGET (r, total_cols)) | 2710 | XSETINT (delta, XINT (r->total_cols) |
| 2713 | - XINT (WGET (w, total_cols))); | 2711 | - XINT (w->total_cols)); |
| 2714 | WSET (w, left_col, WGET (r, left_col)); | 2712 | WSET (w, left_col, r->left_col); |
| 2715 | resize_root_window (window, delta, Qt, Qnil); | 2713 | resize_root_window (window, delta, Qt, Qnil); |
| 2716 | if (window_resize_check (w, 1)) | 2714 | if (window_resize_check (w, 1)) |
| 2717 | window_resize_apply (w, 1); | 2715 | window_resize_apply (w, 1); |
| @@ -2734,43 +2732,43 @@ window-start value is reasonable when this function is called. */) | |||
| 2734 | } | 2732 | } |
| 2735 | 2733 | ||
| 2736 | /* Cleanly unlink WINDOW from window-tree. */ | 2734 | /* Cleanly unlink WINDOW from window-tree. */ |
| 2737 | if (!NILP (WGET (w, prev))) | 2735 | if (!NILP (w->prev)) |
| 2738 | /* Get SIBLING above (on the left of) WINDOW. */ | 2736 | /* Get SIBLING above (on the left of) WINDOW. */ |
| 2739 | { | 2737 | { |
| 2740 | sibling = WGET (w, prev); | 2738 | sibling = w->prev; |
| 2741 | s = XWINDOW (sibling); | 2739 | s = XWINDOW (sibling); |
| 2742 | WSET (s, next, WGET (w, next)); | 2740 | WSET (s, next, w->next); |
| 2743 | if (!NILP (WGET (s, next))) | 2741 | if (!NILP (s->next)) |
| 2744 | WSET (XWINDOW (WGET (s, next)), prev, sibling); | 2742 | WSET (XWINDOW (s->next), prev, sibling); |
| 2745 | } | 2743 | } |
| 2746 | else | 2744 | else |
| 2747 | /* Get SIBLING below (on the right of) WINDOW. */ | 2745 | /* Get SIBLING below (on the right of) WINDOW. */ |
| 2748 | { | 2746 | { |
| 2749 | sibling = WGET (w, next); | 2747 | sibling = w->next; |
| 2750 | s = XWINDOW (sibling); | 2748 | s = XWINDOW (sibling); |
| 2751 | WSET (s, prev, Qnil); | 2749 | WSET (s, prev, Qnil); |
| 2752 | if (!NILP (WGET (XWINDOW (WGET (w, parent)), vchild))) | 2750 | if (!NILP (XWINDOW (w->parent)->vchild)) |
| 2753 | WSET (XWINDOW (WGET (w, parent)), vchild, sibling); | 2751 | WSET (XWINDOW (w->parent), vchild, sibling); |
| 2754 | else | 2752 | else |
| 2755 | WSET (XWINDOW (WGET (w, parent)), hchild, sibling); | 2753 | WSET (XWINDOW (w->parent), hchild, sibling); |
| 2756 | } | 2754 | } |
| 2757 | 2755 | ||
| 2758 | /* Delete ROOT and all child windows of ROOT. */ | 2756 | /* Delete ROOT and all child windows of ROOT. */ |
| 2759 | if (!NILP (WGET (r, vchild))) | 2757 | if (!NILP (r->vchild)) |
| 2760 | { | 2758 | { |
| 2761 | delete_all_child_windows (WGET (r, vchild)); | 2759 | delete_all_child_windows (r->vchild); |
| 2762 | WSET (r, vchild, Qnil); | 2760 | WSET (r, vchild, Qnil); |
| 2763 | } | 2761 | } |
| 2764 | else if (!NILP (WGET (r, hchild))) | 2762 | else if (!NILP (r->hchild)) |
| 2765 | { | 2763 | { |
| 2766 | delete_all_child_windows (WGET (r, hchild)); | 2764 | delete_all_child_windows (r->hchild); |
| 2767 | WSET (r, hchild, Qnil); | 2765 | WSET (r, hchild, Qnil); |
| 2768 | } | 2766 | } |
| 2769 | 2767 | ||
| 2770 | replace_window (root, window, 1); | 2768 | replace_window (root, window, 1); |
| 2771 | 2769 | ||
| 2772 | /* This must become SWINDOW anyway ....... */ | 2770 | /* This must become SWINDOW anyway ....... */ |
| 2773 | if (!NILP (WGET (w, buffer)) && !resize_failed) | 2771 | if (!NILP (w->buffer) && !resize_failed) |
| 2774 | { | 2772 | { |
| 2775 | /* Try to minimize scrolling, by setting the window start to the | 2773 | /* Try to minimize scrolling, by setting the window start to the |
| 2776 | point will cause the text at the old window start to be at the | 2774 | point will cause the text at the old window start to be at the |
| @@ -2779,18 +2777,18 @@ window-start value is reasonable when this function is called. */) | |||
| 2779 | when the display is not current, due to typeahead). */ | 2777 | when the display is not current, due to typeahead). */ |
| 2780 | new_top = WINDOW_TOP_EDGE_LINE (w) - FRAME_TOP_MARGIN (XFRAME (WINDOW_FRAME (w))); | 2778 | new_top = WINDOW_TOP_EDGE_LINE (w) - FRAME_TOP_MARGIN (XFRAME (WINDOW_FRAME (w))); |
| 2781 | if (new_top != top | 2779 | if (new_top != top |
| 2782 | && startpos >= BUF_BEGV (XBUFFER (WGET (w, buffer))) | 2780 | && startpos >= BUF_BEGV (XBUFFER (w->buffer)) |
| 2783 | && startpos <= BUF_ZV (XBUFFER (WGET (w, buffer)))) | 2781 | && startpos <= BUF_ZV (XBUFFER (w->buffer))) |
| 2784 | { | 2782 | { |
| 2785 | struct position pos; | 2783 | struct position pos; |
| 2786 | struct buffer *obuf = current_buffer; | 2784 | struct buffer *obuf = current_buffer; |
| 2787 | 2785 | ||
| 2788 | Fset_buffer (WGET (w, buffer)); | 2786 | Fset_buffer (w->buffer); |
| 2789 | /* This computation used to temporarily move point, but that | 2787 | /* This computation used to temporarily move point, but that |
| 2790 | can have unwanted side effects due to text properties. */ | 2788 | can have unwanted side effects due to text properties. */ |
| 2791 | pos = *vmotion (startpos, -top, w); | 2789 | pos = *vmotion (startpos, -top, w); |
| 2792 | 2790 | ||
| 2793 | set_marker_both (WGET (w, start), WGET (w, buffer), pos.bufpos, pos.bytepos); | 2791 | set_marker_both (w->start, w->buffer, pos.bufpos, pos.bytepos); |
| 2794 | WSET (w, window_end_valid, Qnil); | 2792 | WSET (w, window_end_valid, Qnil); |
| 2795 | w->start_at_line_beg = (pos.bytepos == BEGV_BYTE | 2793 | w->start_at_line_beg = (pos.bytepos == BEGV_BYTE |
| 2796 | || FETCH_BYTE (pos.bytepos - 1) == '\n'); | 2794 | || FETCH_BYTE (pos.bytepos - 1) == '\n'); |
| @@ -2987,7 +2985,7 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int | |||
| 2987 | struct window *w = XWINDOW (window); | 2985 | struct window *w = XWINDOW (window); |
| 2988 | struct buffer *b = XBUFFER (buffer); | 2986 | struct buffer *b = XBUFFER (buffer); |
| 2989 | ptrdiff_t count = SPECPDL_INDEX (); | 2987 | ptrdiff_t count = SPECPDL_INDEX (); |
| 2990 | int samebuf = EQ (buffer, WGET (w, buffer)); | 2988 | int samebuf = EQ (buffer, w->buffer); |
| 2991 | 2989 | ||
| 2992 | WSET (w, buffer, buffer); | 2990 | WSET (w, buffer, buffer); |
| 2993 | 2991 | ||
| @@ -3017,8 +3015,8 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int | |||
| 3017 | whenever we resize the frame. */ | 3015 | whenever we resize the frame. */ |
| 3018 | w->hscroll = w->min_hscroll = 0; | 3016 | w->hscroll = w->min_hscroll = 0; |
| 3019 | w->vscroll = 0; | 3017 | w->vscroll = 0; |
| 3020 | set_marker_both (WGET (w, pointm), buffer, BUF_PT (b), BUF_PT_BYTE (b)); | 3018 | set_marker_both (w->pointm, buffer, BUF_PT (b), BUF_PT_BYTE (b)); |
| 3021 | set_marker_restricted (WGET (w, start), | 3019 | set_marker_restricted (w->start, |
| 3022 | make_number (b->last_window_start), | 3020 | make_number (b->last_window_start), |
| 3023 | buffer); | 3021 | buffer); |
| 3024 | w->start_at_line_beg = 0; | 3022 | w->start_at_line_beg = 0; |
| @@ -3039,7 +3037,7 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int | |||
| 3039 | Fset_buffer (buffer); | 3037 | Fset_buffer (buffer); |
| 3040 | } | 3038 | } |
| 3041 | 3039 | ||
| 3042 | XMARKER (WGET (w, pointm))->insertion_type = !NILP (Vwindow_point_insertion_type); | 3040 | XMARKER (w->pointm)->insertion_type = !NILP (Vwindow_point_insertion_type); |
| 3043 | 3041 | ||
| 3044 | if (!keep_margins_p) | 3042 | if (!keep_margins_p) |
| 3045 | { | 3043 | { |
| @@ -3047,8 +3045,8 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int | |||
| 3047 | 3045 | ||
| 3048 | /* This may call adjust_window_margins three times, so | 3046 | /* This may call adjust_window_margins three times, so |
| 3049 | temporarily disable window margins. */ | 3047 | temporarily disable window margins. */ |
| 3050 | Lisp_Object save_left = WGET (w, left_margin_cols); | 3048 | Lisp_Object save_left = w->left_margin_cols; |
| 3051 | Lisp_Object save_right = WGET (w, right_margin_cols); | 3049 | Lisp_Object save_right = w->right_margin_cols; |
| 3052 | 3050 | ||
| 3053 | WSET (w, left_margin_cols, Qnil); | 3051 | WSET (w, left_margin_cols, Qnil); |
| 3054 | WSET (w, right_margin_cols, Qnil); | 3052 | WSET (w, right_margin_cols, Qnil); |
| @@ -3072,7 +3070,7 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int | |||
| 3072 | { | 3070 | { |
| 3073 | if (! NILP (Vwindow_scroll_functions)) | 3071 | if (! NILP (Vwindow_scroll_functions)) |
| 3074 | run_hook_with_args_2 (Qwindow_scroll_functions, window, | 3072 | run_hook_with_args_2 (Qwindow_scroll_functions, window, |
| 3075 | Fmarker_position (WGET (w, start))); | 3073 | Fmarker_position (w->start)); |
| 3076 | run_window_configuration_change_hook (XFRAME (WINDOW_FRAME (w))); | 3074 | run_window_configuration_change_hook (XFRAME (WINDOW_FRAME (w))); |
| 3077 | } | 3075 | } |
| 3078 | 3076 | ||
| @@ -3106,7 +3104,7 @@ This function runs `window-scroll-functions' before running | |||
| 3106 | if (NILP (BVAR (XBUFFER (buffer), name))) | 3104 | if (NILP (BVAR (XBUFFER (buffer), name))) |
| 3107 | error ("Attempt to display deleted buffer"); | 3105 | error ("Attempt to display deleted buffer"); |
| 3108 | 3106 | ||
| 3109 | tem = WGET (w, buffer); | 3107 | tem = w->buffer; |
| 3110 | if (NILP (tem)) | 3108 | if (NILP (tem)) |
| 3111 | error ("Window is deleted"); | 3109 | error ("Window is deleted"); |
| 3112 | else if (!EQ (tem, Qt)) | 3110 | else if (!EQ (tem, Qt)) |
| @@ -3114,7 +3112,7 @@ This function runs `window-scroll-functions' before running | |||
| 3114 | { | 3112 | { |
| 3115 | if (!EQ (tem, buffer)) | 3113 | if (!EQ (tem, buffer)) |
| 3116 | { | 3114 | { |
| 3117 | if (EQ (WGET (w, dedicated), Qt)) | 3115 | if (EQ (w->dedicated, Qt)) |
| 3118 | /* WINDOW is strongly dedicated to its buffer, signal an | 3116 | /* WINDOW is strongly dedicated to its buffer, signal an |
| 3119 | error. */ | 3117 | error. */ |
| 3120 | error ("Window is dedicated to `%s'", SDATA (BVAR (XBUFFER (tem), name))); | 3118 | error ("Window is dedicated to `%s'", SDATA (BVAR (XBUFFER (tem), name))); |
| @@ -3160,8 +3158,8 @@ displaying that buffer. */) | |||
| 3160 | struct window *w = XWINDOW (object); | 3158 | struct window *w = XWINDOW (object); |
| 3161 | mark_window_display_accurate (object, 0); | 3159 | mark_window_display_accurate (object, 0); |
| 3162 | w->update_mode_line = 1; | 3160 | w->update_mode_line = 1; |
| 3163 | if (BUFFERP (WGET (w, buffer))) | 3161 | if (BUFFERP (w->buffer)) |
| 3164 | XBUFFER (WGET (w, buffer))->prevent_redisplay_optimizations_p = 1; | 3162 | XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1; |
| 3165 | ++update_mode_lines; | 3163 | ++update_mode_lines; |
| 3166 | return Qt; | 3164 | return Qt; |
| 3167 | } | 3165 | } |
| @@ -3206,14 +3204,14 @@ temp_output_buffer_show (register Lisp_Object buf) | |||
| 3206 | { | 3204 | { |
| 3207 | window = display_buffer (buf, Qnil, Qnil); | 3205 | window = display_buffer (buf, Qnil, Qnil); |
| 3208 | 3206 | ||
| 3209 | if (!EQ (WGET (XWINDOW (window), frame), selected_frame)) | 3207 | if (!EQ (XWINDOW (window)->frame, selected_frame)) |
| 3210 | Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window))); | 3208 | Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window))); |
| 3211 | Vminibuf_scroll_window = window; | 3209 | Vminibuf_scroll_window = window; |
| 3212 | w = XWINDOW (window); | 3210 | w = XWINDOW (window); |
| 3213 | w->hscroll = 0; | 3211 | w->hscroll = 0; |
| 3214 | w->min_hscroll = 0; | 3212 | w->min_hscroll = 0; |
| 3215 | set_marker_restricted_both (WGET (w, start), buf, BEG, BEG); | 3213 | set_marker_restricted_both (w->start, buf, BEG, BEG); |
| 3216 | set_marker_restricted_both (WGET (w, pointm), buf, BEG, BEG); | 3214 | set_marker_restricted_both (w->pointm, buf, BEG, BEG); |
| 3217 | 3215 | ||
| 3218 | /* Run temp-buffer-show-hook, with the chosen window selected | 3216 | /* Run temp-buffer-show-hook, with the chosen window selected |
| 3219 | and its buffer current. */ | 3217 | and its buffer current. */ |
| @@ -3230,7 +3228,7 @@ temp_output_buffer_show (register Lisp_Object buf) | |||
| 3230 | record_unwind_protect (Fset_buffer, prev_buffer); | 3228 | record_unwind_protect (Fset_buffer, prev_buffer); |
| 3231 | record_unwind_protect (select_window_norecord, prev_window); | 3229 | record_unwind_protect (select_window_norecord, prev_window); |
| 3232 | Fselect_window (window, Qt); | 3230 | Fselect_window (window, Qt); |
| 3233 | Fset_buffer (WGET (w, buffer)); | 3231 | Fset_buffer (w->buffer); |
| 3234 | Frun_hooks (1, &Qtemp_buffer_show_hook); | 3232 | Frun_hooks (1, &Qtemp_buffer_show_hook); |
| 3235 | unbind_to (count, Qnil); | 3233 | unbind_to (count, Qnil); |
| 3236 | } | 3234 | } |
| @@ -3334,9 +3332,9 @@ Note: This function does not operate on any child windows of WINDOW. */) | |||
| 3334 | if (NILP (add)) | 3332 | if (NILP (add)) |
| 3335 | WSET (w, new_total, size); | 3333 | WSET (w, new_total, size); |
| 3336 | else | 3334 | else |
| 3337 | WSET (w, new_total, make_number (XINT (WGET (w, new_total)) + XINT (size))); | 3335 | WSET (w, new_total, make_number (XINT (w->new_total) + XINT (size))); |
| 3338 | 3336 | ||
| 3339 | return WGET (w, new_total); | 3337 | return w->new_total; |
| 3340 | } | 3338 | } |
| 3341 | 3339 | ||
| 3342 | DEFUN ("set-window-new-normal", Fset_window_new_normal, Sset_window_new_normal, 1, 2, 0, | 3340 | DEFUN ("set-window-new-normal", Fset_window_new_normal, Sset_window_new_normal, 1, 2, 0, |
| @@ -3361,19 +3359,19 @@ window_resize_check (struct window *w, int horflag) | |||
| 3361 | { | 3359 | { |
| 3362 | struct window *c; | 3360 | struct window *c; |
| 3363 | 3361 | ||
| 3364 | if (!NILP (WGET (w, vchild))) | 3362 | if (!NILP (w->vchild)) |
| 3365 | /* W is a vertical combination. */ | 3363 | /* W is a vertical combination. */ |
| 3366 | { | 3364 | { |
| 3367 | c = XWINDOW (WGET (w, vchild)); | 3365 | c = XWINDOW (w->vchild); |
| 3368 | if (horflag) | 3366 | if (horflag) |
| 3369 | /* All child windows of W must have the same width as W. */ | 3367 | /* All child windows of W must have the same width as W. */ |
| 3370 | { | 3368 | { |
| 3371 | while (c) | 3369 | while (c) |
| 3372 | { | 3370 | { |
| 3373 | if ((XINT (WGET (c, new_total)) != XINT (WGET (w, new_total))) | 3371 | if ((XINT (c->new_total) != XINT (w->new_total)) |
| 3374 | || !window_resize_check (c, horflag)) | 3372 | || !window_resize_check (c, horflag)) |
| 3375 | return 0; | 3373 | return 0; |
| 3376 | c = NILP (WGET (c, next)) ? 0 : XWINDOW (WGET (c, next)); | 3374 | c = NILP (c->next) ? 0 : XWINDOW (c->next); |
| 3377 | } | 3375 | } |
| 3378 | return 1; | 3376 | return 1; |
| 3379 | } | 3377 | } |
| @@ -3386,16 +3384,16 @@ window_resize_check (struct window *w, int horflag) | |||
| 3386 | { | 3384 | { |
| 3387 | if (!window_resize_check (c, horflag)) | 3385 | if (!window_resize_check (c, horflag)) |
| 3388 | return 0; | 3386 | return 0; |
| 3389 | sum_of_sizes = sum_of_sizes + XINT (WGET (c, new_total)); | 3387 | sum_of_sizes = sum_of_sizes + XINT (c->new_total); |
| 3390 | c = NILP (WGET (c, next)) ? 0 : XWINDOW (WGET (c, next)); | 3388 | c = NILP (c->next) ? 0 : XWINDOW (c->next); |
| 3391 | } | 3389 | } |
| 3392 | return (sum_of_sizes == XINT (WGET (w, new_total))); | 3390 | return (sum_of_sizes == XINT (w->new_total)); |
| 3393 | } | 3391 | } |
| 3394 | } | 3392 | } |
| 3395 | else if (!NILP (WGET (w, hchild))) | 3393 | else if (!NILP (w->hchild)) |
| 3396 | /* W is a horizontal combination. */ | 3394 | /* W is a horizontal combination. */ |
| 3397 | { | 3395 | { |
| 3398 | c = XWINDOW (WGET (w, hchild)); | 3396 | c = XWINDOW (w->hchild); |
| 3399 | if (horflag) | 3397 | if (horflag) |
| 3400 | /* The sum of the widths of the child windows of W must equal W's | 3398 | /* The sum of the widths of the child windows of W must equal W's |
| 3401 | width. */ | 3399 | width. */ |
| @@ -3405,20 +3403,20 @@ window_resize_check (struct window *w, int horflag) | |||
| 3405 | { | 3403 | { |
| 3406 | if (!window_resize_check (c, horflag)) | 3404 | if (!window_resize_check (c, horflag)) |
| 3407 | return 0; | 3405 | return 0; |
| 3408 | sum_of_sizes = sum_of_sizes + XINT (WGET (c, new_total)); | 3406 | sum_of_sizes = sum_of_sizes + XINT (c->new_total); |
| 3409 | c = NILP (WGET (c, next)) ? 0 : XWINDOW (WGET (c, next)); | 3407 | c = NILP (c->next) ? 0 : XWINDOW (c->next); |
| 3410 | } | 3408 | } |
| 3411 | return (sum_of_sizes == XINT (WGET (w, new_total))); | 3409 | return (sum_of_sizes == XINT (w->new_total)); |
| 3412 | } | 3410 | } |
| 3413 | else | 3411 | else |
| 3414 | /* All child windows of W must have the same height as W. */ | 3412 | /* All child windows of W must have the same height as W. */ |
| 3415 | { | 3413 | { |
| 3416 | while (c) | 3414 | while (c) |
| 3417 | { | 3415 | { |
| 3418 | if ((XINT (WGET (c, new_total)) != XINT (WGET (w, new_total))) | 3416 | if ((XINT (c->new_total) != XINT (w->new_total)) |
| 3419 | || !window_resize_check (c, horflag)) | 3417 | || !window_resize_check (c, horflag)) |
| 3420 | return 0; | 3418 | return 0; |
| 3421 | c = NILP (WGET (c, next)) ? 0 : XWINDOW (WGET (c, next)); | 3419 | c = NILP (c->next) ? 0 : XWINDOW (c->next); |
| 3422 | } | 3420 | } |
| 3423 | return 1; | 3421 | return 1; |
| 3424 | } | 3422 | } |
| @@ -3427,7 +3425,7 @@ window_resize_check (struct window *w, int horflag) | |||
| 3427 | /* A leaf window. Make sure it's not too small. The following | 3425 | /* A leaf window. Make sure it's not too small. The following |
| 3428 | hardcodes the values of `window-safe-min-width' (2) and | 3426 | hardcodes the values of `window-safe-min-width' (2) and |
| 3429 | `window-safe-min-height' (1) which are defined in window.el. */ | 3427 | `window-safe-min-height' (1) which are defined in window.el. */ |
| 3430 | return XINT (WGET (w, new_total)) >= (horflag ? 2 : 1); | 3428 | return XINT (w->new_total) >= (horflag ? 2 : 1); |
| 3431 | } | 3429 | } |
| 3432 | 3430 | ||
| 3433 | /* Set w->total_lines (w->total_cols if HORIZONTAL is non-zero) to | 3431 | /* Set w->total_lines (w->total_cols if HORIZONTAL is non-zero) to |
| @@ -3447,25 +3445,25 @@ window_resize_apply (struct window *w, int horflag) | |||
| 3447 | parent window has been set *before*. */ | 3445 | parent window has been set *before*. */ |
| 3448 | if (horflag) | 3446 | if (horflag) |
| 3449 | { | 3447 | { |
| 3450 | WSET (w, total_cols, WGET (w, new_total)); | 3448 | WSET (w, total_cols, w->new_total); |
| 3451 | if (NUMBERP (WGET (w, new_normal))) | 3449 | if (NUMBERP (w->new_normal)) |
| 3452 | WSET (w, normal_cols, WGET (w, new_normal)); | 3450 | WSET (w, normal_cols, w->new_normal); |
| 3453 | 3451 | ||
| 3454 | pos = XINT (WGET (w, left_col)); | 3452 | pos = XINT (w->left_col); |
| 3455 | } | 3453 | } |
| 3456 | else | 3454 | else |
| 3457 | { | 3455 | { |
| 3458 | WSET (w, total_lines, WGET (w, new_total)); | 3456 | WSET (w, total_lines, w->new_total); |
| 3459 | if (NUMBERP (WGET (w, new_normal))) | 3457 | if (NUMBERP (w->new_normal)) |
| 3460 | WSET (w, normal_lines, WGET (w, new_normal)); | 3458 | WSET (w, normal_lines, w->new_normal); |
| 3461 | 3459 | ||
| 3462 | pos = XINT (WGET (w, top_line)); | 3460 | pos = XINT (w->top_line); |
| 3463 | } | 3461 | } |
| 3464 | 3462 | ||
| 3465 | if (!NILP (WGET (w, vchild))) | 3463 | if (!NILP (w->vchild)) |
| 3466 | /* W is a vertical combination. */ | 3464 | /* W is a vertical combination. */ |
| 3467 | { | 3465 | { |
| 3468 | c = XWINDOW (WGET (w, vchild)); | 3466 | c = XWINDOW (w->vchild); |
| 3469 | while (c) | 3467 | while (c) |
| 3470 | { | 3468 | { |
| 3471 | if (horflag) | 3469 | if (horflag) |
| @@ -3474,14 +3472,14 @@ window_resize_apply (struct window *w, int horflag) | |||
| 3474 | WSET (c, top_line, make_number (pos)); | 3472 | WSET (c, top_line, make_number (pos)); |
| 3475 | window_resize_apply (c, horflag); | 3473 | window_resize_apply (c, horflag); |
| 3476 | if (!horflag) | 3474 | if (!horflag) |
| 3477 | pos = pos + XINT (WGET (c, total_lines)); | 3475 | pos = pos + XINT (c->total_lines); |
| 3478 | c = NILP (WGET (c, next)) ? 0 : XWINDOW (WGET (c, next)); | 3476 | c = NILP (c->next) ? 0 : XWINDOW (c->next); |
| 3479 | } | 3477 | } |
| 3480 | } | 3478 | } |
| 3481 | else if (!NILP (WGET (w, hchild))) | 3479 | else if (!NILP (w->hchild)) |
| 3482 | /* W is a horizontal combination. */ | 3480 | /* W is a horizontal combination. */ |
| 3483 | { | 3481 | { |
| 3484 | c = XWINDOW (WGET (w, hchild)); | 3482 | c = XWINDOW (w->hchild); |
| 3485 | while (c) | 3483 | while (c) |
| 3486 | { | 3484 | { |
| 3487 | if (horflag) | 3485 | if (horflag) |
| @@ -3490,8 +3488,8 @@ window_resize_apply (struct window *w, int horflag) | |||
| 3490 | WSET (c, top_line, make_number (pos)); | 3488 | WSET (c, top_line, make_number (pos)); |
| 3491 | window_resize_apply (c, horflag); | 3489 | window_resize_apply (c, horflag); |
| 3492 | if (horflag) | 3490 | if (horflag) |
| 3493 | pos = pos + XINT (WGET (c, total_cols)); | 3491 | pos = pos + XINT (c->total_cols); |
| 3494 | c = NILP (WGET (c, next)) ? 0 : XWINDOW (WGET (c, next)); | 3492 | c = NILP (c->next) ? 0 : XWINDOW (c->next); |
| 3495 | } | 3493 | } |
| 3496 | } | 3494 | } |
| 3497 | 3495 | ||
| @@ -3527,8 +3525,8 @@ be applied on the Elisp level. */) | |||
| 3527 | r = XWINDOW (FRAME_ROOT_WINDOW (f)); | 3525 | r = XWINDOW (FRAME_ROOT_WINDOW (f)); |
| 3528 | 3526 | ||
| 3529 | if (!window_resize_check (r, horflag) | 3527 | if (!window_resize_check (r, horflag) |
| 3530 | || ! EQ (WGET (r, new_total), | 3528 | || ! EQ (r->new_total, |
| 3531 | (horflag ? WGET (r, total_cols) : WGET (r, total_lines)))) | 3529 | (horflag ? r->total_cols : r->total_lines))) |
| 3532 | return Qnil; | 3530 | return Qnil; |
| 3533 | 3531 | ||
| 3534 | BLOCK_INPUT; | 3532 | BLOCK_INPUT; |
| @@ -3569,7 +3567,7 @@ resize_frame_windows (struct frame *f, int size, int horflag) | |||
| 3569 | ? 1 : 0))); | 3567 | ? 1 : 0))); |
| 3570 | 3568 | ||
| 3571 | WSET (r, top_line, make_number (FRAME_TOP_MARGIN (f))); | 3569 | WSET (r, top_line, make_number (FRAME_TOP_MARGIN (f))); |
| 3572 | if (NILP (WGET (r, vchild)) && NILP (WGET (r, hchild))) | 3570 | if (NILP (r->vchild) && NILP (r->hchild)) |
| 3573 | /* For a leaf root window just set the size. */ | 3571 | /* For a leaf root window just set the size. */ |
| 3574 | if (horflag) | 3572 | if (horflag) |
| 3575 | WSET (r, total_cols, make_number (new_size)); | 3573 | WSET (r, total_cols, make_number (new_size)); |
| @@ -3578,29 +3576,29 @@ resize_frame_windows (struct frame *f, int size, int horflag) | |||
| 3578 | else | 3576 | else |
| 3579 | { | 3577 | { |
| 3580 | /* old_size is the old size of the frame's root window. */ | 3578 | /* old_size is the old size of the frame's root window. */ |
| 3581 | int old_size = XFASTINT (horflag ? WGET (r, total_cols) | 3579 | int old_size = XFASTINT (horflag ? r->total_cols |
| 3582 | : WGET (r, total_lines)); | 3580 | : r->total_lines); |
| 3583 | Lisp_Object delta; | 3581 | Lisp_Object delta; |
| 3584 | 3582 | ||
| 3585 | XSETINT (delta, new_size - old_size); | 3583 | XSETINT (delta, new_size - old_size); |
| 3586 | /* Try a "normal" resize first. */ | 3584 | /* Try a "normal" resize first. */ |
| 3587 | resize_root_window (root, delta, horflag ? Qt : Qnil, Qnil); | 3585 | resize_root_window (root, delta, horflag ? Qt : Qnil, Qnil); |
| 3588 | if (window_resize_check (r, horflag) | 3586 | if (window_resize_check (r, horflag) |
| 3589 | && new_size == XINT (WGET (r, new_total))) | 3587 | && new_size == XINT (r->new_total)) |
| 3590 | window_resize_apply (r, horflag); | 3588 | window_resize_apply (r, horflag); |
| 3591 | else | 3589 | else |
| 3592 | { | 3590 | { |
| 3593 | /* Try with "reasonable" minimum sizes next. */ | 3591 | /* Try with "reasonable" minimum sizes next. */ |
| 3594 | resize_root_window (root, delta, horflag ? Qt : Qnil, Qt); | 3592 | resize_root_window (root, delta, horflag ? Qt : Qnil, Qt); |
| 3595 | if (window_resize_check (r, horflag) | 3593 | if (window_resize_check (r, horflag) |
| 3596 | && new_size == XINT (WGET (r, new_total))) | 3594 | && new_size == XINT (r->new_total)) |
| 3597 | window_resize_apply (r, horflag); | 3595 | window_resize_apply (r, horflag); |
| 3598 | else | 3596 | else |
| 3599 | { | 3597 | { |
| 3600 | /* Finally, try with "safe" minimum sizes. */ | 3598 | /* Finally, try with "safe" minimum sizes. */ |
| 3601 | resize_root_window (root, delta, horflag ? Qt : Qnil, Qsafe); | 3599 | resize_root_window (root, delta, horflag ? Qt : Qnil, Qsafe); |
| 3602 | if (window_resize_check (r, horflag) | 3600 | if (window_resize_check (r, horflag) |
| 3603 | && new_size == XINT (WGET (r, new_total))) | 3601 | && new_size == XINT (r->new_total)) |
| 3604 | window_resize_apply (r, horflag); | 3602 | window_resize_apply (r, horflag); |
| 3605 | else | 3603 | else |
| 3606 | { | 3604 | { |
| @@ -3627,7 +3625,7 @@ resize_frame_windows (struct frame *f, int size, int horflag) | |||
| 3627 | /* Are we sure we always want 1 line here? */ | 3625 | /* Are we sure we always want 1 line here? */ |
| 3628 | WSET (m, total_lines, make_number (1)); | 3626 | WSET (m, total_lines, make_number (1)); |
| 3629 | WSET (m, top_line, | 3627 | WSET (m, top_line, |
| 3630 | make_number (XINT (WGET (r, top_line)) + XINT (WGET (r, total_lines)))); | 3628 | make_number (XINT (r->top_line) + XINT (r->total_lines))); |
| 3631 | } | 3629 | } |
| 3632 | } | 3630 | } |
| 3633 | } | 3631 | } |
| @@ -3683,10 +3681,10 @@ set correctly. See the code of `split-window' for how this is done. */) | |||
| 3683 | parent, or OLD is ortho-combined. */ | 3681 | parent, or OLD is ortho-combined. */ |
| 3684 | combination_limit = | 3682 | combination_limit = |
| 3685 | !NILP (Vwindow_combination_limit) | 3683 | !NILP (Vwindow_combination_limit) |
| 3686 | || NILP (WGET (o, parent)) | 3684 | || NILP (o->parent) |
| 3687 | || NILP (horflag | 3685 | || NILP (horflag |
| 3688 | ? (WGET (XWINDOW (WGET (o, parent)), hchild)) | 3686 | ? (XWINDOW (o->parent)->hchild) |
| 3689 | : (WGET (XWINDOW (WGET (o, parent)), vchild))); | 3687 | : (XWINDOW (o->parent)->vchild)); |
| 3690 | 3688 | ||
| 3691 | /* We need a live reference window to initialize some parameters. */ | 3689 | /* We need a live reference window to initialize some parameters. */ |
| 3692 | if (WINDOW_LIVE_P (old)) | 3690 | if (WINDOW_LIVE_P (old)) |
| @@ -3706,24 +3704,24 @@ set correctly. See the code of `split-window' for how this is done. */) | |||
| 3706 | /* `window-combination-resize' non-nil means try to resize OLD's siblings | 3704 | /* `window-combination-resize' non-nil means try to resize OLD's siblings |
| 3707 | proportionally. */ | 3705 | proportionally. */ |
| 3708 | { | 3706 | { |
| 3709 | p = XWINDOW (WGET (o, parent)); | 3707 | p = XWINDOW (o->parent); |
| 3710 | /* Temporarily pretend we split the parent window. */ | 3708 | /* Temporarily pretend we split the parent window. */ |
| 3711 | WSET (p, new_total, | 3709 | WSET (p, new_total, |
| 3712 | make_number (XINT (horflag ? WGET (p, total_cols) : WGET (p, total_lines)) | 3710 | make_number (XINT (horflag ? p->total_cols : p->total_lines) |
| 3713 | - XINT (total_size))); | 3711 | - XINT (total_size))); |
| 3714 | if (!window_resize_check (p, horflag)) | 3712 | if (!window_resize_check (p, horflag)) |
| 3715 | error ("Window sizes don't fit"); | 3713 | error ("Window sizes don't fit"); |
| 3716 | else | 3714 | else |
| 3717 | /* Undo the temporary pretension. */ | 3715 | /* Undo the temporary pretension. */ |
| 3718 | WSET (p, new_total, | 3716 | WSET (p, new_total, |
| 3719 | horflag ? WGET (p, total_cols) : WGET (p, total_lines)); | 3717 | horflag ? p->total_cols : p->total_lines); |
| 3720 | } | 3718 | } |
| 3721 | else | 3719 | else |
| 3722 | { | 3720 | { |
| 3723 | if (!window_resize_check (o, horflag)) | 3721 | if (!window_resize_check (o, horflag)) |
| 3724 | error ("Resizing old window failed"); | 3722 | error ("Resizing old window failed"); |
| 3725 | else if (XINT (total_size) + XINT (WGET (o, new_total)) | 3723 | else if (XINT (total_size) + XINT (o->new_total) |
| 3726 | != XINT (horflag ? WGET (o, total_cols) : WGET (o, total_lines))) | 3724 | != XINT (horflag ? o->total_cols : o->total_lines)) |
| 3727 | error ("Sum of sizes of old and new window don't fit"); | 3725 | error ("Sum of sizes of old and new window don't fit"); |
| 3728 | } | 3726 | } |
| 3729 | 3727 | ||
| @@ -3734,48 +3732,47 @@ set correctly. See the code of `split-window' for how this is done. */) | |||
| 3734 | by make_parent_window and we need it below for assigning it to | 3732 | by make_parent_window and we need it below for assigning it to |
| 3735 | p->new_normal. */ | 3733 | p->new_normal. */ |
| 3736 | Lisp_Object new_normal | 3734 | Lisp_Object new_normal |
| 3737 | = horflag ? WGET (o, normal_cols) : WGET (o, normal_lines); | 3735 | = horflag ? o->normal_cols : o->normal_lines; |
| 3738 | 3736 | ||
| 3739 | make_parent_window (old, horflag); | 3737 | make_parent_window (old, horflag); |
| 3740 | p = XWINDOW (WGET (o, parent)); | 3738 | p = XWINDOW (o->parent); |
| 3741 | /* Store value of `window-combination-limit' in new parent's | 3739 | /* Store value of `window-combination-limit' in new parent's |
| 3742 | combination_limit slot. */ | 3740 | combination_limit slot. */ |
| 3743 | WSET (p, combination_limit, Vwindow_combination_limit); | 3741 | WSET (p, combination_limit, Vwindow_combination_limit); |
| 3744 | /* These get applied below. */ | 3742 | /* These get applied below. */ |
| 3745 | WSET (p, new_total, | 3743 | WSET (p, new_total, horflag ? o->total_cols : o->total_lines); |
| 3746 | horflag ? WGET (o, total_cols) : WGET (o, total_lines)); | ||
| 3747 | WSET (p, new_normal, new_normal); | 3744 | WSET (p, new_normal, new_normal); |
| 3748 | } | 3745 | } |
| 3749 | else | 3746 | else |
| 3750 | p = XWINDOW (WGET (o, parent)); | 3747 | p = XWINDOW (o->parent); |
| 3751 | 3748 | ||
| 3752 | windows_or_buffers_changed++; | 3749 | windows_or_buffers_changed++; |
| 3753 | FRAME_WINDOW_SIZES_CHANGED (f) = 1; | 3750 | FRAME_WINDOW_SIZES_CHANGED (f) = 1; |
| 3754 | new = make_window (); | 3751 | new = make_window (); |
| 3755 | n = XWINDOW (new); | 3752 | n = XWINDOW (new); |
| 3756 | WSET (n, frame, frame); | 3753 | WSET (n, frame, frame); |
| 3757 | WSET (n, parent, WGET (o, parent)); | 3754 | WSET (n, parent, o->parent); |
| 3758 | WSET (n, vchild, Qnil); | 3755 | WSET (n, vchild, Qnil); |
| 3759 | WSET (n, hchild, Qnil); | 3756 | WSET (n, hchild, Qnil); |
| 3760 | 3757 | ||
| 3761 | if (EQ (side, Qabove) || EQ (side, Qleft)) | 3758 | if (EQ (side, Qabove) || EQ (side, Qleft)) |
| 3762 | { | 3759 | { |
| 3763 | WSET (n, prev, WGET (o, prev)); | 3760 | WSET (n, prev, o->prev); |
| 3764 | if (NILP (WGET (n, prev))) | 3761 | if (NILP (n->prev)) |
| 3765 | if (horflag) | 3762 | if (horflag) |
| 3766 | WSET (p, hchild, new); | 3763 | WSET (p, hchild, new); |
| 3767 | else | 3764 | else |
| 3768 | WSET (p, vchild, new); | 3765 | WSET (p, vchild, new); |
| 3769 | else | 3766 | else |
| 3770 | WSET (XWINDOW (WGET (n, prev)), next, new); | 3767 | WSET (XWINDOW (n->prev), next, new); |
| 3771 | WSET (n, next, old); | 3768 | WSET (n, next, old); |
| 3772 | WSET (o, prev, new); | 3769 | WSET (o, prev, new); |
| 3773 | } | 3770 | } |
| 3774 | else | 3771 | else |
| 3775 | { | 3772 | { |
| 3776 | WSET (n, next, WGET (o, next)); | 3773 | WSET (n, next, o->next); |
| 3777 | if (!NILP (WGET (n, next))) | 3774 | if (!NILP (n->next)) |
| 3778 | WSET (XWINDOW (WGET (n, next)), prev, new); | 3775 | WSET (XWINDOW (n->next), prev, new); |
| 3779 | WSET (n, prev, old); | 3776 | WSET (n, prev, old); |
| 3780 | WSET (o, next, new); | 3777 | WSET (o, next, new); |
| 3781 | } | 3778 | } |
| @@ -3785,24 +3782,24 @@ set correctly. See the code of `split-window' for how this is done. */) | |||
| 3785 | memset (&n->last_cursor, 0, sizeof n->last_cursor); | 3782 | memset (&n->last_cursor, 0, sizeof n->last_cursor); |
| 3786 | 3783 | ||
| 3787 | /* Get special geometry settings from reference window. */ | 3784 | /* Get special geometry settings from reference window. */ |
| 3788 | WSET (n, left_margin_cols, WGET (r, left_margin_cols)); | 3785 | WSET (n, left_margin_cols, r->left_margin_cols); |
| 3789 | WSET (n, right_margin_cols, WGET (r, right_margin_cols)); | 3786 | WSET (n, right_margin_cols, r->right_margin_cols); |
| 3790 | WSET (n, left_fringe_width, WGET (r, left_fringe_width)); | 3787 | WSET (n, left_fringe_width, r->left_fringe_width); |
| 3791 | WSET (n, right_fringe_width, WGET (r, right_fringe_width)); | 3788 | WSET (n, right_fringe_width, r->right_fringe_width); |
| 3792 | n->fringes_outside_margins = r->fringes_outside_margins; | 3789 | n->fringes_outside_margins = r->fringes_outside_margins; |
| 3793 | WSET (n, scroll_bar_width, WGET (r, scroll_bar_width)); | 3790 | WSET (n, scroll_bar_width, r->scroll_bar_width); |
| 3794 | WSET (n, vertical_scroll_bar_type, WGET (r, vertical_scroll_bar_type)); | 3791 | WSET (n, vertical_scroll_bar_type, r->vertical_scroll_bar_type); |
| 3795 | 3792 | ||
| 3796 | /* Directly assign orthogonal coordinates and sizes. */ | 3793 | /* Directly assign orthogonal coordinates and sizes. */ |
| 3797 | if (horflag) | 3794 | if (horflag) |
| 3798 | { | 3795 | { |
| 3799 | WSET (n, top_line, WGET (o, top_line)); | 3796 | WSET (n, top_line, o->top_line); |
| 3800 | WSET (n, total_lines, WGET (o, total_lines)); | 3797 | WSET (n, total_lines, o->total_lines); |
| 3801 | } | 3798 | } |
| 3802 | else | 3799 | else |
| 3803 | { | 3800 | { |
| 3804 | WSET (n, left_col, WGET (o, left_col)); | 3801 | WSET (n, left_col, o->left_col); |
| 3805 | WSET (n, total_cols, WGET (o, total_cols)); | 3802 | WSET (n, total_cols, o->total_cols); |
| 3806 | } | 3803 | } |
| 3807 | 3804 | ||
| 3808 | /* Iso-coordinates and sizes are assigned by window_resize_apply, | 3805 | /* Iso-coordinates and sizes are assigned by window_resize_apply, |
| @@ -3815,14 +3812,14 @@ set correctly. See the code of `split-window' for how this is done. */) | |||
| 3815 | adjust_glyphs (f); | 3812 | adjust_glyphs (f); |
| 3816 | /* Set buffer of NEW to buffer of reference window. Don't run | 3813 | /* Set buffer of NEW to buffer of reference window. Don't run |
| 3817 | any hooks. */ | 3814 | any hooks. */ |
| 3818 | set_window_buffer (new, WGET (r, buffer), 0, 1); | 3815 | set_window_buffer (new, r->buffer, 0, 1); |
| 3819 | UNBLOCK_INPUT; | 3816 | UNBLOCK_INPUT; |
| 3820 | 3817 | ||
| 3821 | /* Maybe we should run the scroll functions in Elisp (which already | 3818 | /* Maybe we should run the scroll functions in Elisp (which already |
| 3822 | runs the configuration change hook). */ | 3819 | runs the configuration change hook). */ |
| 3823 | if (! NILP (Vwindow_scroll_functions)) | 3820 | if (! NILP (Vwindow_scroll_functions)) |
| 3824 | run_hook_with_args_2 (Qwindow_scroll_functions, new, | 3821 | run_hook_with_args_2 (Qwindow_scroll_functions, new, |
| 3825 | Fmarker_position (WGET (n, start))); | 3822 | Fmarker_position (n->start)); |
| 3826 | /* Return NEW. */ | 3823 | /* Return NEW. */ |
| 3827 | return new; | 3824 | return new; |
| 3828 | } | 3825 | } |
| @@ -3841,25 +3838,25 @@ Signal an error when WINDOW is the only window on its frame. */) | |||
| 3841 | int before_sibling = 0; | 3838 | int before_sibling = 0; |
| 3842 | 3839 | ||
| 3843 | w = decode_any_window (window); | 3840 | w = decode_any_window (window); |
| 3844 | CHECK_LIVE_FRAME (WGET (w, frame)); | 3841 | CHECK_LIVE_FRAME (w->frame); |
| 3845 | 3842 | ||
| 3846 | XSETWINDOW (window, w); | 3843 | XSETWINDOW (window, w); |
| 3847 | if (NILP (WGET (w, buffer)) | 3844 | if (NILP (w->buffer) |
| 3848 | && NILP (WGET (w, hchild)) && NILP (WGET (w, vchild))) | 3845 | && NILP (w->hchild) && NILP (w->vchild)) |
| 3849 | /* It's a no-op to delete an already deleted window. */ | 3846 | /* It's a no-op to delete an already deleted window. */ |
| 3850 | return Qnil; | 3847 | return Qnil; |
| 3851 | 3848 | ||
| 3852 | parent = WGET (w, parent); | 3849 | parent = w->parent; |
| 3853 | if (NILP (parent)) | 3850 | if (NILP (parent)) |
| 3854 | /* Never delete a minibuffer or frame root window. */ | 3851 | /* Never delete a minibuffer or frame root window. */ |
| 3855 | error ("Attempt to delete minibuffer or sole ordinary window"); | 3852 | error ("Attempt to delete minibuffer or sole ordinary window"); |
| 3856 | else if (NILP (WGET (w, prev)) && NILP (WGET (w, next))) | 3853 | else if (NILP (w->prev) && NILP (w->next)) |
| 3857 | /* Rather bow out here, this case should be handled on the Elisp | 3854 | /* Rather bow out here, this case should be handled on the Elisp |
| 3858 | level. */ | 3855 | level. */ |
| 3859 | error ("Attempt to delete sole window of parent"); | 3856 | error ("Attempt to delete sole window of parent"); |
| 3860 | 3857 | ||
| 3861 | p = XWINDOW (parent); | 3858 | p = XWINDOW (parent); |
| 3862 | horflag = NILP (WGET (p, vchild)); | 3859 | horflag = NILP (p->vchild); |
| 3863 | 3860 | ||
| 3864 | frame = WINDOW_FRAME (w); | 3861 | frame = WINDOW_FRAME (w); |
| 3865 | f = XFRAME (frame); | 3862 | f = XFRAME (frame); |
| @@ -3868,13 +3865,13 @@ Signal an error when WINDOW is the only window on its frame. */) | |||
| 3868 | r = XWINDOW (root); | 3865 | r = XWINDOW (root); |
| 3869 | 3866 | ||
| 3870 | /* Unlink WINDOW from window tree. */ | 3867 | /* Unlink WINDOW from window tree. */ |
| 3871 | if (NILP (WGET (w, prev))) | 3868 | if (NILP (w->prev)) |
| 3872 | /* Get SIBLING below (on the right of) WINDOW. */ | 3869 | /* Get SIBLING below (on the right of) WINDOW. */ |
| 3873 | { | 3870 | { |
| 3874 | /* before_sibling 1 means WINDOW is the first child of its | 3871 | /* before_sibling 1 means WINDOW is the first child of its |
| 3875 | parent and thus before the sibling. */ | 3872 | parent and thus before the sibling. */ |
| 3876 | before_sibling = 1; | 3873 | before_sibling = 1; |
| 3877 | sibling = WGET (w, next); | 3874 | sibling = w->next; |
| 3878 | s = XWINDOW (sibling); | 3875 | s = XWINDOW (sibling); |
| 3879 | WSET (s, prev, Qnil); | 3876 | WSET (s, prev, Qnil); |
| 3880 | if (horflag) | 3877 | if (horflag) |
| @@ -3885,16 +3882,16 @@ Signal an error when WINDOW is the only window on its frame. */) | |||
| 3885 | else | 3882 | else |
| 3886 | /* Get SIBLING above (on the left of) WINDOW. */ | 3883 | /* Get SIBLING above (on the left of) WINDOW. */ |
| 3887 | { | 3884 | { |
| 3888 | sibling = WGET (w, prev); | 3885 | sibling = w->prev; |
| 3889 | s = XWINDOW (sibling); | 3886 | s = XWINDOW (sibling); |
| 3890 | WSET (s, next, WGET (w, next)); | 3887 | WSET (s, next, w->next); |
| 3891 | if (!NILP (WGET (s, next))) | 3888 | if (!NILP (s->next)) |
| 3892 | WSET (XWINDOW (WGET (s, next)), prev, sibling); | 3889 | WSET (XWINDOW (s->next), prev, sibling); |
| 3893 | } | 3890 | } |
| 3894 | 3891 | ||
| 3895 | if (window_resize_check (r, horflag) | 3892 | if (window_resize_check (r, horflag) |
| 3896 | && EQ (WGET (r, new_total), | 3893 | && EQ (r->new_total, |
| 3897 | (horflag ? WGET (r, total_cols) : WGET (r, total_lines)))) | 3894 | (horflag ? r->total_cols : r->total_lines))) |
| 3898 | /* We can delete WINDOW now. */ | 3895 | /* We can delete WINDOW now. */ |
| 3899 | { | 3896 | { |
| 3900 | 3897 | ||
| @@ -3919,25 +3916,25 @@ Signal an error when WINDOW is the only window on its frame. */) | |||
| 3919 | WSET (w, next, Qnil); /* Don't delete w->next too. */ | 3916 | WSET (w, next, Qnil); /* Don't delete w->next too. */ |
| 3920 | free_window_matrices (w); | 3917 | free_window_matrices (w); |
| 3921 | 3918 | ||
| 3922 | if (!NILP (WGET (w, vchild))) | 3919 | if (!NILP (w->vchild)) |
| 3923 | { | 3920 | { |
| 3924 | delete_all_child_windows (WGET (w, vchild)); | 3921 | delete_all_child_windows (w->vchild); |
| 3925 | WSET (w, vchild, Qnil); | 3922 | WSET (w, vchild, Qnil); |
| 3926 | } | 3923 | } |
| 3927 | else if (!NILP (WGET (w, hchild))) | 3924 | else if (!NILP (w->hchild)) |
| 3928 | { | 3925 | { |
| 3929 | delete_all_child_windows (WGET (w, hchild)); | 3926 | delete_all_child_windows (w->hchild); |
| 3930 | WSET (w, hchild, Qnil); | 3927 | WSET (w, hchild, Qnil); |
| 3931 | } | 3928 | } |
| 3932 | else if (!NILP (WGET (w, buffer))) | 3929 | else if (!NILP (w->buffer)) |
| 3933 | { | 3930 | { |
| 3934 | unshow_buffer (w); | 3931 | unshow_buffer (w); |
| 3935 | unchain_marker (XMARKER (WGET (w, pointm))); | 3932 | unchain_marker (XMARKER (w->pointm)); |
| 3936 | unchain_marker (XMARKER (WGET (w, start))); | 3933 | unchain_marker (XMARKER (w->start)); |
| 3937 | WSET (w, buffer, Qnil); | 3934 | WSET (w, buffer, Qnil); |
| 3938 | } | 3935 | } |
| 3939 | 3936 | ||
| 3940 | if (NILP (WGET (s, prev)) && NILP (WGET (s, next))) | 3937 | if (NILP (s->prev) && NILP (s->next)) |
| 3941 | /* A matrjoshka where SIBLING has become the only child of | 3938 | /* A matrjoshka where SIBLING has become the only child of |
| 3942 | PARENT. */ | 3939 | PARENT. */ |
| 3943 | { | 3940 | { |
| @@ -3945,8 +3942,8 @@ Signal an error when WINDOW is the only window on its frame. */) | |||
| 3945 | replace_window (parent, sibling, 0); | 3942 | replace_window (parent, sibling, 0); |
| 3946 | /* Have SIBLING inherit the following three slot values from | 3943 | /* Have SIBLING inherit the following three slot values from |
| 3947 | PARENT (the combination_limit slot is not inherited). */ | 3944 | PARENT (the combination_limit slot is not inherited). */ |
| 3948 | WSET (s, normal_cols, WGET (p, normal_cols)); | 3945 | WSET (s, normal_cols, p->normal_cols); |
| 3949 | WSET (s, normal_lines, WGET (p, normal_lines)); | 3946 | WSET (s, normal_lines, p->normal_lines); |
| 3950 | /* Mark PARENT as deleted. */ | 3947 | /* Mark PARENT as deleted. */ |
| 3951 | WSET (p, vchild, Qnil); | 3948 | WSET (p, vchild, Qnil); |
| 3952 | WSET (p, hchild, Qnil); | 3949 | WSET (p, hchild, Qnil); |
| @@ -3976,7 +3973,7 @@ Signal an error when WINDOW is the only window on its frame. */) | |||
| 3976 | /* Now look whether `get-mru-window' gets us something. */ | 3973 | /* Now look whether `get-mru-window' gets us something. */ |
| 3977 | mru_window = call1 (Qget_mru_window, frame); | 3974 | mru_window = call1 (Qget_mru_window, frame); |
| 3978 | if (WINDOW_LIVE_P (mru_window) | 3975 | if (WINDOW_LIVE_P (mru_window) |
| 3979 | && EQ (WGET (XWINDOW (mru_window), frame), frame)) | 3976 | && EQ (XWINDOW (mru_window)->frame, frame)) |
| 3980 | new_selected_window = mru_window; | 3977 | new_selected_window = mru_window; |
| 3981 | 3978 | ||
| 3982 | /* If all ended up well, we now promote the mru window. */ | 3979 | /* If all ended up well, we now promote the mru window. */ |
| @@ -4005,8 +4002,8 @@ Signal an error when WINDOW is the only window on its frame. */) | |||
| 4005 | else | 4002 | else |
| 4006 | { | 4003 | { |
| 4007 | WSET (s, next, window); | 4004 | WSET (s, next, window); |
| 4008 | if (!NILP (WGET (w, next))) | 4005 | if (!NILP (w->next)) |
| 4009 | WSET (XWINDOW (WGET (w, next)), prev, window); | 4006 | WSET (XWINDOW (w->next), prev, window); |
| 4010 | } | 4007 | } |
| 4011 | error ("Deletion failed"); | 4008 | error ("Deletion failed"); |
| 4012 | } | 4009 | } |
| @@ -4023,7 +4020,7 @@ Signal an error when WINDOW is the only window on its frame. */) | |||
| 4023 | void | 4020 | void |
| 4024 | grow_mini_window (struct window *w, int delta) | 4021 | grow_mini_window (struct window *w, int delta) |
| 4025 | { | 4022 | { |
| 4026 | struct frame *f = XFRAME (WGET (w, frame)); | 4023 | struct frame *f = XFRAME (w->frame); |
| 4027 | struct window *r; | 4024 | struct window *r; |
| 4028 | Lisp_Object root, value; | 4025 | Lisp_Object root, value; |
| 4029 | 4026 | ||
| @@ -4041,9 +4038,9 @@ grow_mini_window (struct window *w, int delta) | |||
| 4041 | 4038 | ||
| 4042 | /* Grow the mini-window. */ | 4039 | /* Grow the mini-window. */ |
| 4043 | WSET (w, top_line, | 4040 | WSET (w, top_line, |
| 4044 | make_number (XFASTINT (WGET (r, top_line)) + XFASTINT (WGET (r, total_lines)))); | 4041 | make_number (XFASTINT (r->top_line) + XFASTINT (r->total_lines))); |
| 4045 | WSET (w, total_lines, | 4042 | WSET (w, total_lines, |
| 4046 | make_number (XFASTINT (WGET (w, total_lines)) - XINT (value))); | 4043 | make_number (XFASTINT (w->total_lines) - XINT (value))); |
| 4047 | w->last_modified = 0; | 4044 | w->last_modified = 0; |
| 4048 | w->last_overlay_modified = 0; | 4045 | w->last_overlay_modified = 0; |
| 4049 | 4046 | ||
| @@ -4057,14 +4054,14 @@ grow_mini_window (struct window *w, int delta) | |||
| 4057 | void | 4054 | void |
| 4058 | shrink_mini_window (struct window *w) | 4055 | shrink_mini_window (struct window *w) |
| 4059 | { | 4056 | { |
| 4060 | struct frame *f = XFRAME (WGET (w, frame)); | 4057 | struct frame *f = XFRAME (w->frame); |
| 4061 | struct window *r; | 4058 | struct window *r; |
| 4062 | Lisp_Object root, value; | 4059 | Lisp_Object root, value; |
| 4063 | EMACS_INT size; | 4060 | EMACS_INT size; |
| 4064 | 4061 | ||
| 4065 | eassert (MINI_WINDOW_P (w)); | 4062 | eassert (MINI_WINDOW_P (w)); |
| 4066 | 4063 | ||
| 4067 | size = XINT (WGET (w, total_lines)); | 4064 | size = XINT (w->total_lines); |
| 4068 | if (size > 1) | 4065 | if (size > 1) |
| 4069 | { | 4066 | { |
| 4070 | root = FRAME_ROOT_WINDOW (f); | 4067 | root = FRAME_ROOT_WINDOW (f); |
| @@ -4078,7 +4075,7 @@ shrink_mini_window (struct window *w) | |||
| 4078 | 4075 | ||
| 4079 | /* Shrink the mini-window. */ | 4076 | /* Shrink the mini-window. */ |
| 4080 | WSET (w, top_line, | 4077 | WSET (w, top_line, |
| 4081 | make_number (XFASTINT (WGET (r, top_line)) + XFASTINT (WGET (r, total_lines)))); | 4078 | make_number (XFASTINT (r->top_line) + XFASTINT (r->total_lines))); |
| 4082 | WSET (w, total_lines, make_number (1)); | 4079 | WSET (w, total_lines, make_number (1)); |
| 4083 | 4080 | ||
| 4084 | w->last_modified = 0; | 4081 | w->last_modified = 0; |
| @@ -4104,25 +4101,25 @@ DEFUN ("resize-mini-window-internal", Fresize_mini_window_internal, Sresize_mini | |||
| 4104 | int height; | 4101 | int height; |
| 4105 | 4102 | ||
| 4106 | CHECK_WINDOW (window); | 4103 | CHECK_WINDOW (window); |
| 4107 | f = XFRAME (WGET (w, frame)); | 4104 | f = XFRAME (w->frame); |
| 4108 | 4105 | ||
| 4109 | if (!EQ (FRAME_MINIBUF_WINDOW (XFRAME (WGET (w, frame))), window)) | 4106 | if (!EQ (FRAME_MINIBUF_WINDOW (XFRAME (w->frame)), window)) |
| 4110 | error ("Not a valid minibuffer window"); | 4107 | error ("Not a valid minibuffer window"); |
| 4111 | else if (FRAME_MINIBUF_ONLY_P (f)) | 4108 | else if (FRAME_MINIBUF_ONLY_P (f)) |
| 4112 | error ("Cannot resize a minibuffer-only frame"); | 4109 | error ("Cannot resize a minibuffer-only frame"); |
| 4113 | 4110 | ||
| 4114 | r = XWINDOW (FRAME_ROOT_WINDOW (f)); | 4111 | r = XWINDOW (FRAME_ROOT_WINDOW (f)); |
| 4115 | height = XINT (WGET (r, total_lines)) + XINT (WGET (w, total_lines)); | 4112 | height = XINT (r->total_lines) + XINT (w->total_lines); |
| 4116 | if (window_resize_check (r, 0) | 4113 | if (window_resize_check (r, 0) |
| 4117 | && XINT (WGET (w, new_total)) > 0 | 4114 | && XINT (w->new_total) > 0 |
| 4118 | && height == XINT (WGET (r, new_total)) + XINT (WGET (w, new_total))) | 4115 | && height == XINT (r->new_total) + XINT (w->new_total)) |
| 4119 | { | 4116 | { |
| 4120 | BLOCK_INPUT; | 4117 | BLOCK_INPUT; |
| 4121 | window_resize_apply (r, 0); | 4118 | window_resize_apply (r, 0); |
| 4122 | 4119 | ||
| 4123 | WSET (w, total_lines, WGET (w, new_total)); | 4120 | WSET (w, total_lines, w->new_total); |
| 4124 | WSET (w, top_line, | 4121 | WSET (w, top_line, |
| 4125 | make_number (XINT (WGET (r, top_line)) + XINT (WGET (r, total_lines)))); | 4122 | make_number (XINT (r->top_line) + XINT (r->total_lines))); |
| 4126 | 4123 | ||
| 4127 | windows_or_buffers_changed++; | 4124 | windows_or_buffers_changed++; |
| 4128 | FRAME_WINDOW_SIZES_CHANGED (f) = 1; | 4125 | FRAME_WINDOW_SIZES_CHANGED (f) = 1; |
| @@ -4145,14 +4142,14 @@ mark_window_cursors_off (struct window *w) | |||
| 4145 | { | 4142 | { |
| 4146 | while (w) | 4143 | while (w) |
| 4147 | { | 4144 | { |
| 4148 | if (!NILP (WGET (w, hchild))) | 4145 | if (!NILP (w->hchild)) |
| 4149 | mark_window_cursors_off (XWINDOW (WGET (w, hchild))); | 4146 | mark_window_cursors_off (XWINDOW (w->hchild)); |
| 4150 | else if (!NILP (WGET (w, vchild))) | 4147 | else if (!NILP (w->vchild)) |
| 4151 | mark_window_cursors_off (XWINDOW (WGET (w, vchild))); | 4148 | mark_window_cursors_off (XWINDOW (w->vchild)); |
| 4152 | else | 4149 | else |
| 4153 | w->phys_cursor_on_p = 0; | 4150 | w->phys_cursor_on_p = 0; |
| 4154 | 4151 | ||
| 4155 | w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next)); | 4152 | w = NILP (w->next) ? 0 : XWINDOW (w->next); |
| 4156 | } | 4153 | } |
| 4157 | } | 4154 | } |
| 4158 | 4155 | ||
| @@ -4162,15 +4159,15 @@ mark_window_cursors_off (struct window *w) | |||
| 4162 | int | 4159 | int |
| 4163 | window_internal_height (struct window *w) | 4160 | window_internal_height (struct window *w) |
| 4164 | { | 4161 | { |
| 4165 | int ht = XFASTINT (WGET (w, total_lines)); | 4162 | int ht = XFASTINT (w->total_lines); |
| 4166 | 4163 | ||
| 4167 | if (!MINI_WINDOW_P (w)) | 4164 | if (!MINI_WINDOW_P (w)) |
| 4168 | { | 4165 | { |
| 4169 | if (!NILP (WGET (w, parent)) | 4166 | if (!NILP (w->parent) |
| 4170 | || !NILP (WGET (w, vchild)) | 4167 | || !NILP (w->vchild) |
| 4171 | || !NILP (WGET (w, hchild)) | 4168 | || !NILP (w->hchild) |
| 4172 | || !NILP (WGET (w, next)) | 4169 | || !NILP (w->next) |
| 4173 | || !NILP (WGET (w, prev)) | 4170 | || !NILP (w->prev) |
| 4174 | || WINDOW_WANTS_MODELINE_P (w)) | 4171 | || WINDOW_WANTS_MODELINE_P (w)) |
| 4175 | --ht; | 4172 | --ht; |
| 4176 | 4173 | ||
| @@ -4200,7 +4197,7 @@ window_scroll (Lisp_Object window, EMACS_INT n, int whole, int noerror) | |||
| 4200 | 4197 | ||
| 4201 | /* If we must, use the pixel-based version which is much slower than | 4198 | /* If we must, use the pixel-based version which is much slower than |
| 4202 | the line-based one but can handle varying line heights. */ | 4199 | the line-based one but can handle varying line heights. */ |
| 4203 | if (FRAME_WINDOW_P (XFRAME (WGET (XWINDOW (window), frame)))) | 4200 | if (FRAME_WINDOW_P (XFRAME (XWINDOW (window)->frame))) |
| 4204 | window_scroll_pixel_based (window, n, whole, noerror); | 4201 | window_scroll_pixel_based (window, n, whole, noerror); |
| 4205 | else | 4202 | else |
| 4206 | window_scroll_line_based (window, n, whole, noerror); | 4203 | window_scroll_line_based (window, n, whole, noerror); |
| @@ -4225,7 +4222,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror) | |||
| 4225 | int x, y, rtop, rbot, rowh, vpos; | 4222 | int x, y, rtop, rbot, rowh, vpos; |
| 4226 | void *itdata = NULL; | 4223 | void *itdata = NULL; |
| 4227 | 4224 | ||
| 4228 | SET_TEXT_POS_FROM_MARKER (start, WGET (w, start)); | 4225 | SET_TEXT_POS_FROM_MARKER (start, w->start); |
| 4229 | /* Scrolling a minibuffer window via scroll bar when the echo area | 4226 | /* Scrolling a minibuffer window via scroll bar when the echo area |
| 4230 | shows long text sometimes resets the minibuffer contents behind | 4227 | shows long text sometimes resets the minibuffer contents behind |
| 4231 | our backs. */ | 4228 | our backs. */ |
| @@ -4306,8 +4303,8 @@ window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror) | |||
| 4306 | spos = XINT (Fline_beginning_position (Qnil)); | 4303 | spos = XINT (Fline_beginning_position (Qnil)); |
| 4307 | else | 4304 | else |
| 4308 | spos = min (XINT (Fline_end_position (Qnil)) + 1, ZV); | 4305 | spos = min (XINT (Fline_end_position (Qnil)) + 1, ZV); |
| 4309 | set_marker_restricted (WGET (w, start), make_number (spos), | 4306 | set_marker_restricted (w->start, make_number (spos), |
| 4310 | WGET (w, buffer)); | 4307 | w->buffer); |
| 4311 | w->start_at_line_beg = 1; | 4308 | w->start_at_line_beg = 1; |
| 4312 | w->update_mode_line = 1; | 4309 | w->update_mode_line = 1; |
| 4313 | w->last_modified = 0; | 4310 | w->last_modified = 0; |
| @@ -4431,7 +4428,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror) | |||
| 4431 | 4428 | ||
| 4432 | /* If control gets here, then we vscrolled. */ | 4429 | /* If control gets here, then we vscrolled. */ |
| 4433 | 4430 | ||
| 4434 | XBUFFER (WGET (w, buffer))->prevent_redisplay_optimizations_p = 1; | 4431 | XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1; |
| 4435 | 4432 | ||
| 4436 | /* Don't try to change the window start below. */ | 4433 | /* Don't try to change the window start below. */ |
| 4437 | vscrolled = 1; | 4434 | vscrolled = 1; |
| @@ -4451,9 +4448,9 @@ window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror) | |||
| 4451 | } | 4448 | } |
| 4452 | 4449 | ||
| 4453 | /* Set the window start, and set up the window for redisplay. */ | 4450 | /* Set the window start, and set up the window for redisplay. */ |
| 4454 | set_marker_restricted (WGET (w, start), make_number (pos), | 4451 | set_marker_restricted (w->start, make_number (pos), |
| 4455 | WGET (w, buffer)); | 4452 | w->buffer); |
| 4456 | bytepos = XMARKER (WGET (w, start))->bytepos; | 4453 | bytepos = XMARKER (w->start)->bytepos; |
| 4457 | w->start_at_line_beg = (pos == BEGV || FETCH_BYTE (bytepos - 1) == '\n'); | 4454 | w->start_at_line_beg = (pos == BEGV || FETCH_BYTE (bytepos - 1) == '\n'); |
| 4458 | w->update_mode_line = 1; | 4455 | w->update_mode_line = 1; |
| 4459 | w->last_modified = 0; | 4456 | w->last_modified = 0; |
| @@ -4472,7 +4469,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror) | |||
| 4472 | even if there is a header line. */ | 4469 | even if there is a header line. */ |
| 4473 | this_scroll_margin = max (0, scroll_margin); | 4470 | this_scroll_margin = max (0, scroll_margin); |
| 4474 | this_scroll_margin | 4471 | this_scroll_margin |
| 4475 | = min (this_scroll_margin, XFASTINT (WGET (w, total_lines)) / 4); | 4472 | = min (this_scroll_margin, XFASTINT (w->total_lines) / 4); |
| 4476 | this_scroll_margin *= FRAME_LINE_HEIGHT (it.f); | 4473 | this_scroll_margin *= FRAME_LINE_HEIGHT (it.f); |
| 4477 | 4474 | ||
| 4478 | if (n > 0) | 4475 | if (n > 0) |
| @@ -4546,7 +4543,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror) | |||
| 4546 | ; | 4543 | ; |
| 4547 | else if (window_scroll_pixel_based_preserve_y >= 0) | 4544 | else if (window_scroll_pixel_based_preserve_y >= 0) |
| 4548 | { | 4545 | { |
| 4549 | SET_TEXT_POS_FROM_MARKER (start, WGET (w, start)); | 4546 | SET_TEXT_POS_FROM_MARKER (start, w->start); |
| 4550 | start_display (&it, w, start); | 4547 | start_display (&it, w, start); |
| 4551 | /* It would be wrong to subtract CURRENT_HEADER_LINE_HEIGHT | 4548 | /* It would be wrong to subtract CURRENT_HEADER_LINE_HEIGHT |
| 4552 | here because we called start_display again and did not | 4549 | here because we called start_display again and did not |
| @@ -4600,7 +4597,7 @@ window_scroll_line_based (Lisp_Object window, int n, int whole, int noerror) | |||
| 4600 | if (whole) | 4597 | if (whole) |
| 4601 | n *= max (1, ht - next_screen_context_lines); | 4598 | n *= max (1, ht - next_screen_context_lines); |
| 4602 | 4599 | ||
| 4603 | startpos = marker_position (WGET (w, start)); | 4600 | startpos = marker_position (w->start); |
| 4604 | 4601 | ||
| 4605 | if (!NILP (Vscroll_preserve_screen_position)) | 4602 | if (!NILP (Vscroll_preserve_screen_position)) |
| 4606 | { | 4603 | { |
| @@ -4651,9 +4648,9 @@ window_scroll_line_based (Lisp_Object window, int n, int whole, int noerror) | |||
| 4651 | { | 4648 | { |
| 4652 | /* Don't use a scroll margin that is negative or too large. */ | 4649 | /* Don't use a scroll margin that is negative or too large. */ |
| 4653 | int this_scroll_margin = | 4650 | int this_scroll_margin = |
| 4654 | max (0, min (scroll_margin, XINT (WGET (w, total_lines)) / 4)); | 4651 | max (0, min (scroll_margin, XINT (w->total_lines) / 4)); |
| 4655 | 4652 | ||
| 4656 | set_marker_restricted_both (WGET (w, start), WGET (w, buffer), pos, pos_byte); | 4653 | set_marker_restricted_both (w->start, w->buffer, pos, pos_byte); |
| 4657 | w->start_at_line_beg = !NILP (bolp); | 4654 | w->start_at_line_beg = !NILP (bolp); |
| 4658 | w->update_mode_line = 1; | 4655 | w->update_mode_line = 1; |
| 4659 | w->last_modified = 0; | 4656 | w->last_modified = 0; |
| @@ -4747,10 +4744,10 @@ scroll_command (Lisp_Object n, int direction) | |||
| 4747 | 4744 | ||
| 4748 | /* If selected window's buffer isn't current, make it current for | 4745 | /* If selected window's buffer isn't current, make it current for |
| 4749 | the moment. But don't screw up if window_scroll gets an error. */ | 4746 | the moment. But don't screw up if window_scroll gets an error. */ |
| 4750 | if (XBUFFER (WGET (XWINDOW (selected_window), buffer)) != current_buffer) | 4747 | if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) |
| 4751 | { | 4748 | { |
| 4752 | record_unwind_protect (save_excursion_restore, save_excursion_save ()); | 4749 | record_unwind_protect (save_excursion_restore, save_excursion_save ()); |
| 4753 | Fset_buffer (WGET (XWINDOW (selected_window), buffer)); | 4750 | Fset_buffer (XWINDOW (selected_window)->buffer); |
| 4754 | 4751 | ||
| 4755 | /* Make redisplay consider other windows than just selected_window. */ | 4752 | /* Make redisplay consider other windows than just selected_window. */ |
| 4756 | ++windows_or_buffers_changed; | 4753 | ++windows_or_buffers_changed; |
| @@ -4865,8 +4862,8 @@ specifies the window to scroll. This takes precedence over | |||
| 4865 | record_unwind_protect (save_excursion_restore, save_excursion_save ()); | 4862 | record_unwind_protect (save_excursion_restore, save_excursion_save ()); |
| 4866 | ++windows_or_buffers_changed; | 4863 | ++windows_or_buffers_changed; |
| 4867 | 4864 | ||
| 4868 | Fset_buffer (WGET (w, buffer)); | 4865 | Fset_buffer (w->buffer); |
| 4869 | SET_PT (marker_position (WGET (w, pointm))); | 4866 | SET_PT (marker_position (w->pointm)); |
| 4870 | 4867 | ||
| 4871 | if (NILP (arg)) | 4868 | if (NILP (arg)) |
| 4872 | window_scroll (window, 1, 1, 1); | 4869 | window_scroll (window, 1, 1, 1); |
| @@ -4880,7 +4877,7 @@ specifies the window to scroll. This takes precedence over | |||
| 4880 | window_scroll (window, XINT (arg), 0, 1); | 4877 | window_scroll (window, XINT (arg), 0, 1); |
| 4881 | } | 4878 | } |
| 4882 | 4879 | ||
| 4883 | set_marker_both (WGET (w, pointm), Qnil, PT, PT_BYTE); | 4880 | set_marker_both (w->pointm, Qnil, PT, PT_BYTE); |
| 4884 | unbind_to (count, Qnil); | 4881 | unbind_to (count, Qnil); |
| 4885 | 4882 | ||
| 4886 | return Qnil; | 4883 | return Qnil; |
| @@ -4958,10 +4955,10 @@ displayed_window_lines (struct window *w) | |||
| 4958 | int bottom_y; | 4955 | int bottom_y; |
| 4959 | void *itdata = NULL; | 4956 | void *itdata = NULL; |
| 4960 | 4957 | ||
| 4961 | if (XBUFFER (WGET (w, buffer)) != current_buffer) | 4958 | if (XBUFFER (w->buffer) != current_buffer) |
| 4962 | { | 4959 | { |
| 4963 | old_buffer = current_buffer; | 4960 | old_buffer = current_buffer; |
| 4964 | set_buffer_internal (XBUFFER (WGET (w, buffer))); | 4961 | set_buffer_internal (XBUFFER (w->buffer)); |
| 4965 | } | 4962 | } |
| 4966 | else | 4963 | else |
| 4967 | old_buffer = NULL; | 4964 | old_buffer = NULL; |
| @@ -4969,12 +4966,12 @@ displayed_window_lines (struct window *w) | |||
| 4969 | /* In case W->start is out of the accessible range, do something | 4966 | /* In case W->start is out of the accessible range, do something |
| 4970 | reasonable. This happens in Info mode when Info-scroll-down | 4967 | reasonable. This happens in Info mode when Info-scroll-down |
| 4971 | calls (recenter -1) while W->start is 1. */ | 4968 | calls (recenter -1) while W->start is 1. */ |
| 4972 | if (XMARKER (WGET (w, start))->charpos < BEGV) | 4969 | if (XMARKER (w->start)->charpos < BEGV) |
| 4973 | SET_TEXT_POS (start, BEGV, BEGV_BYTE); | 4970 | SET_TEXT_POS (start, BEGV, BEGV_BYTE); |
| 4974 | else if (XMARKER (WGET (w, start))->charpos > ZV) | 4971 | else if (XMARKER (w->start)->charpos > ZV) |
| 4975 | SET_TEXT_POS (start, ZV, ZV_BYTE); | 4972 | SET_TEXT_POS (start, ZV, ZV_BYTE); |
| 4976 | else | 4973 | else |
| 4977 | SET_TEXT_POS_FROM_MARKER (start, WGET (w, start)); | 4974 | SET_TEXT_POS_FROM_MARKER (start, w->start); |
| 4978 | 4975 | ||
| 4979 | itdata = bidi_shelve_cache (); | 4976 | itdata = bidi_shelve_cache (); |
| 4980 | start_display (&it, w, start); | 4977 | start_display (&it, w, start); |
| @@ -4988,7 +4985,7 @@ displayed_window_lines (struct window *w) | |||
| 4988 | This kludge fixes a bug whereby (move-to-window-line -1) | 4985 | This kludge fixes a bug whereby (move-to-window-line -1) |
| 4989 | when ZV is on the last screen line | 4986 | when ZV is on the last screen line |
| 4990 | moves to the previous screen line instead of the last one. */ | 4987 | moves to the previous screen line instead of the last one. */ |
| 4991 | if (! FRAME_WINDOW_P (XFRAME (WGET (w, frame)))) | 4988 | if (! FRAME_WINDOW_P (XFRAME (w->frame))) |
| 4992 | height++; | 4989 | height++; |
| 4993 | 4990 | ||
| 4994 | /* Add in empty lines at the bottom of the window. */ | 4991 | /* Add in empty lines at the bottom of the window. */ |
| @@ -5023,7 +5020,7 @@ and redisplay normally--don't erase and redraw the frame. */) | |||
| 5023 | (register Lisp_Object arg) | 5020 | (register Lisp_Object arg) |
| 5024 | { | 5021 | { |
| 5025 | struct window *w = XWINDOW (selected_window); | 5022 | struct window *w = XWINDOW (selected_window); |
| 5026 | struct buffer *buf = XBUFFER (WGET (w, buffer)); | 5023 | struct buffer *buf = XBUFFER (w->buffer); |
| 5027 | struct buffer *obuf = current_buffer; | 5024 | struct buffer *obuf = current_buffer; |
| 5028 | int center_p = 0; | 5025 | int center_p = 0; |
| 5029 | ptrdiff_t charpos, bytepos; | 5026 | ptrdiff_t charpos, bytepos; |
| @@ -5067,12 +5064,12 @@ and redisplay normally--don't erase and redraw the frame. */) | |||
| 5067 | /* Do this after making BUF current | 5064 | /* Do this after making BUF current |
| 5068 | in case scroll_margin is buffer-local. */ | 5065 | in case scroll_margin is buffer-local. */ |
| 5069 | this_scroll_margin = | 5066 | this_scroll_margin = |
| 5070 | max (0, min (scroll_margin, XFASTINT (WGET (w, total_lines)) / 4)); | 5067 | max (0, min (scroll_margin, XFASTINT (w->total_lines) / 4)); |
| 5071 | 5068 | ||
| 5072 | /* Handle centering on a graphical frame specially. Such frames can | 5069 | /* Handle centering on a graphical frame specially. Such frames can |
| 5073 | have variable-height lines and centering point on the basis of | 5070 | have variable-height lines and centering point on the basis of |
| 5074 | line counts would lead to strange effects. */ | 5071 | line counts would lead to strange effects. */ |
| 5075 | if (FRAME_WINDOW_P (XFRAME (WGET (w, frame)))) | 5072 | if (FRAME_WINDOW_P (XFRAME (w->frame))) |
| 5076 | { | 5073 | { |
| 5077 | if (center_p) | 5074 | if (center_p) |
| 5078 | { | 5075 | { |
| @@ -5189,7 +5186,7 @@ and redisplay normally--don't erase and redraw the frame. */) | |||
| 5189 | } | 5186 | } |
| 5190 | 5187 | ||
| 5191 | /* Set the new window start. */ | 5188 | /* Set the new window start. */ |
| 5192 | set_marker_both (WGET (w, start), WGET (w, buffer), charpos, bytepos); | 5189 | set_marker_both (w->start, w->buffer, charpos, bytepos); |
| 5193 | WSET (w, window_end_valid, Qnil); | 5190 | WSET (w, window_end_valid, Qnil); |
| 5194 | 5191 | ||
| 5195 | w->optional_new_start = 1; | 5192 | w->optional_new_start = 1; |
| @@ -5212,7 +5209,7 @@ nor any partial-height lines at the bottom of the text area. */) | |||
| 5212 | { | 5209 | { |
| 5213 | struct window *w = decode_window (window); | 5210 | struct window *w = decode_window (window); |
| 5214 | int pixel_height = window_box_height (w); | 5211 | int pixel_height = window_box_height (w); |
| 5215 | int line_height = pixel_height / FRAME_LINE_HEIGHT (XFRAME (WGET (w, frame))); | 5212 | int line_height = pixel_height / FRAME_LINE_HEIGHT (XFRAME (w->frame)); |
| 5216 | return make_number (line_height); | 5213 | return make_number (line_height); |
| 5217 | } | 5214 | } |
| 5218 | 5215 | ||
| @@ -5233,24 +5230,24 @@ zero means top of window, negative means relative to bottom of window. */) | |||
| 5233 | int this_scroll_margin; | 5230 | int this_scroll_margin; |
| 5234 | #endif | 5231 | #endif |
| 5235 | 5232 | ||
| 5236 | if (!(BUFFERP (WGET (w, buffer)) | 5233 | if (!(BUFFERP (w->buffer) |
| 5237 | && XBUFFER (WGET (w, buffer)) == current_buffer)) | 5234 | && XBUFFER (w->buffer) == current_buffer)) |
| 5238 | /* This test is needed to make sure PT/PT_BYTE make sense in w->buffer | 5235 | /* This test is needed to make sure PT/PT_BYTE make sense in w->buffer |
| 5239 | when passed below to set_marker_both. */ | 5236 | when passed below to set_marker_both. */ |
| 5240 | error ("move-to-window-line called from unrelated buffer"); | 5237 | error ("move-to-window-line called from unrelated buffer"); |
| 5241 | 5238 | ||
| 5242 | window = selected_window; | 5239 | window = selected_window; |
| 5243 | start = marker_position (WGET (w, start)); | 5240 | start = marker_position (w->start); |
| 5244 | if (start < BEGV || start > ZV) | 5241 | if (start < BEGV || start > ZV) |
| 5245 | { | 5242 | { |
| 5246 | int height = window_internal_height (w); | 5243 | int height = window_internal_height (w); |
| 5247 | Fvertical_motion (make_number (- (height / 2)), window); | 5244 | Fvertical_motion (make_number (- (height / 2)), window); |
| 5248 | set_marker_both (WGET (w, start), WGET (w, buffer), PT, PT_BYTE); | 5245 | set_marker_both (w->start, w->buffer, PT, PT_BYTE); |
| 5249 | w->start_at_line_beg = !NILP (Fbolp ()); | 5246 | w->start_at_line_beg = !NILP (Fbolp ()); |
| 5250 | w->force_start = 1; | 5247 | w->force_start = 1; |
| 5251 | } | 5248 | } |
| 5252 | else | 5249 | else |
| 5253 | Fgoto_char (WGET (w, start)); | 5250 | Fgoto_char (w->start); |
| 5254 | 5251 | ||
| 5255 | lines = displayed_window_lines (w); | 5252 | lines = displayed_window_lines (w); |
| 5256 | 5253 | ||
| @@ -5354,7 +5351,7 @@ DEFUN ("window-configuration-frame", Fwindow_configuration_frame, Swindow_config | |||
| 5354 | 5351 | ||
| 5355 | data = (struct save_window_data *) XVECTOR (config); | 5352 | data = (struct save_window_data *) XVECTOR (config); |
| 5356 | saved_windows = XVECTOR (data->saved_windows); | 5353 | saved_windows = XVECTOR (data->saved_windows); |
| 5357 | return WGET (XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window), frame); | 5354 | return XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame; |
| 5358 | } | 5355 | } |
| 5359 | 5356 | ||
| 5360 | DEFUN ("set-window-configuration", Fset_window_configuration, | 5357 | DEFUN ("set-window-configuration", Fset_window_configuration, |
| @@ -5396,11 +5393,11 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5396 | window-point of the final-selected-window to the window-point of | 5393 | window-point of the final-selected-window to the window-point of |
| 5397 | the current-selected-window. So we have to be careful which | 5394 | the current-selected-window. So we have to be careful which |
| 5398 | point of the current-buffer we copy into old_point. */ | 5395 | point of the current-buffer we copy into old_point. */ |
| 5399 | if (EQ (WGET (XWINDOW (data->current_window), buffer), new_current_buffer) | 5396 | if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer) |
| 5400 | && WINDOWP (selected_window) | 5397 | && WINDOWP (selected_window) |
| 5401 | && EQ (WGET (XWINDOW (selected_window), buffer), new_current_buffer) | 5398 | && EQ (XWINDOW (selected_window)->buffer, new_current_buffer) |
| 5402 | && !EQ (selected_window, data->current_window)) | 5399 | && !EQ (selected_window, data->current_window)) |
| 5403 | old_point = XMARKER (WGET (XWINDOW (data->current_window), pointm))->charpos; | 5400 | old_point = XMARKER (XWINDOW (data->current_window)->pointm)->charpos; |
| 5404 | else | 5401 | else |
| 5405 | old_point = PT; | 5402 | old_point = PT; |
| 5406 | else | 5403 | else |
| @@ -5412,15 +5409,15 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5412 | So if possible we want this arbitrary choice of "which point" to | 5409 | So if possible we want this arbitrary choice of "which point" to |
| 5413 | be the one from the to-be-selected-window so as to prevent this | 5410 | be the one from the to-be-selected-window so as to prevent this |
| 5414 | window's cursor from being copied from another window. */ | 5411 | window's cursor from being copied from another window. */ |
| 5415 | if (EQ (WGET (XWINDOW (data->current_window), buffer), new_current_buffer) | 5412 | if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer) |
| 5416 | /* If current_window = selected_window, its point is in BUF_PT. */ | 5413 | /* If current_window = selected_window, its point is in BUF_PT. */ |
| 5417 | && !EQ (selected_window, data->current_window)) | 5414 | && !EQ (selected_window, data->current_window)) |
| 5418 | old_point = XMARKER (WGET (XWINDOW (data->current_window), pointm))->charpos; | 5415 | old_point = XMARKER (XWINDOW (data->current_window)->pointm)->charpos; |
| 5419 | else | 5416 | else |
| 5420 | old_point = BUF_PT (XBUFFER (new_current_buffer)); | 5417 | old_point = BUF_PT (XBUFFER (new_current_buffer)); |
| 5421 | } | 5418 | } |
| 5422 | 5419 | ||
| 5423 | frame = WGET (XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window), frame); | 5420 | frame = XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame; |
| 5424 | f = XFRAME (frame); | 5421 | f = XFRAME (frame); |
| 5425 | 5422 | ||
| 5426 | /* If f is a dead frame, don't bother rebuilding its window tree. | 5423 | /* If f is a dead frame, don't bother rebuilding its window tree. |
| @@ -5473,13 +5470,13 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5473 | window holds garbage.) We do this now, before | 5470 | window holds garbage.) We do this now, before |
| 5474 | restoring the window contents, and prevent it from | 5471 | restoring the window contents, and prevent it from |
| 5475 | being done later on when we select a new window. */ | 5472 | being done later on when we select a new window. */ |
| 5476 | if (! NILP (WGET (XWINDOW (selected_window), buffer))) | 5473 | if (! NILP (XWINDOW (selected_window)->buffer)) |
| 5477 | { | 5474 | { |
| 5478 | w = XWINDOW (selected_window); | 5475 | w = XWINDOW (selected_window); |
| 5479 | set_marker_both (WGET (w, pointm), | 5476 | set_marker_both (w->pointm, |
| 5480 | WGET (w, buffer), | 5477 | w->buffer, |
| 5481 | BUF_PT (XBUFFER (WGET (w, buffer))), | 5478 | BUF_PT (XBUFFER (w->buffer)), |
| 5482 | BUF_PT_BYTE (XBUFFER (WGET (w, buffer)))); | 5479 | BUF_PT_BYTE (XBUFFER (w->buffer))); |
| 5483 | } | 5480 | } |
| 5484 | 5481 | ||
| 5485 | windows_or_buffers_changed++; | 5482 | windows_or_buffers_changed++; |
| @@ -5511,39 +5508,39 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5511 | WSET (w, next, Qnil); | 5508 | WSET (w, next, Qnil); |
| 5512 | 5509 | ||
| 5513 | if (!NILP (p->parent)) | 5510 | if (!NILP (p->parent)) |
| 5514 | WSET (w, parent, SAVED_WINDOW_N (saved_windows, | 5511 | WSET (w, parent, SAVED_WINDOW_N |
| 5515 | XFASTINT (p->parent))->window); | 5512 | (saved_windows, XFASTINT (p->parent))->window); |
| 5516 | else | 5513 | else |
| 5517 | WSET (w, parent, Qnil); | 5514 | WSET (w, parent, Qnil); |
| 5518 | 5515 | ||
| 5519 | if (!NILP (p->prev)) | 5516 | if (!NILP (p->prev)) |
| 5520 | { | 5517 | { |
| 5521 | WSET (w, prev, SAVED_WINDOW_N (saved_windows, | 5518 | WSET (w, prev, SAVED_WINDOW_N |
| 5522 | XFASTINT (p->prev))->window); | 5519 | (saved_windows, XFASTINT (p->prev))->window); |
| 5523 | WSET (XWINDOW (WGET (w, prev)), next, p->window); | 5520 | WSET (XWINDOW (w->prev), next, p->window); |
| 5524 | } | 5521 | } |
| 5525 | else | 5522 | else |
| 5526 | { | 5523 | { |
| 5527 | WSET (w, prev, Qnil); | 5524 | WSET (w, prev, Qnil); |
| 5528 | if (!NILP (WGET (w, parent))) | 5525 | if (!NILP (w->parent)) |
| 5529 | { | 5526 | { |
| 5530 | if (EQ (p->total_cols, WGET (XWINDOW (WGET (w, parent)), total_cols))) | 5527 | if (EQ (p->total_cols, XWINDOW (w->parent)->total_cols)) |
| 5531 | { | 5528 | { |
| 5532 | WSET (XWINDOW (WGET (w, parent)), vchild, p->window); | 5529 | WSET (XWINDOW (w->parent), vchild, p->window); |
| 5533 | WSET (XWINDOW (WGET (w, parent)), hchild, Qnil); | 5530 | WSET (XWINDOW (w->parent), hchild, Qnil); |
| 5534 | } | 5531 | } |
| 5535 | else | 5532 | else |
| 5536 | { | 5533 | { |
| 5537 | WSET (XWINDOW (WGET (w, parent)), hchild, p->window); | 5534 | WSET (XWINDOW (w->parent), hchild, p->window); |
| 5538 | WSET (XWINDOW (WGET (w, parent)), vchild, Qnil); | 5535 | WSET (XWINDOW (w->parent), vchild, Qnil); |
| 5539 | } | 5536 | } |
| 5540 | } | 5537 | } |
| 5541 | } | 5538 | } |
| 5542 | 5539 | ||
| 5543 | /* If we squirreled away the buffer in the window's height, | 5540 | /* If we squirreled away the buffer in the window's height, |
| 5544 | restore it now. */ | 5541 | restore it now. */ |
| 5545 | if (BUFFERP (WGET (w, total_lines))) | 5542 | if (BUFFERP (w->total_lines)) |
| 5546 | WSET (w, buffer, WGET (w, total_lines)); | 5543 | WSET (w, buffer, w->total_lines); |
| 5547 | WSET (w, left_col, p->left_col); | 5544 | WSET (w, left_col, p->left_col); |
| 5548 | WSET (w, top_line, p->top_line); | 5545 | WSET (w, top_line, p->top_line); |
| 5549 | WSET (w, total_cols, p->total_cols); | 5546 | WSET (w, total_cols, p->total_cols); |
| @@ -5571,7 +5568,7 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5571 | { | 5568 | { |
| 5572 | if (NILP (XCDR (pers))) | 5569 | if (NILP (XCDR (pers))) |
| 5573 | { | 5570 | { |
| 5574 | par = Fassq (XCAR (pers), WGET (w, window_parameters)); | 5571 | par = Fassq (XCAR (pers), w->window_parameters); |
| 5575 | if (CONSP (par) && !NILP (XCDR (par))) | 5572 | if (CONSP (par) && !NILP (XCDR (par))) |
| 5576 | /* Reset a parameter to nil if and only if it | 5573 | /* Reset a parameter to nil if and only if it |
| 5577 | has a non-nil association. Don't make new | 5574 | has a non-nil association. Don't make new |
| @@ -5596,33 +5593,33 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5596 | { | 5593 | { |
| 5597 | WSET (w, buffer, p->buffer); | 5594 | WSET (w, buffer, p->buffer); |
| 5598 | w->start_at_line_beg = !NILP (p->start_at_line_beg); | 5595 | w->start_at_line_beg = !NILP (p->start_at_line_beg); |
| 5599 | set_marker_restricted (WGET (w, start), p->start, WGET (w, buffer)); | 5596 | set_marker_restricted (w->start, p->start, w->buffer); |
| 5600 | set_marker_restricted (WGET (w, pointm), p->pointm, | 5597 | set_marker_restricted (w->pointm, p->pointm, |
| 5601 | WGET (w, buffer)); | 5598 | w->buffer); |
| 5602 | Fset_marker (BVAR (XBUFFER (WGET (w, buffer)), mark), | 5599 | Fset_marker (BVAR (XBUFFER (w->buffer), mark), |
| 5603 | p->mark, WGET (w, buffer)); | 5600 | p->mark, w->buffer); |
| 5604 | 5601 | ||
| 5605 | /* As documented in Fcurrent_window_configuration, don't | 5602 | /* As documented in Fcurrent_window_configuration, don't |
| 5606 | restore the location of point in the buffer which was | 5603 | restore the location of point in the buffer which was |
| 5607 | current when the window configuration was recorded. */ | 5604 | current when the window configuration was recorded. */ |
| 5608 | if (!EQ (p->buffer, new_current_buffer) | 5605 | if (!EQ (p->buffer, new_current_buffer) |
| 5609 | && XBUFFER (p->buffer) == current_buffer) | 5606 | && XBUFFER (p->buffer) == current_buffer) |
| 5610 | Fgoto_char (WGET (w, pointm)); | 5607 | Fgoto_char (w->pointm); |
| 5611 | } | 5608 | } |
| 5612 | else if (!NILP (WGET (w, buffer)) | 5609 | else if (!NILP (w->buffer) |
| 5613 | && !NILP (BVAR (XBUFFER (WGET (w, buffer)), name))) | 5610 | && !NILP (BVAR (XBUFFER (w->buffer), name))) |
| 5614 | /* Keep window's old buffer; make sure the markers are | 5611 | /* Keep window's old buffer; make sure the markers are |
| 5615 | real. */ | 5612 | real. */ |
| 5616 | { | 5613 | { |
| 5617 | /* Set window markers at start of visible range. */ | 5614 | /* Set window markers at start of visible range. */ |
| 5618 | if (XMARKER (WGET (w, start))->buffer == 0) | 5615 | if (XMARKER (w->start)->buffer == 0) |
| 5619 | set_marker_restricted (WGET (w, start), make_number (0), | 5616 | set_marker_restricted (w->start, make_number (0), |
| 5620 | WGET (w, buffer)); | 5617 | w->buffer); |
| 5621 | if (XMARKER (WGET (w, pointm))->buffer == 0) | 5618 | if (XMARKER (w->pointm)->buffer == 0) |
| 5622 | set_marker_restricted_both | 5619 | set_marker_restricted_both |
| 5623 | (WGET (w, pointm), WGET (w, buffer), | 5620 | (w->pointm, w->buffer, |
| 5624 | BUF_PT (XBUFFER (WGET (w, buffer))), | 5621 | BUF_PT (XBUFFER (w->buffer)), |
| 5625 | BUF_PT_BYTE (XBUFFER (WGET (w, buffer)))); | 5622 | BUF_PT_BYTE (XBUFFER (w->buffer))); |
| 5626 | w->start_at_line_beg = 1; | 5623 | w->start_at_line_beg = 1; |
| 5627 | } | 5624 | } |
| 5628 | else if (STRINGP (auto_buffer_name = | 5625 | else if (STRINGP (auto_buffer_name = |
| @@ -5630,10 +5627,10 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5630 | && SCHARS (auto_buffer_name) != 0 | 5627 | && SCHARS (auto_buffer_name) != 0 |
| 5631 | && !NILP (WSET (w, buffer, Fget_buffer_create (auto_buffer_name)))) | 5628 | && !NILP (WSET (w, buffer, Fget_buffer_create (auto_buffer_name)))) |
| 5632 | { | 5629 | { |
| 5633 | set_marker_restricted (WGET (w, start), | 5630 | set_marker_restricted (w->start, |
| 5634 | make_number (0), WGET (w, buffer)); | 5631 | make_number (0), w->buffer); |
| 5635 | set_marker_restricted (WGET (w, pointm), | 5632 | set_marker_restricted (w->pointm, |
| 5636 | make_number (0), WGET (w, buffer)); | 5633 | make_number (0), w->buffer); |
| 5637 | w->start_at_line_beg = 1; | 5634 | w->start_at_line_beg = 1; |
| 5638 | } | 5635 | } |
| 5639 | else | 5636 | else |
| @@ -5646,12 +5643,12 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5646 | WSET (w, buffer, other_buffer_safely (Fcurrent_buffer ())); | 5643 | WSET (w, buffer, other_buffer_safely (Fcurrent_buffer ())); |
| 5647 | /* This will set the markers to beginning of visible | 5644 | /* This will set the markers to beginning of visible |
| 5648 | range. */ | 5645 | range. */ |
| 5649 | set_marker_restricted (WGET (w, start), | 5646 | set_marker_restricted (w->start, |
| 5650 | make_number (0), WGET (w, buffer)); | 5647 | make_number (0), w->buffer); |
| 5651 | set_marker_restricted (WGET (w, pointm), | 5648 | set_marker_restricted (w->pointm, |
| 5652 | make_number (0), WGET (w, buffer)); | 5649 | make_number (0), w->buffer); |
| 5653 | w->start_at_line_beg = 1; | 5650 | w->start_at_line_beg = 1; |
| 5654 | if (!NILP (WGET (w, dedicated))) | 5651 | if (!NILP (w->dedicated)) |
| 5655 | /* Record this window as dead. */ | 5652 | /* Record this window as dead. */ |
| 5656 | dead_windows = Fcons (window, dead_windows); | 5653 | dead_windows = Fcons (window, dead_windows); |
| 5657 | /* Make sure window is no more dedicated. */ | 5654 | /* Make sure window is no more dedicated. */ |
| @@ -5662,17 +5659,17 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5662 | FSET (f, root_window, data->root_window); | 5659 | FSET (f, root_window, data->root_window); |
| 5663 | /* Arrange *not* to restore point in the buffer that was | 5660 | /* Arrange *not* to restore point in the buffer that was |
| 5664 | current when the window configuration was saved. */ | 5661 | current when the window configuration was saved. */ |
| 5665 | if (EQ (WGET (XWINDOW (data->current_window), buffer), new_current_buffer)) | 5662 | if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer)) |
| 5666 | set_marker_restricted (WGET (XWINDOW (data->current_window), pointm), | 5663 | set_marker_restricted (XWINDOW (data->current_window)->pointm, |
| 5667 | make_number (old_point), | 5664 | make_number (old_point), |
| 5668 | WGET (XWINDOW (data->current_window), buffer)); | 5665 | XWINDOW (data->current_window)->buffer); |
| 5669 | 5666 | ||
| 5670 | /* In the following call to `select-window', prevent "swapping out | 5667 | /* In the following call to `select-window', prevent "swapping out |
| 5671 | point" in the old selected window using the buffer that has | 5668 | point" in the old selected window using the buffer that has |
| 5672 | been restored into it. We already swapped out that point from | 5669 | been restored into it. We already swapped out that point from |
| 5673 | that window's old buffer. */ | 5670 | that window's old buffer. */ |
| 5674 | select_window (data->current_window, Qnil, 1); | 5671 | select_window (data->current_window, Qnil, 1); |
| 5675 | BVAR (XBUFFER (WGET (XWINDOW (selected_window), buffer)), last_selected_window) | 5672 | BVAR (XBUFFER (XWINDOW (selected_window)->buffer), last_selected_window) |
| 5676 | = selected_window; | 5673 | = selected_window; |
| 5677 | 5674 | ||
| 5678 | if (NILP (data->focus_frame) | 5675 | if (NILP (data->focus_frame) |
| @@ -5699,14 +5696,14 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5699 | /* Now, free glyph matrices in windows that were not reused. */ | 5696 | /* Now, free glyph matrices in windows that were not reused. */ |
| 5700 | for (i = n = 0; i < n_leaf_windows; ++i) | 5697 | for (i = n = 0; i < n_leaf_windows; ++i) |
| 5701 | { | 5698 | { |
| 5702 | if (NILP (WGET (leaf_windows[i], buffer))) | 5699 | if (NILP (leaf_windows[i]->buffer)) |
| 5703 | { | 5700 | { |
| 5704 | /* Assert it's not reused as a combination. */ | 5701 | /* Assert it's not reused as a combination. */ |
| 5705 | eassert (NILP (WGET (leaf_windows[i], hchild)) | 5702 | eassert (NILP (leaf_windows[i]->hchild) |
| 5706 | && NILP (WGET (leaf_windows[i], vchild))); | 5703 | && NILP (leaf_windows[i]->vchild)); |
| 5707 | free_window_matrices (leaf_windows[i]); | 5704 | free_window_matrices (leaf_windows[i]); |
| 5708 | } | 5705 | } |
| 5709 | else if (EQ (WGET (leaf_windows[i], buffer), new_current_buffer)) | 5706 | else if (EQ (leaf_windows[i]->buffer, new_current_buffer)) |
| 5710 | ++n; | 5707 | ++n; |
| 5711 | } | 5708 | } |
| 5712 | 5709 | ||
| @@ -5751,27 +5748,27 @@ delete_all_child_windows (Lisp_Object window) | |||
| 5751 | 5748 | ||
| 5752 | w = XWINDOW (window); | 5749 | w = XWINDOW (window); |
| 5753 | 5750 | ||
| 5754 | if (!NILP (WGET (w, next))) | 5751 | if (!NILP (w->next)) |
| 5755 | /* Delete WINDOW's siblings (we traverse postorderly). */ | 5752 | /* Delete WINDOW's siblings (we traverse postorderly). */ |
| 5756 | delete_all_child_windows (WGET (w, next)); | 5753 | delete_all_child_windows (w->next); |
| 5757 | 5754 | ||
| 5758 | WSET (w, total_lines, WGET (w, buffer)); /* See Fset_window_configuration for excuse. */ | 5755 | WSET (w, total_lines, w->buffer); /* See Fset_window_configuration for excuse. */ |
| 5759 | 5756 | ||
| 5760 | if (!NILP (WGET (w, vchild))) | 5757 | if (!NILP (w->vchild)) |
| 5761 | { | 5758 | { |
| 5762 | delete_all_child_windows (WGET (w, vchild)); | 5759 | delete_all_child_windows (w->vchild); |
| 5763 | WSET (w, vchild, Qnil); | 5760 | WSET (w, vchild, Qnil); |
| 5764 | } | 5761 | } |
| 5765 | else if (!NILP (WGET (w, hchild))) | 5762 | else if (!NILP (w->hchild)) |
| 5766 | { | 5763 | { |
| 5767 | delete_all_child_windows (WGET (w, hchild)); | 5764 | delete_all_child_windows (w->hchild); |
| 5768 | WSET (w, hchild, Qnil); | 5765 | WSET (w, hchild, Qnil); |
| 5769 | } | 5766 | } |
| 5770 | else if (!NILP (WGET (w, buffer))) | 5767 | else if (!NILP (w->buffer)) |
| 5771 | { | 5768 | { |
| 5772 | unshow_buffer (w); | 5769 | unshow_buffer (w); |
| 5773 | unchain_marker (XMARKER (WGET (w, pointm))); | 5770 | unchain_marker (XMARKER (w->pointm)); |
| 5774 | unchain_marker (XMARKER (WGET (w, start))); | 5771 | unchain_marker (XMARKER (w->start)); |
| 5775 | WSET (w, buffer, Qnil); | 5772 | WSET (w, buffer, Qnil); |
| 5776 | } | 5773 | } |
| 5777 | 5774 | ||
| @@ -5782,12 +5779,12 @@ static int | |||
| 5782 | count_windows (register struct window *window) | 5779 | count_windows (register struct window *window) |
| 5783 | { | 5780 | { |
| 5784 | register int count = 1; | 5781 | register int count = 1; |
| 5785 | if (!NILP (WGET (window, next))) | 5782 | if (!NILP (window->next)) |
| 5786 | count += count_windows (XWINDOW (WGET (window, next))); | 5783 | count += count_windows (XWINDOW (window->next)); |
| 5787 | if (!NILP (WGET (window, vchild))) | 5784 | if (!NILP (window->vchild)) |
| 5788 | count += count_windows (XWINDOW (WGET (window, vchild))); | 5785 | count += count_windows (XWINDOW (window->vchild)); |
| 5789 | if (!NILP (WGET (window, hchild))) | 5786 | if (!NILP (window->hchild)) |
| 5790 | count += count_windows (XWINDOW (WGET (window, hchild))); | 5787 | count += count_windows (XWINDOW (window->hchild)); |
| 5791 | return count; | 5788 | return count; |
| 5792 | } | 5789 | } |
| 5793 | 5790 | ||
| @@ -5799,14 +5796,14 @@ get_leaf_windows (struct window *w, struct window **flat, int i) | |||
| 5799 | { | 5796 | { |
| 5800 | while (w) | 5797 | while (w) |
| 5801 | { | 5798 | { |
| 5802 | if (!NILP (WGET (w, hchild))) | 5799 | if (!NILP (w->hchild)) |
| 5803 | i = get_leaf_windows (XWINDOW (WGET (w, hchild)), flat, i); | 5800 | i = get_leaf_windows (XWINDOW (w->hchild), flat, i); |
| 5804 | else if (!NILP (WGET (w, vchild))) | 5801 | else if (!NILP (w->vchild)) |
| 5805 | i = get_leaf_windows (XWINDOW (WGET (w, vchild)), flat, i); | 5802 | i = get_leaf_windows (XWINDOW (w->vchild), flat, i); |
| 5806 | else | 5803 | else |
| 5807 | flat[i++] = w; | 5804 | flat[i++] = w; |
| 5808 | 5805 | ||
| 5809 | w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next)); | 5806 | w = NILP (w->next) ? 0 : XWINDOW (w->next); |
| 5810 | } | 5807 | } |
| 5811 | 5808 | ||
| 5812 | return i; | 5809 | return i; |
| @@ -5859,32 +5856,32 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i) | |||
| 5859 | register struct window *w; | 5856 | register struct window *w; |
| 5860 | register Lisp_Object tem, pers, par; | 5857 | register Lisp_Object tem, pers, par; |
| 5861 | 5858 | ||
| 5862 | for (;!NILP (window); window = WGET (w, next)) | 5859 | for (;!NILP (window); window = w->next) |
| 5863 | { | 5860 | { |
| 5864 | p = SAVED_WINDOW_N (vector, i); | 5861 | p = SAVED_WINDOW_N (vector, i); |
| 5865 | w = XWINDOW (window); | 5862 | w = XWINDOW (window); |
| 5866 | 5863 | ||
| 5867 | WSET (w, temslot, make_number (i)); i++; | 5864 | WSET (w, temslot, make_number (i)); i++; |
| 5868 | p->window = window; | 5865 | p->window = window; |
| 5869 | p->buffer = WGET (w, buffer); | 5866 | p->buffer = w->buffer; |
| 5870 | p->left_col = WGET (w, left_col); | 5867 | p->left_col = w->left_col; |
| 5871 | p->top_line = WGET (w, top_line); | 5868 | p->top_line = w->top_line; |
| 5872 | p->total_cols = WGET (w, total_cols); | 5869 | p->total_cols = w->total_cols; |
| 5873 | p->total_lines = WGET (w, total_lines); | 5870 | p->total_lines = w->total_lines; |
| 5874 | p->normal_cols = WGET (w, normal_cols); | 5871 | p->normal_cols = w->normal_cols; |
| 5875 | p->normal_lines = WGET (w, normal_lines); | 5872 | p->normal_lines = w->normal_lines; |
| 5876 | XSETFASTINT (p->hscroll, w->hscroll); | 5873 | XSETFASTINT (p->hscroll, w->hscroll); |
| 5877 | XSETFASTINT (p->min_hscroll, w->min_hscroll); | 5874 | XSETFASTINT (p->min_hscroll, w->min_hscroll); |
| 5878 | p->display_table = WGET (w, display_table); | 5875 | p->display_table = w->display_table; |
| 5879 | p->left_margin_cols = WGET (w, left_margin_cols); | 5876 | p->left_margin_cols = w->left_margin_cols; |
| 5880 | p->right_margin_cols = WGET (w, right_margin_cols); | 5877 | p->right_margin_cols = w->right_margin_cols; |
| 5881 | p->left_fringe_width = WGET (w, left_fringe_width); | 5878 | p->left_fringe_width = w->left_fringe_width; |
| 5882 | p->right_fringe_width = WGET (w, right_fringe_width); | 5879 | p->right_fringe_width = w->right_fringe_width; |
| 5883 | p->fringes_outside_margins = w->fringes_outside_margins ? Qt : Qnil; | 5880 | p->fringes_outside_margins = w->fringes_outside_margins ? Qt : Qnil; |
| 5884 | p->scroll_bar_width = WGET (w, scroll_bar_width); | 5881 | p->scroll_bar_width = w->scroll_bar_width; |
| 5885 | p->vertical_scroll_bar_type = WGET (w, vertical_scroll_bar_type); | 5882 | p->vertical_scroll_bar_type = w->vertical_scroll_bar_type; |
| 5886 | p->dedicated = WGET (w, dedicated); | 5883 | p->dedicated = w->dedicated; |
| 5887 | p->combination_limit = WGET (w, combination_limit); | 5884 | p->combination_limit = w->combination_limit; |
| 5888 | p->window_parameters = Qnil; | 5885 | p->window_parameters = Qnil; |
| 5889 | 5886 | ||
| 5890 | if (!NILP (Vwindow_persistent_parameters)) | 5887 | if (!NILP (Vwindow_persistent_parameters)) |
| @@ -5917,7 +5914,7 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i) | |||
| 5917 | /* Save values for persistent window parameters. */ | 5914 | /* Save values for persistent window parameters. */ |
| 5918 | if (CONSP (pers) && !NILP (XCDR (pers))) | 5915 | if (CONSP (pers) && !NILP (XCDR (pers))) |
| 5919 | { | 5916 | { |
| 5920 | par = Fassq (XCAR (pers), WGET (w, window_parameters)); | 5917 | par = Fassq (XCAR (pers), w->window_parameters); |
| 5921 | if (NILP (par)) | 5918 | if (NILP (par)) |
| 5922 | /* If the window has no value for the parameter, | 5919 | /* If the window has no value for the parameter, |
| 5923 | make one. */ | 5920 | make one. */ |
| @@ -5933,24 +5930,24 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i) | |||
| 5933 | } | 5930 | } |
| 5934 | } | 5931 | } |
| 5935 | 5932 | ||
| 5936 | if (!NILP (WGET (w, buffer))) | 5933 | if (!NILP (w->buffer)) |
| 5937 | { | 5934 | { |
| 5938 | /* Save w's value of point in the window configuration. If w | 5935 | /* Save w's value of point in the window configuration. If w |
| 5939 | is the selected window, then get the value of point from | 5936 | is the selected window, then get the value of point from |
| 5940 | the buffer; pointm is garbage in the selected window. */ | 5937 | the buffer; pointm is garbage in the selected window. */ |
| 5941 | if (EQ (window, selected_window)) | 5938 | if (EQ (window, selected_window)) |
| 5942 | p->pointm = build_marker (XBUFFER (WGET (w, buffer)), | 5939 | p->pointm = build_marker (XBUFFER (w->buffer), |
| 5943 | BUF_PT (XBUFFER (WGET (w, buffer))), | 5940 | BUF_PT (XBUFFER (w->buffer)), |
| 5944 | BUF_PT_BYTE (XBUFFER (WGET (w, buffer)))); | 5941 | BUF_PT_BYTE (XBUFFER (w->buffer))); |
| 5945 | else | 5942 | else |
| 5946 | p->pointm = Fcopy_marker (WGET (w, pointm), Qnil); | 5943 | p->pointm = Fcopy_marker (w->pointm, Qnil); |
| 5947 | XMARKER (p->pointm)->insertion_type | 5944 | XMARKER (p->pointm)->insertion_type |
| 5948 | = !NILP (Vwindow_point_insertion_type); | 5945 | = !NILP (Vwindow_point_insertion_type); |
| 5949 | 5946 | ||
| 5950 | p->start = Fcopy_marker (WGET (w, start), Qnil); | 5947 | p->start = Fcopy_marker (w->start, Qnil); |
| 5951 | p->start_at_line_beg = w->start_at_line_beg ? Qt : Qnil; | 5948 | p->start_at_line_beg = w->start_at_line_beg ? Qt : Qnil; |
| 5952 | 5949 | ||
| 5953 | tem = BVAR (XBUFFER (WGET (w, buffer)), mark); | 5950 | tem = BVAR (XBUFFER (w->buffer), mark); |
| 5954 | p->mark = Fcopy_marker (tem, Qnil); | 5951 | p->mark = Fcopy_marker (tem, Qnil); |
| 5955 | } | 5952 | } |
| 5956 | else | 5953 | else |
| @@ -5961,20 +5958,20 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i) | |||
| 5961 | p->start_at_line_beg = Qnil; | 5958 | p->start_at_line_beg = Qnil; |
| 5962 | } | 5959 | } |
| 5963 | 5960 | ||
| 5964 | if (NILP (WGET (w, parent))) | 5961 | if (NILP (w->parent)) |
| 5965 | p->parent = Qnil; | 5962 | p->parent = Qnil; |
| 5966 | else | 5963 | else |
| 5967 | p->parent = WGET (XWINDOW (WGET (w, parent)), temslot); | 5964 | p->parent = XWINDOW (w->parent)->temslot; |
| 5968 | 5965 | ||
| 5969 | if (NILP (WGET (w, prev))) | 5966 | if (NILP (w->prev)) |
| 5970 | p->prev = Qnil; | 5967 | p->prev = Qnil; |
| 5971 | else | 5968 | else |
| 5972 | p->prev = WGET (XWINDOW (WGET (w, prev)), temslot); | 5969 | p->prev = XWINDOW (w->prev)->temslot; |
| 5973 | 5970 | ||
| 5974 | if (!NILP (WGET (w, vchild))) | 5971 | if (!NILP (w->vchild)) |
| 5975 | i = save_window_save (WGET (w, vchild), vector, i); | 5972 | i = save_window_save (w->vchild, vector, i); |
| 5976 | if (!NILP (WGET (w, hchild))) | 5973 | if (!NILP (w->hchild)) |
| 5977 | i = save_window_save (WGET (w, hchild), vector, i); | 5974 | i = save_window_save (w->hchild, vector, i); |
| 5978 | } | 5975 | } |
| 5979 | 5976 | ||
| 5980 | return i; | 5977 | return i; |
| @@ -6063,8 +6060,8 @@ means no margin. */) | |||
| 6063 | right_width = Qnil; | 6060 | right_width = Qnil; |
| 6064 | } | 6061 | } |
| 6065 | 6062 | ||
| 6066 | if (!EQ (WGET (w, left_margin_cols), left_width) | 6063 | if (!EQ (w->left_margin_cols, left_width) |
| 6067 | || !EQ (WGET (w, right_margin_cols), right_width)) | 6064 | || !EQ (w->right_margin_cols, right_width)) |
| 6068 | { | 6065 | { |
| 6069 | WSET (w, left_margin_cols, left_width); | 6066 | WSET (w, left_margin_cols, left_width); |
| 6070 | WSET (w, right_margin_cols, right_width); | 6067 | WSET (w, right_margin_cols, right_width); |
| @@ -6089,7 +6086,7 @@ as nil. */) | |||
| 6089 | (Lisp_Object window) | 6086 | (Lisp_Object window) |
| 6090 | { | 6087 | { |
| 6091 | struct window *w = decode_window (window); | 6088 | struct window *w = decode_window (window); |
| 6092 | return Fcons (WGET (w, left_margin_cols), WGET (w, right_margin_cols)); | 6089 | return Fcons (w->left_margin_cols, w->right_margin_cols); |
| 6093 | } | 6090 | } |
| 6094 | 6091 | ||
| 6095 | 6092 | ||
| @@ -6123,8 +6120,8 @@ display marginal areas and the text area. */) | |||
| 6123 | 6120 | ||
| 6124 | /* Do nothing on a tty. */ | 6121 | /* Do nothing on a tty. */ |
| 6125 | if (FRAME_WINDOW_P (WINDOW_XFRAME (w)) | 6122 | if (FRAME_WINDOW_P (WINDOW_XFRAME (w)) |
| 6126 | && (!EQ (WGET (w, left_fringe_width), left_width) | 6123 | && (!EQ (w->left_fringe_width, left_width) |
| 6127 | || !EQ (WGET (w, right_fringe_width), right_width) | 6124 | || !EQ (w->right_fringe_width, right_width) |
| 6128 | || w->fringes_outside_margins != outside)) | 6125 | || w->fringes_outside_margins != outside)) |
| 6129 | { | 6126 | { |
| 6130 | WSET (w, left_fringe_width, left_width); | 6127 | WSET (w, left_fringe_width, left_width); |
| @@ -6194,8 +6191,8 @@ Fourth parameter HORIZONTAL-TYPE is currently unused. */) | |||
| 6194 | || EQ (vertical_type, Qt))) | 6191 | || EQ (vertical_type, Qt))) |
| 6195 | error ("Invalid type of vertical scroll bar"); | 6192 | error ("Invalid type of vertical scroll bar"); |
| 6196 | 6193 | ||
| 6197 | if (!EQ (WGET (w, scroll_bar_width), width) | 6194 | if (!EQ (w->scroll_bar_width, width) |
| 6198 | || !EQ (WGET (w, vertical_scroll_bar_type), vertical_type)) | 6195 | || !EQ (w->vertical_scroll_bar_type, vertical_type)) |
| 6199 | { | 6196 | { |
| 6200 | WSET (w, scroll_bar_width, width); | 6197 | WSET (w, scroll_bar_width, width); |
| 6201 | WSET (w, vertical_scroll_bar_type, vertical_type); | 6198 | WSET (w, vertical_scroll_bar_type, vertical_type); |
| @@ -6227,7 +6224,7 @@ value. */) | |||
| 6227 | ? WINDOW_CONFIG_SCROLL_BAR_WIDTH (w) | 6224 | ? WINDOW_CONFIG_SCROLL_BAR_WIDTH (w) |
| 6228 | : WINDOW_SCROLL_BAR_AREA_WIDTH (w))), | 6225 | : WINDOW_SCROLL_BAR_AREA_WIDTH (w))), |
| 6229 | Fcons (make_number (WINDOW_SCROLL_BAR_COLS (w)), | 6226 | Fcons (make_number (WINDOW_SCROLL_BAR_COLS (w)), |
| 6230 | Fcons (WGET (w, vertical_scroll_bar_type), | 6227 | Fcons (w->vertical_scroll_bar_type, |
| 6231 | Fcons (Qnil, Qnil)))); | 6228 | Fcons (Qnil, Qnil)))); |
| 6232 | } | 6229 | } |
| 6233 | 6230 | ||
| @@ -6253,7 +6250,7 @@ optional second arg PIXELS-P means value is measured in pixels. */) | |||
| 6253 | else | 6250 | else |
| 6254 | CHECK_WINDOW (window); | 6251 | CHECK_WINDOW (window); |
| 6255 | w = XWINDOW (window); | 6252 | w = XWINDOW (window); |
| 6256 | f = XFRAME (WGET (w, frame)); | 6253 | f = XFRAME (w->frame); |
| 6257 | 6254 | ||
| 6258 | if (FRAME_WINDOW_P (f)) | 6255 | if (FRAME_WINDOW_P (f)) |
| 6259 | result = (NILP (pixels_p) | 6256 | result = (NILP (pixels_p) |
| @@ -6287,7 +6284,7 @@ If PIXELS-P is non-nil, the return value is VSCROLL. */) | |||
| 6287 | CHECK_NUMBER_OR_FLOAT (vscroll); | 6284 | CHECK_NUMBER_OR_FLOAT (vscroll); |
| 6288 | 6285 | ||
| 6289 | w = XWINDOW (window); | 6286 | w = XWINDOW (window); |
| 6290 | f = XFRAME (WGET (w, frame)); | 6287 | f = XFRAME (w->frame); |
| 6291 | 6288 | ||
| 6292 | if (FRAME_WINDOW_P (f)) | 6289 | if (FRAME_WINDOW_P (f)) |
| 6293 | { | 6290 | { |
| @@ -6306,7 +6303,7 @@ If PIXELS-P is non-nil, the return value is VSCROLL. */) | |||
| 6306 | adjust_glyphs (f); | 6303 | adjust_glyphs (f); |
| 6307 | 6304 | ||
| 6308 | /* Prevent redisplay shortcuts. */ | 6305 | /* Prevent redisplay shortcuts. */ |
| 6309 | XBUFFER (WGET (w, buffer))->prevent_redisplay_optimizations_p = 1; | 6306 | XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1; |
| 6310 | } | 6307 | } |
| 6311 | } | 6308 | } |
| 6312 | 6309 | ||
| @@ -6340,14 +6337,14 @@ foreach_window_1 (struct window *w, int (*fn) (struct window *, void *), void *u | |||
| 6340 | 6337 | ||
| 6341 | for (cont = 1; w && cont;) | 6338 | for (cont = 1; w && cont;) |
| 6342 | { | 6339 | { |
| 6343 | if (!NILP (WGET (w, hchild))) | 6340 | if (!NILP (w->hchild)) |
| 6344 | cont = foreach_window_1 (XWINDOW (WGET (w, hchild)), fn, user_data); | 6341 | cont = foreach_window_1 (XWINDOW (w->hchild), fn, user_data); |
| 6345 | else if (!NILP (WGET (w, vchild))) | 6342 | else if (!NILP (w->vchild)) |
| 6346 | cont = foreach_window_1 (XWINDOW (WGET (w, vchild)), fn, user_data); | 6343 | cont = foreach_window_1 (XWINDOW (w->vchild), fn, user_data); |
| 6347 | else | 6344 | else |
| 6348 | cont = fn (w, user_data); | 6345 | cont = fn (w, user_data); |
| 6349 | 6346 | ||
| 6350 | w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next)); | 6347 | w = NILP (w->next) ? 0 : XWINDOW (w->next); |
| 6351 | } | 6348 | } |
| 6352 | 6349 | ||
| 6353 | return cont; | 6350 | return cont; |