diff options
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/src/window.c b/src/window.c index 5cc77fb8f02..078b39cc2f1 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -506,8 +506,8 @@ DEFUN ("window-nest", Fwindow_nest, Swindow_nest, 0, 1, 0, | |||
| 506 | doc: /* Return nest status of window WINDOW. | 506 | doc: /* Return nest status of window WINDOW. |
| 507 | If WINDOW is omitted or nil, it defaults to the selected window. | 507 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 508 | 508 | ||
| 509 | If the return value is nil, subwindows of WINDOW can be recombined with | 509 | If the return value is nil, child windows of WINDOW can be recombined with |
| 510 | WINDOW's siblings. A return value of non-nil means that subwindows of | 510 | WINDOW's siblings. A return value of non-nil means that child windows of |
| 511 | WINDOW are never \(re-)combined with WINDOW's siblings. */) | 511 | WINDOW are never \(re-)combined with WINDOW's siblings. */) |
| 512 | (Lisp_Object window) | 512 | (Lisp_Object window) |
| 513 | { | 513 | { |
| @@ -518,8 +518,8 @@ DEFUN ("set-window-nest", Fset_window_nest, Sset_window_nest, 2, 2, 0, | |||
| 518 | doc: /* Set nest status of window WINDOW to STATUS; return STATUS. | 518 | doc: /* Set nest status of window WINDOW to STATUS; return STATUS. |
| 519 | If WINDOW is omitted or nil, it defaults to the selected window. | 519 | If WINDOW is omitted or nil, it defaults to the selected window. |
| 520 | 520 | ||
| 521 | If STATUS is nil, subwindows of WINDOW can be recombined with WINDOW's | 521 | If STATUS is nil, child windows of WINDOW can be recombined with WINDOW's |
| 522 | siblings. STATUS non-nil means that subwindows of WINDOW are never | 522 | siblings. STATUS non-nil means that child windows of WINDOW are never |
| 523 | \(re-)combined with WINDOW's siblings. */) | 523 | \(re-)combined with WINDOW's siblings. */) |
| 524 | (Lisp_Object window, Lisp_Object status) | 524 | (Lisp_Object window, Lisp_Object status) |
| 525 | { | 525 | { |
| @@ -2573,9 +2573,9 @@ DEFUN ("delete-other-windows-internal", Fdelete_other_windows_internal, | |||
| 2573 | Only the frame WINDOW is on is affected. WINDOW may be any window and | 2573 | Only the frame WINDOW is on is affected. WINDOW may be any window and |
| 2574 | defaults to the selected one. | 2574 | defaults to the selected one. |
| 2575 | 2575 | ||
| 2576 | Optional argument ROOT, if non-nil, must specify an internal window | 2576 | Optional argument ROOT, if non-nil, must specify an internal window such |
| 2577 | containing WINDOW as a subwindow. If this is the case, replace ROOT by | 2577 | that WINDOW is in its window subtree. If this is the case, replace ROOT |
| 2578 | WINDOW and leave alone any windows not contained in ROOT. | 2578 | by WINDOW and leave alone any windows not part of ROOT's subtree. |
| 2579 | 2579 | ||
| 2580 | When WINDOW is live try to reduce display jumps by keeping the text | 2580 | When WINDOW is live try to reduce display jumps by keeping the text |
| 2581 | previously visible in WINDOW in the same place on the frame. Doing this | 2581 | previously visible in WINDOW in the same place on the frame. Doing this |
| @@ -2639,10 +2639,10 @@ window-start value is reasonable when this function is called. */) | |||
| 2639 | } | 2639 | } |
| 2640 | else | 2640 | else |
| 2641 | { | 2641 | { |
| 2642 | /* See if the frame's selected window is a subwindow of WINDOW, by | 2642 | /* See if the frame's selected window is a part of the window |
| 2643 | finding all the selected window's parents and comparing each | 2643 | subtree rooted at WINDOW, by finding all the selected window's |
| 2644 | one with WINDOW. If it isn't we need a new selected window for | 2644 | parents and comparing each one with WINDOW. If it isn't we |
| 2645 | this frame. */ | 2645 | need a new selected window for this frame. */ |
| 2646 | swindow = FRAME_SELECTED_WINDOW (f); | 2646 | swindow = FRAME_SELECTED_WINDOW (f); |
| 2647 | while (1) | 2647 | while (1) |
| 2648 | { | 2648 | { |
| @@ -2678,7 +2678,7 @@ window-start value is reasonable when this function is called. */) | |||
| 2678 | 2678 | ||
| 2679 | if (NILP (w->buffer)) | 2679 | if (NILP (w->buffer)) |
| 2680 | { | 2680 | { |
| 2681 | /* Resize subwindows vertically. */ | 2681 | /* Resize child windows vertically. */ |
| 2682 | XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines)); | 2682 | XSETINT (delta, XINT (r->total_lines) - XINT (w->total_lines)); |
| 2683 | w->top_line = r->top_line; | 2683 | w->top_line = r->top_line; |
| 2684 | resize_root_window (window, delta, Qnil, Qnil); | 2684 | resize_root_window (window, delta, Qnil, Qnil); |
| @@ -2693,7 +2693,7 @@ window-start value is reasonable when this function is called. */) | |||
| 2693 | resize_failed = 1; | 2693 | resize_failed = 1; |
| 2694 | } | 2694 | } |
| 2695 | 2695 | ||
| 2696 | /* Resize subwindows horizontally. */ | 2696 | /* Resize child windows horizontally. */ |
| 2697 | if (!resize_failed) | 2697 | if (!resize_failed) |
| 2698 | { | 2698 | { |
| 2699 | w->left_col = r->left_col; | 2699 | w->left_col = r->left_col; |
| @@ -2742,15 +2742,15 @@ window-start value is reasonable when this function is called. */) | |||
| 2742 | XWINDOW (w->parent)->hchild = sibling; | 2742 | XWINDOW (w->parent)->hchild = sibling; |
| 2743 | } | 2743 | } |
| 2744 | 2744 | ||
| 2745 | /* Delete ROOT and all subwindows of ROOT. */ | 2745 | /* Delete ROOT and all child windows of ROOT. */ |
| 2746 | if (!NILP (r->vchild)) | 2746 | if (!NILP (r->vchild)) |
| 2747 | { | 2747 | { |
| 2748 | delete_all_subwindows (r->vchild); | 2748 | delete_all_child_windows (r->vchild); |
| 2749 | r->vchild = Qnil; | 2749 | r->vchild = Qnil; |
| 2750 | } | 2750 | } |
| 2751 | else if (!NILP (r->hchild)) | 2751 | else if (!NILP (r->hchild)) |
| 2752 | { | 2752 | { |
| 2753 | delete_all_subwindows (r->hchild); | 2753 | delete_all_child_windows (r->hchild); |
| 2754 | r->hchild = Qnil; | 2754 | r->hchild = Qnil; |
| 2755 | } | 2755 | } |
| 2756 | 2756 | ||
| @@ -3351,7 +3351,7 @@ Return SIZE. | |||
| 3351 | Optional argument ADD non-nil means add SIZE to the new total size of | 3351 | Optional argument ADD non-nil means add SIZE to the new total size of |
| 3352 | WINDOW and return the sum. | 3352 | WINDOW and return the sum. |
| 3353 | 3353 | ||
| 3354 | Note: This function does not operate on any subwindows of WINDOW. */) | 3354 | Note: This function does not operate on any child windows of WINDOW. */) |
| 3355 | (Lisp_Object window, Lisp_Object size, Lisp_Object add) | 3355 | (Lisp_Object window, Lisp_Object size, Lisp_Object add) |
| 3356 | { | 3356 | { |
| 3357 | struct window *w = decode_any_window (window); | 3357 | struct window *w = decode_any_window (window); |
| @@ -3369,7 +3369,7 @@ DEFUN ("set-window-new-normal", Fset_window_new_normal, Sset_window_new_normal, | |||
| 3369 | doc: /* Set new normal size of WINDOW to SIZE. | 3369 | doc: /* Set new normal size of WINDOW to SIZE. |
| 3370 | Return SIZE. | 3370 | Return SIZE. |
| 3371 | 3371 | ||
| 3372 | Note: This function does not operate on any subwindows of WINDOW. */) | 3372 | Note: This function does not operate on any child windows of WINDOW. */) |
| 3373 | (Lisp_Object window, Lisp_Object size) | 3373 | (Lisp_Object window, Lisp_Object size) |
| 3374 | { | 3374 | { |
| 3375 | struct window *w = decode_any_window (window); | 3375 | struct window *w = decode_any_window (window); |
| @@ -3380,7 +3380,7 @@ Note: This function does not operate on any subwindows of WINDOW. */) | |||
| 3380 | 3380 | ||
| 3381 | /* Return 1 if setting w->total_lines (w->total_cols if HORFLAG is | 3381 | /* Return 1 if setting w->total_lines (w->total_cols if HORFLAG is |
| 3382 | non-zero) to w->new_total would result in correct heights (widths) | 3382 | non-zero) to w->new_total would result in correct heights (widths) |
| 3383 | for window W and recursively all subwindows of W. | 3383 | for window W and recursively all child windows of W. |
| 3384 | 3384 | ||
| 3385 | Note: This function does not check any of `window-fixed-size-p', | 3385 | Note: This function does not check any of `window-fixed-size-p', |
| 3386 | `window-min-height' or `window-min-width'. It does check that window | 3386 | `window-min-height' or `window-min-width'. It does check that window |
| @@ -3395,7 +3395,7 @@ window_resize_check (struct window *w, int horflag) | |||
| 3395 | { | 3395 | { |
| 3396 | c = XWINDOW (w->vchild); | 3396 | c = XWINDOW (w->vchild); |
| 3397 | if (horflag) | 3397 | if (horflag) |
| 3398 | /* All subwindows of W must have the same width as W. */ | 3398 | /* All child windows of W must have the same width as W. */ |
| 3399 | { | 3399 | { |
| 3400 | while (c) | 3400 | while (c) |
| 3401 | { | 3401 | { |
| @@ -3407,8 +3407,8 @@ window_resize_check (struct window *w, int horflag) | |||
| 3407 | return 1; | 3407 | return 1; |
| 3408 | } | 3408 | } |
| 3409 | else | 3409 | else |
| 3410 | /* The sum of the heights of the subwindows of W must equal W's | 3410 | /* The sum of the heights of the child windows of W must equal |
| 3411 | height. */ | 3411 | W's height. */ |
| 3412 | { | 3412 | { |
| 3413 | int sum_of_sizes = 0; | 3413 | int sum_of_sizes = 0; |
| 3414 | while (c) | 3414 | while (c) |
| @@ -3426,7 +3426,7 @@ window_resize_check (struct window *w, int horflag) | |||
| 3426 | { | 3426 | { |
| 3427 | c = XWINDOW (w->hchild); | 3427 | c = XWINDOW (w->hchild); |
| 3428 | if (horflag) | 3428 | if (horflag) |
| 3429 | /* The sum of the widths of the subwindows of W must equal W's | 3429 | /* The sum of the widths of the child windows of W must equal W's |
| 3430 | width. */ | 3430 | width. */ |
| 3431 | { | 3431 | { |
| 3432 | int sum_of_sizes = 0; | 3432 | int sum_of_sizes = 0; |
| @@ -3440,7 +3440,7 @@ window_resize_check (struct window *w, int horflag) | |||
| 3440 | return (sum_of_sizes == XINT (w->new_total)); | 3440 | return (sum_of_sizes == XINT (w->new_total)); |
| 3441 | } | 3441 | } |
| 3442 | else | 3442 | else |
| 3443 | /* All subwindows of W must have the same height as W. */ | 3443 | /* All child windows of W must have the same height as W. */ |
| 3444 | { | 3444 | { |
| 3445 | while (c) | 3445 | while (c) |
| 3446 | { | 3446 | { |
| @@ -3460,9 +3460,9 @@ window_resize_check (struct window *w, int horflag) | |||
| 3460 | } | 3460 | } |
| 3461 | 3461 | ||
| 3462 | /* Set w->total_lines (w->total_cols if HORIZONTAL is non-zero) to | 3462 | /* Set w->total_lines (w->total_cols if HORIZONTAL is non-zero) to |
| 3463 | w->new_total for window W and recursively all subwindows of W. Also | 3463 | w->new_total for window W and recursively all child windows of W. |
| 3464 | calculate and assign the new vertical (horizontal) start positions of | 3464 | Also calculate and assign the new vertical (horizontal) start |
| 3465 | each of these windows. | 3465 | positions of each of these windows. |
| 3466 | 3466 | ||
| 3467 | This function does not perform any error checks. Make sure you have | 3467 | This function does not perform any error checks. Make sure you have |
| 3468 | run window_resize_check on W before applying this function. */ | 3468 | run window_resize_check on W before applying this function. */ |
| @@ -3536,8 +3536,8 @@ Optional argument HORIZONTAL omitted or nil means apply requested height | |||
| 3536 | values. HORIZONTAL non-nil means apply requested width values. | 3536 | values. HORIZONTAL non-nil means apply requested width values. |
| 3537 | 3537 | ||
| 3538 | This function checks whether the requested values sum up to a valid | 3538 | This function checks whether the requested values sum up to a valid |
| 3539 | window layout, recursively assigns the new sizes of all subwindows and | 3539 | window layout, recursively assigns the new sizes of all child windows |
| 3540 | calculates and assigns the new start positions of these windows. | 3540 | and calculates and assigns the new start positions of these windows. |
| 3541 | 3541 | ||
| 3542 | Note: This function does not check any of `window-fixed-size-p', | 3542 | Note: This function does not check any of `window-fixed-size-p', |
| 3543 | `window-min-height' or `window-min-width'. All these checks have to | 3543 | `window-min-height' or `window-min-width'. All these checks have to |
| @@ -3936,12 +3936,12 @@ Signal an error when WINDOW is the only window on its frame. */) | |||
| 3936 | 3936 | ||
| 3937 | if (!NILP (w->vchild)) | 3937 | if (!NILP (w->vchild)) |
| 3938 | { | 3938 | { |
| 3939 | delete_all_subwindows (w->vchild); | 3939 | delete_all_child_windows (w->vchild); |
| 3940 | w->vchild = Qnil; | 3940 | w->vchild = Qnil; |
| 3941 | } | 3941 | } |
| 3942 | else if (!NILP (w->hchild)) | 3942 | else if (!NILP (w->hchild)) |
| 3943 | { | 3943 | { |
| 3944 | delete_all_subwindows (w->hchild); | 3944 | delete_all_child_windows (w->hchild); |
| 3945 | w->hchild = Qnil; | 3945 | w->hchild = Qnil; |
| 3946 | } | 3946 | } |
| 3947 | else if (!NILP (w->buffer)) | 3947 | else if (!NILP (w->buffer)) |
| @@ -5520,7 +5520,7 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5520 | Save their current buffers in their height fields, since we may | 5520 | Save their current buffers in their height fields, since we may |
| 5521 | need it later, if a buffer saved in the configuration is now | 5521 | need it later, if a buffer saved in the configuration is now |
| 5522 | dead. */ | 5522 | dead. */ |
| 5523 | delete_all_subwindows (FRAME_ROOT_WINDOW (f)); | 5523 | delete_all_child_windows (FRAME_ROOT_WINDOW (f)); |
| 5524 | 5524 | ||
| 5525 | for (k = 0; k < saved_windows->header.size; k++) | 5525 | for (k = 0; k < saved_windows->header.size; k++) |
| 5526 | { | 5526 | { |
| @@ -5734,10 +5734,10 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5734 | } | 5734 | } |
| 5735 | 5735 | ||
| 5736 | 5736 | ||
| 5737 | /* Delete all subwindows reachable via the next, vchild, and hchild | 5737 | /* Recursively delete all child windows reachable via the next, vchild, |
| 5738 | slots of WINDOW. */ | 5738 | and hchild slots of WINDOW. */ |
| 5739 | void | 5739 | void |
| 5740 | delete_all_subwindows (Lisp_Object window) | 5740 | delete_all_child_windows (Lisp_Object window) |
| 5741 | { | 5741 | { |
| 5742 | register struct window *w; | 5742 | register struct window *w; |
| 5743 | 5743 | ||
| @@ -5745,18 +5745,18 @@ delete_all_subwindows (Lisp_Object window) | |||
| 5745 | 5745 | ||
| 5746 | if (!NILP (w->next)) | 5746 | if (!NILP (w->next)) |
| 5747 | /* Delete WINDOW's siblings (we traverse postorderly). */ | 5747 | /* Delete WINDOW's siblings (we traverse postorderly). */ |
| 5748 | delete_all_subwindows (w->next); | 5748 | delete_all_child_windows (w->next); |
| 5749 | 5749 | ||
| 5750 | w->total_lines = w->buffer; /* See Fset_window_configuration for excuse. */ | 5750 | w->total_lines = w->buffer; /* See Fset_window_configuration for excuse. */ |
| 5751 | 5751 | ||
| 5752 | if (!NILP (w->vchild)) | 5752 | if (!NILP (w->vchild)) |
| 5753 | { | 5753 | { |
| 5754 | delete_all_subwindows (w->vchild); | 5754 | delete_all_child_windows (w->vchild); |
| 5755 | w->vchild = Qnil; | 5755 | w->vchild = Qnil; |
| 5756 | } | 5756 | } |
| 5757 | else if (!NILP (w->hchild)) | 5757 | else if (!NILP (w->hchild)) |
| 5758 | { | 5758 | { |
| 5759 | delete_all_subwindows (w->hchild); | 5759 | delete_all_child_windows (w->hchild); |
| 5760 | w->hchild = Qnil; | 5760 | w->hchild = Qnil; |
| 5761 | } | 5761 | } |
| 5762 | else if (!NILP (w->buffer)) | 5762 | else if (!NILP (w->buffer)) |