aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorKenichi Handa2011-11-11 16:08:47 +0900
committerKenichi Handa2011-11-11 16:08:47 +0900
commit0756b0c3a6e60dd623da6f12bc8d2de05ef7b8f1 (patch)
tree0846cacac3ba56cb8d2054fbc851fee2fb9606d2 /src/window.c
parent9ac0394b8d1e54bf1b49291c85770af36a94531e (diff)
parent68cbc58be59373e805fa200db02e4022e20050f0 (diff)
downloademacs-0756b0c3a6e60dd623da6f12bc8d2de05ef7b8f1.tar.gz
emacs-0756b0c3a6e60dd623da6f12bc8d2de05ef7b8f1.zip
merge trunk
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c207
1 files changed, 112 insertions, 95 deletions
diff --git a/src/window.c b/src/window.c
index 605d00b8e05..83a8974e88d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -504,8 +504,8 @@ DEFUN ("window-nest", Fwindow_nest, Swindow_nest, 0, 1, 0,
504 doc: /* Return nest status of window WINDOW. 504 doc: /* Return nest status of window WINDOW.
505If WINDOW is omitted or nil, it defaults to the selected window. 505If WINDOW is omitted or nil, it defaults to the selected window.
506 506
507If the return value is nil, subwindows of WINDOW can be recombined with 507If the return value is nil, child windows of WINDOW can be recombined with
508WINDOW's siblings. A return value of non-nil means that subwindows of 508WINDOW's siblings. A return value of non-nil means that child windows of
509WINDOW are never \(re-)combined with WINDOW's siblings. */) 509WINDOW are never \(re-)combined with WINDOW's siblings. */)
510 (Lisp_Object window) 510 (Lisp_Object window)
511{ 511{
@@ -516,8 +516,8 @@ DEFUN ("set-window-nest", Fset_window_nest, Sset_window_nest, 2, 2, 0,
516 doc: /* Set nest status of window WINDOW to STATUS; return STATUS. 516 doc: /* Set nest status of window WINDOW to STATUS; return STATUS.
517If WINDOW is omitted or nil, it defaults to the selected window. 517If WINDOW is omitted or nil, it defaults to the selected window.
518 518
519If STATUS is nil, subwindows of WINDOW can be recombined with WINDOW's 519If STATUS is nil, child windows of WINDOW can be recombined with WINDOW's
520siblings. STATUS non-nil means that subwindows of WINDOW are never 520siblings. STATUS non-nil means that child windows of WINDOW are never
521\(re-)combined with WINDOW's siblings. */) 521\(re-)combined with WINDOW's siblings. */)
522 (Lisp_Object window, Lisp_Object status) 522 (Lisp_Object window, Lisp_Object status)
523{ 523{
@@ -539,27 +539,34 @@ selected one. */)
539 return decode_window (window)->use_time; 539 return decode_window (window)->use_time;
540} 540}
541 541
542DEFUN ("window-total-size", Fwindow_total_size, Swindow_total_size, 0, 2, 0, 542DEFUN ("window-total-height", Fwindow_total_height, Swindow_total_height, 0, 1, 0,
543 doc: /* Return the total number of lines of window WINDOW. 543 doc: /* Return the total height, in lines, of window WINDOW.
544If WINDOW is omitted or nil, it defaults to the selected window. 544If WINDOW is omitted or nil, it defaults to the selected window.
545 545
546The return value includes WINDOW's mode line and header line, if any. 546The return value includes the mode line and header line, if any.
547If WINDOW is internal, the return value is the sum of the total number 547If WINDOW is an internal window, the total height is the height
548of lines of WINDOW's child windows if these are vertically combined 548of the screen areas spanned by its children.
549and the height of WINDOW's first child otherwise. 549
550 550On a graphical display, this total height is reported as an
551Optional argument HORIZONTAL non-nil means return the total number of 551integer multiple of the default character height. */)
552columns of WINDOW. In this case the return value includes any vertical 552 (Lisp_Object window)
553dividers or scrollbars of WINDOW. If WINDOW is internal, the return
554value is the sum of the total number of columns of WINDOW's child
555windows if they are horizontally combined and the width of WINDOW's
556first child otherwise. */)
557 (Lisp_Object window, Lisp_Object horizontal)
558{ 553{
559 if (NILP (horizontal)) 554 return decode_any_window (window)->total_lines;
560 return decode_any_window (window)->total_lines; 555}
561 else 556
562 return decode_any_window (window)->total_cols; 557DEFUN ("window-total-width", Fwindow_total_width, Swindow_total_width, 0, 1, 0,
558 doc: /* Return the total width, in columns, of window WINDOW.
559If WINDOW is omitted or nil, it defaults to the selected window.
560
561The return value includes any vertical dividers or scroll bars
562belonging to WINDOW. If WINDOW is an internal window, the total width
563is the width of the screen areas spanned by its children.
564
565On a graphical display, this total width is reported as an
566integer multiple of the default character width. */)
567 (Lisp_Object window)
568{
569 return decode_any_window (window)->total_cols;
563} 570}
564 571
565DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0, 572DEFUN ("window-new-total", Fwindow_new_total, Swindow_new_total, 0, 1, 0,
@@ -592,6 +599,10 @@ If WINDOW is omitted or nil, it defaults to the selected window. */)
592 599
593DEFUN ("window-left-column", Fwindow_left_column, Swindow_left_column, 0, 1, 0, 600DEFUN ("window-left-column", Fwindow_left_column, Swindow_left_column, 0, 1, 0,
594 doc: /* Return left column of window WINDOW. 601 doc: /* Return left column of window WINDOW.
602This is the distance, in columns, between the left edge of WINDOW and
603the left edge of the frame's window area. For instance, the return
604value is 0 if there is no window to the left of WINDOW.
605
595If WINDOW is omitted or nil, it defaults to the selected window. */) 606If WINDOW is omitted or nil, it defaults to the selected window. */)
596 (Lisp_Object window) 607 (Lisp_Object window)
597{ 608{
@@ -600,6 +611,10 @@ If WINDOW is omitted or nil, it defaults to the selected window. */)
600 611
601DEFUN ("window-top-line", Fwindow_top_line, Swindow_top_line, 0, 1, 0, 612DEFUN ("window-top-line", Fwindow_top_line, Swindow_top_line, 0, 1, 0,
602 doc: /* Return top line of window WINDOW. 613 doc: /* Return top line of window WINDOW.
614This is the distance, in lines, between the top of WINDOW and the top
615of the frame's window area. For instance, the return value is 0 if
616there is no window above WINDOW.
617
603If WINDOW is omitted or nil, it defaults to the selected window. */) 618If WINDOW is omitted or nil, it defaults to the selected window. */)
604 (Lisp_Object window) 619 (Lisp_Object window)
605{ 620{
@@ -655,34 +670,34 @@ window_body_cols (struct window *w)
655 return width; 670 return width;
656} 671}
657 672
658DEFUN ("window-body-size", Fwindow_body_size, Swindow_body_size, 0, 2, 0, 673DEFUN ("window-body-height", Fwindow_body_height, Swindow_body_height, 0, 1, 0,
659 doc: /* Return the number of lines or columns of WINDOW's body. 674 doc: /* Return the height, in lines, of WINDOW's text area.
660WINDOW must be a live window and defaults to the selected one. 675If WINDOW is omitted or nil, it defaults to the selected window.
676Signal an error if the window is not live.
661 677
662If the optional argument HORIZONTAL is omitted or nil, the function 678The returned height does not include the mode line or header line.
663returns the number of WINDOW's lines, excluding the mode line and 679On a graphical display, the height is expressed as an integer multiple
664header line, if any. 680of the default character height. If a line at the bottom of the text
665 681area is only partially visible, that counts as a whole line; to
666If HORIZONTAL is non-nil, the function returns the number of columns 682exclude partially-visible lines, use `window-text-height'. */)
667excluding any vertical dividers or scroll bars owned by WINDOW. On a 683 (Lisp_Object window)
668window-system the return value also excludes the number of columns
669used for WINDOW's fringes or display margins.
670
671Note that the return value is measured in canonical units, i.e. for
672the default frame's face. If the window shows some characters with
673non-default face, e.g., if the font of some characters is larger or
674smaller than the default font, the value returned by this function
675will not match the actual number of lines or characters per line
676shown in the window. To get the actual number of columns and lines,
677use `posn-at-point'. */)
678 (Lisp_Object window, Lisp_Object horizontal)
679{ 684{
680 struct window *w = decode_any_window (window); 685 struct window *w = decode_window (window);
686 return make_number (window_body_lines (w));
687}
681 688
682 if (NILP (horizontal)) 689DEFUN ("window-body-width", Fwindow_body_width, Swindow_body_width, 0, 1, 0,
683 return make_number (window_body_lines (w)); 690 doc: /* Return the width, in columns, of WINDOW's text area.
684 else 691If WINDOW is omitted or nil, it defaults to the selected window.
685 return make_number (window_body_cols (w)); 692Signal an error if the window is not live.
693
694The return value does not include any vertical dividers, fringe or
695marginal areas, or scroll bars. On a graphical display, the width is
696expressed as an integer multiple of the default character width. */)
697 (Lisp_Object window)
698{
699 struct window *w = decode_window (window);
700 return make_number (window_body_cols (w));
686} 701}
687 702
688DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, 703DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0,
@@ -844,7 +859,7 @@ The inside edges do not include the space used by the WINDOW's scroll
844bar, display margins, fringes, header line, and/or mode line. */) 859bar, display margins, fringes, header line, and/or mode line. */)
845 (Lisp_Object window) 860 (Lisp_Object window)
846{ 861{
847 register struct window *w = decode_any_window (window); 862 register struct window *w = decode_window (window);
848 863
849 return list4 (make_number (WINDOW_BOX_LEFT_EDGE_COL (w) 864 return list4 (make_number (WINDOW_BOX_LEFT_EDGE_COL (w)
850 + WINDOW_LEFT_MARGIN_COLS (w) 865 + WINDOW_LEFT_MARGIN_COLS (w)
@@ -859,9 +874,9 @@ bar, display margins, fringes, header line, and/or mode line. */)
859} 874}
860 875
861DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, 876DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0,
862 doc: /* Return a list of the edge pixel coordinates of WINDOW. 877 doc: /* Return a list of the edge pixel coordinates of WINDOW's text area.
863The list has the form (LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at 878The list has the form (LEFT TOP RIGHT BOTTOM), all relative to (0,0)
864the top left corner of the frame. 879at the top left corner of the frame's window area.
865 880
866RIGHT is one more than the rightmost x position of WINDOW's text area. 881RIGHT is one more than the rightmost x position of WINDOW's text area.
867BOTTOM is one more than the bottommost y position of WINDOW's text area. 882BOTTOM is one more than the bottommost y position of WINDOW's text area.
@@ -869,7 +884,7 @@ The inside edges do not include the space used by WINDOW's scroll bar,
869display margins, fringes, header line, and/or mode line. */) 884display margins, fringes, header line, and/or mode line. */)
870 (Lisp_Object window) 885 (Lisp_Object window)
871{ 886{
872 register struct window *w = decode_any_window (window); 887 register struct window *w = decode_window (window);
873 888
874 return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w) 889 return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w)
875 + WINDOW_LEFT_MARGIN_WIDTH (w) 890 + WINDOW_LEFT_MARGIN_WIDTH (w)
@@ -886,9 +901,9 @@ display margins, fringes, header line, and/or mode line. */)
886DEFUN ("window-inside-absolute-pixel-edges", 901DEFUN ("window-inside-absolute-pixel-edges",
887 Fwindow_inside_absolute_pixel_edges, 902 Fwindow_inside_absolute_pixel_edges,
888 Swindow_inside_absolute_pixel_edges, 0, 1, 0, 903 Swindow_inside_absolute_pixel_edges, 0, 1, 0,
889 doc: /* Return a list of the edge pixel coordinates of WINDOW. 904 doc: /* Return a list of the edge pixel coordinates of WINDOW's text area.
890The list has the form (LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at 905The list has the form (LEFT TOP RIGHT BOTTOM), all relative to (0,0)
891the top left corner of the display. 906at the top left corner of the frame's window area.
892 907
893RIGHT is one more than the rightmost x position of WINDOW's text area. 908RIGHT is one more than the rightmost x position of WINDOW's text area.
894BOTTOM is one more than the bottommost y position of WINDOW's text area. 909BOTTOM is one more than the bottommost y position of WINDOW's text area.
@@ -896,7 +911,7 @@ The inside edges do not include the space used by WINDOW's scroll bar,
896display margins, fringes, header line, and/or mode line. */) 911display margins, fringes, header line, and/or mode line. */)
897 (Lisp_Object window) 912 (Lisp_Object window)
898{ 913{
899 register struct window *w = decode_any_window (window); 914 register struct window *w = decode_window (window);
900 int add_x, add_y; 915 int add_x, add_y;
901 calc_absolute_offset (w, &add_x, &add_y); 916 calc_absolute_offset (w, &add_x, &add_y);
902 917
@@ -2571,9 +2586,9 @@ DEFUN ("delete-other-windows-internal", Fdelete_other_windows_internal,
2571Only the frame WINDOW is on is affected. WINDOW may be any window and 2586Only the frame WINDOW is on is affected. WINDOW may be any window and
2572defaults to the selected one. 2587defaults to the selected one.
2573 2588
2574Optional argument ROOT, if non-nil, must specify an internal window 2589Optional argument ROOT, if non-nil, must specify an internal window such
2575containing WINDOW as a subwindow. If this is the case, replace ROOT by 2590that WINDOW is in its window subtree. If this is the case, replace ROOT
2576WINDOW and leave alone any windows not contained in ROOT. 2591by WINDOW and leave alone any windows not part of ROOT's subtree.
2577 2592
2578When WINDOW is live try to reduce display jumps by keeping the text 2593When WINDOW is live try to reduce display jumps by keeping the text
2579previously visible in WINDOW in the same place on the frame. Doing this 2594previously visible in WINDOW in the same place on the frame. Doing this
@@ -2637,10 +2652,10 @@ window-start value is reasonable when this function is called. */)
2637 } 2652 }
2638 else 2653 else
2639 { 2654 {
2640 /* See if the frame's selected window is a subwindow of WINDOW, by 2655 /* See if the frame's selected window is a part of the window
2641 finding all the selected window's parents and comparing each 2656 subtree rooted at WINDOW, by finding all the selected window's
2642 one with WINDOW. If it isn't we need a new selected window for 2657 parents and comparing each one with WINDOW. If it isn't we
2643 this frame. */ 2658 need a new selected window for this frame. */
2644 swindow = FRAME_SELECTED_WINDOW (f); 2659 swindow = FRAME_SELECTED_WINDOW (f);
2645 while (1) 2660 while (1)
2646 { 2661 {
@@ -2676,7 +2691,7 @@ window-start value is reasonable when this function is called. */)
2676 2691
2677 if (NILP (w->buffer)) 2692 if (NILP (w->buffer))
2678 { 2693 {
2679 /* Resize subwindows vertically. */ 2694 /* Resize child windows vertically. */
2680 XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines)); 2695 XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines));
2681 w->top_line = r->top_line; 2696 w->top_line = r->top_line;
2682 resize_root_window (window, delta, Qnil, Qnil); 2697 resize_root_window (window, delta, Qnil, Qnil);
@@ -2691,7 +2706,7 @@ window-start value is reasonable when this function is called. */)
2691 resize_failed = 1; 2706 resize_failed = 1;
2692 } 2707 }
2693 2708
2694 /* Resize subwindows horizontally. */ 2709 /* Resize child windows horizontally. */
2695 if (!resize_failed) 2710 if (!resize_failed)
2696 { 2711 {
2697 w->left_col = r->left_col; 2712 w->left_col = r->left_col;
@@ -2740,15 +2755,15 @@ window-start value is reasonable when this function is called. */)
2740 XWINDOW (w->parent)->hchild = sibling; 2755 XWINDOW (w->parent)->hchild = sibling;
2741 } 2756 }
2742 2757
2743 /* Delete ROOT and all subwindows of ROOT. */ 2758 /* Delete ROOT and all child windows of ROOT. */
2744 if (!NILP (r->vchild)) 2759 if (!NILP (r->vchild))
2745 { 2760 {
2746 delete_all_subwindows (r->vchild); 2761 delete_all_child_windows (r->vchild);
2747 r->vchild = Qnil; 2762 r->vchild = Qnil;
2748 } 2763 }
2749 else if (!NILP (r->hchild)) 2764 else if (!NILP (r->hchild))
2750 { 2765 {
2751 delete_all_subwindows (r->hchild); 2766 delete_all_child_windows (r->hchild);
2752 r->hchild = Qnil; 2767 r->hchild = Qnil;
2753 } 2768 }
2754 2769
@@ -3349,7 +3364,7 @@ Return SIZE.
3349Optional argument ADD non-nil means add SIZE to the new total size of 3364Optional argument ADD non-nil means add SIZE to the new total size of
3350WINDOW and return the sum. 3365WINDOW and return the sum.
3351 3366
3352Note: This function does not operate on any subwindows of WINDOW. */) 3367Note: This function does not operate on any child windows of WINDOW. */)
3353 (Lisp_Object window, Lisp_Object size, Lisp_Object add) 3368 (Lisp_Object window, Lisp_Object size, Lisp_Object add)
3354{ 3369{
3355 struct window *w = decode_any_window (window); 3370 struct window *w = decode_any_window (window);
@@ -3367,7 +3382,7 @@ DEFUN ("set-window-new-normal", Fset_window_new_normal, Sset_window_new_normal,
3367 doc: /* Set new normal size of WINDOW to SIZE. 3382 doc: /* Set new normal size of WINDOW to SIZE.
3368Return SIZE. 3383Return SIZE.
3369 3384
3370Note: This function does not operate on any subwindows of WINDOW. */) 3385Note: This function does not operate on any child windows of WINDOW. */)
3371 (Lisp_Object window, Lisp_Object size) 3386 (Lisp_Object window, Lisp_Object size)
3372{ 3387{
3373 struct window *w = decode_any_window (window); 3388 struct window *w = decode_any_window (window);
@@ -3378,7 +3393,7 @@ Note: This function does not operate on any subwindows of WINDOW. */)
3378 3393
3379/* Return 1 if setting w->total_lines (w->total_cols if HORFLAG is 3394/* Return 1 if setting w->total_lines (w->total_cols if HORFLAG is
3380 non-zero) to w->new_total would result in correct heights (widths) 3395 non-zero) to w->new_total would result in correct heights (widths)
3381 for window W and recursively all subwindows of W. 3396 for window W and recursively all child windows of W.
3382 3397
3383 Note: This function does not check any of `window-fixed-size-p', 3398 Note: This function does not check any of `window-fixed-size-p',
3384 `window-min-height' or `window-min-width'. It does check that window 3399 `window-min-height' or `window-min-width'. It does check that window
@@ -3393,7 +3408,7 @@ window_resize_check (struct window *w, int horflag)
3393 { 3408 {
3394 c = XWINDOW (w->vchild); 3409 c = XWINDOW (w->vchild);
3395 if (horflag) 3410 if (horflag)
3396 /* All subwindows of W must have the same width as W. */ 3411 /* All child windows of W must have the same width as W. */
3397 { 3412 {
3398 while (c) 3413 while (c)
3399 { 3414 {
@@ -3405,8 +3420,8 @@ window_resize_check (struct window *w, int horflag)
3405 return 1; 3420 return 1;
3406 } 3421 }
3407 else 3422 else
3408 /* The sum of the heights of the subwindows of W must equal W's 3423 /* The sum of the heights of the child windows of W must equal
3409 height. */ 3424 W's height. */
3410 { 3425 {
3411 int sum_of_sizes = 0; 3426 int sum_of_sizes = 0;
3412 while (c) 3427 while (c)
@@ -3424,7 +3439,7 @@ window_resize_check (struct window *w, int horflag)
3424 { 3439 {
3425 c = XWINDOW (w->hchild); 3440 c = XWINDOW (w->hchild);
3426 if (horflag) 3441 if (horflag)
3427 /* The sum of the widths of the subwindows of W must equal W's 3442 /* The sum of the widths of the child windows of W must equal W's
3428 width. */ 3443 width. */
3429 { 3444 {
3430 int sum_of_sizes = 0; 3445 int sum_of_sizes = 0;
@@ -3438,7 +3453,7 @@ window_resize_check (struct window *w, int horflag)
3438 return (sum_of_sizes == XINT (w->new_total)); 3453 return (sum_of_sizes == XINT (w->new_total));
3439 } 3454 }
3440 else 3455 else
3441 /* All subwindows of W must have the same height as W. */ 3456 /* All child windows of W must have the same height as W. */
3442 { 3457 {
3443 while (c) 3458 while (c)
3444 { 3459 {
@@ -3458,9 +3473,9 @@ window_resize_check (struct window *w, int horflag)
3458} 3473}
3459 3474
3460/* Set w->total_lines (w->total_cols if HORIZONTAL is non-zero) to 3475/* Set w->total_lines (w->total_cols if HORIZONTAL is non-zero) to
3461 w->new_total for window W and recursively all subwindows of W. Also 3476 w->new_total for window W and recursively all child windows of W.
3462 calculate and assign the new vertical (horizontal) start positions of 3477 Also calculate and assign the new vertical (horizontal) start
3463 each of these windows. 3478 positions of each of these windows.
3464 3479
3465 This function does not perform any error checks. Make sure you have 3480 This function does not perform any error checks. Make sure you have
3466 run window_resize_check on W before applying this function. */ 3481 run window_resize_check on W before applying this function. */
@@ -3534,8 +3549,8 @@ Optional argument HORIZONTAL omitted or nil means apply requested height
3534values. HORIZONTAL non-nil means apply requested width values. 3549values. HORIZONTAL non-nil means apply requested width values.
3535 3550
3536This function checks whether the requested values sum up to a valid 3551This function checks whether the requested values sum up to a valid
3537window layout, recursively assigns the new sizes of all subwindows and 3552window layout, recursively assigns the new sizes of all child windows
3538calculates and assigns the new start positions of these windows. 3553and calculates and assigns the new start positions of these windows.
3539 3554
3540Note: This function does not check any of `window-fixed-size-p', 3555Note: This function does not check any of `window-fixed-size-p',
3541`window-min-height' or `window-min-width'. All these checks have to 3556`window-min-height' or `window-min-width'. All these checks have to
@@ -3931,12 +3946,12 @@ Signal an error when WINDOW is the only window on its frame. */)
3931 3946
3932 if (!NILP (w->vchild)) 3947 if (!NILP (w->vchild))
3933 { 3948 {
3934 delete_all_subwindows (w->vchild); 3949 delete_all_child_windows (w->vchild);
3935 w->vchild = Qnil; 3950 w->vchild = Qnil;
3936 } 3951 }
3937 else if (!NILP (w->hchild)) 3952 else if (!NILP (w->hchild))
3938 { 3953 {
3939 delete_all_subwindows (w->hchild); 3954 delete_all_child_windows (w->hchild);
3940 w->hchild = Qnil; 3955 w->hchild = Qnil;
3941 } 3956 }
3942 else if (!NILP (w->buffer)) 3957 else if (!NILP (w->buffer))
@@ -5218,10 +5233,10 @@ and redisplay normally--don't erase and redraw the frame. */)
5218DEFUN ("window-text-height", Fwindow_text_height, Swindow_text_height, 5233DEFUN ("window-text-height", Fwindow_text_height, Swindow_text_height,
5219 0, 1, 0, 5234 0, 1, 0,
5220 doc: /* Return the height in lines of the text display area of WINDOW. 5235 doc: /* Return the height in lines of the text display area of WINDOW.
5221WINDOW defaults to the selected window. 5236If WINDOW is omitted or nil, it defaults to the selected window.
5222 5237
5223The return value does not include the mode line, any header line, nor 5238The returned height does not include the mode line, any header line,
5224any partial-height lines in the text display area. */) 5239nor any partial-height lines at the bottom of the text area. */)
5225 (Lisp_Object window) 5240 (Lisp_Object window)
5226{ 5241{
5227 struct window *w = decode_window (window); 5242 struct window *w = decode_window (window);
@@ -5515,7 +5530,7 @@ the return value is nil. Otherwise the value is t. */)
5515 Save their current buffers in their height fields, since we may 5530 Save their current buffers in their height fields, since we may
5516 need it later, if a buffer saved in the configuration is now 5531 need it later, if a buffer saved in the configuration is now
5517 dead. */ 5532 dead. */
5518 delete_all_subwindows (FRAME_ROOT_WINDOW (f)); 5533 delete_all_child_windows (FRAME_ROOT_WINDOW (f));
5519 5534
5520 for (k = 0; k < saved_windows->header.size; k++) 5535 for (k = 0; k < saved_windows->header.size; k++)
5521 { 5536 {
@@ -5729,10 +5744,10 @@ the return value is nil. Otherwise the value is t. */)
5729} 5744}
5730 5745
5731 5746
5732/* Delete all subwindows reachable via the next, vchild, and hchild 5747/* Recursively delete all child windows reachable via the next, vchild,
5733 slots of WINDOW. */ 5748 and hchild slots of WINDOW. */
5734void 5749void
5735delete_all_subwindows (Lisp_Object window) 5750delete_all_child_windows (Lisp_Object window)
5736{ 5751{
5737 register struct window *w; 5752 register struct window *w;
5738 5753
@@ -5740,18 +5755,18 @@ delete_all_subwindows (Lisp_Object window)
5740 5755
5741 if (!NILP (w->next)) 5756 if (!NILP (w->next))
5742 /* Delete WINDOW's siblings (we traverse postorderly). */ 5757 /* Delete WINDOW's siblings (we traverse postorderly). */
5743 delete_all_subwindows (w->next); 5758 delete_all_child_windows (w->next);
5744 5759
5745 w->total_lines = w->buffer; /* See Fset_window_configuration for excuse. */ 5760 w->total_lines = w->buffer; /* See Fset_window_configuration for excuse. */
5746 5761
5747 if (!NILP (w->vchild)) 5762 if (!NILP (w->vchild))
5748 { 5763 {
5749 delete_all_subwindows (w->vchild); 5764 delete_all_child_windows (w->vchild);
5750 w->vchild = Qnil; 5765 w->vchild = Qnil;
5751 } 5766 }
5752 else if (!NILP (w->hchild)) 5767 else if (!NILP (w->hchild))
5753 { 5768 {
5754 delete_all_subwindows (w->hchild); 5769 delete_all_child_windows (w->hchild);
5755 w->hchild = Qnil; 5770 w->hchild = Qnil;
5756 } 5771 }
5757 else if (!NILP (w->buffer)) 5772 else if (!NILP (w->buffer))
@@ -6583,14 +6598,16 @@ function `window-nest' and altered by the function `set-window-nest'. */);
6583 defsubr (&Swindow_use_time); 6598 defsubr (&Swindow_use_time);
6584 defsubr (&Swindow_top_line); 6599 defsubr (&Swindow_top_line);
6585 defsubr (&Swindow_left_column); 6600 defsubr (&Swindow_left_column);
6586 defsubr (&Swindow_total_size); 6601 defsubr (&Swindow_total_height);
6602 defsubr (&Swindow_total_width);
6587 defsubr (&Swindow_normal_size); 6603 defsubr (&Swindow_normal_size);
6588 defsubr (&Swindow_new_total); 6604 defsubr (&Swindow_new_total);
6589 defsubr (&Swindow_new_normal); 6605 defsubr (&Swindow_new_normal);
6590 defsubr (&Sset_window_new_total); 6606 defsubr (&Sset_window_new_total);
6591 defsubr (&Sset_window_new_normal); 6607 defsubr (&Sset_window_new_normal);
6592 defsubr (&Swindow_resize_apply); 6608 defsubr (&Swindow_resize_apply);
6593 defsubr (&Swindow_body_size); 6609 defsubr (&Swindow_body_height);
6610 defsubr (&Swindow_body_width);
6594 defsubr (&Swindow_hscroll); 6611 defsubr (&Swindow_hscroll);
6595 defsubr (&Sset_window_hscroll); 6612 defsubr (&Sset_window_hscroll);
6596 defsubr (&Swindow_redisplay_end_trigger); 6613 defsubr (&Swindow_redisplay_end_trigger);