aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoakim Verona2011-11-07 16:08:00 +0100
committerJoakim Verona2011-11-07 16:08:00 +0100
commit8520d9c4e50520db79410ec6ef0052df129231dc (patch)
tree955a62eddf28b5aa3f68842cf440683646067773 /src
parentd66104e9adbe7110dc46e12ea99624d2dff938b2 (diff)
parent05a61ee3e61026ee010206355509a2d0e7ec15c2 (diff)
downloademacs-8520d9c4e50520db79410ec6ef0052df129231dc.tar.gz
emacs-8520d9c4e50520db79410ec6ef0052df129231dc.zip
upstream
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog13
-rw-r--r--src/frame.c2
-rw-r--r--src/window.c76
-rw-r--r--src/window.h2
4 files changed, 53 insertions, 40 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3711292ad35..5b406a7bc46 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,16 @@
12011-11-07 Martin Rudalics <rudalics@gmx.at>
2
3 * window.h: Declare delete_all_child_windows instead of
4 delete_all_subwindows.
5 * window.c (Fwindow_nest, Fset_window_nest)
6 (Fset_window_new_total, Fset_window_new_normal)
7 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
8 (delete_all_subwindows): Rename to delete_all_child_windows.
9 (Fdelete_other_windows_internal, Fset_window_configuration):
10 Call delete_all_child_windows instead of delete_all_subwindows.
11 * frame.c (delete_frame): Call delete_all_child_windows instead
12 of delete_all_subwindows.
13
12011-11-07 Paul Eggert <eggert@cs.ucla.edu> 142011-11-07 Paul Eggert <eggert@cs.ucla.edu>
2 15
3 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926). 16 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
diff --git a/src/frame.c b/src/frame.c
index 112f102a1f2..d56a2efb17f 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1320,7 +1320,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
1320 1320
1321 /* Mark all the windows that used to be on FRAME as deleted, and then 1321 /* Mark all the windows that used to be on FRAME as deleted, and then
1322 remove the reference to them. */ 1322 remove the reference to them. */
1323 delete_all_subwindows (f->root_window); 1323 delete_all_child_windows (f->root_window);
1324 f->root_window = Qnil; 1324 f->root_window = Qnil;
1325 1325
1326 Vframe_list = Fdelq (frame, Vframe_list); 1326 Vframe_list = Fdelq (frame, Vframe_list);
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.
507If WINDOW is omitted or nil, it defaults to the selected window. 507If WINDOW is omitted or nil, it defaults to the selected window.
508 508
509If the return value is nil, subwindows of WINDOW can be recombined with 509If the return value is nil, child windows of WINDOW can be recombined with
510WINDOW's siblings. A return value of non-nil means that subwindows of 510WINDOW's siblings. A return value of non-nil means that child windows of
511WINDOW are never \(re-)combined with WINDOW's siblings. */) 511WINDOW 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.
519If WINDOW is omitted or nil, it defaults to the selected window. 519If WINDOW is omitted or nil, it defaults to the selected window.
520 520
521If STATUS is nil, subwindows of WINDOW can be recombined with WINDOW's 521If STATUS is nil, child windows of WINDOW can be recombined with WINDOW's
522siblings. STATUS non-nil means that subwindows of WINDOW are never 522siblings. 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,
2573Only the frame WINDOW is on is affected. WINDOW may be any window and 2573Only the frame WINDOW is on is affected. WINDOW may be any window and
2574defaults to the selected one. 2574defaults to the selected one.
2575 2575
2576Optional argument ROOT, if non-nil, must specify an internal window 2576Optional argument ROOT, if non-nil, must specify an internal window such
2577containing WINDOW as a subwindow. If this is the case, replace ROOT by 2577that WINDOW is in its window subtree. If this is the case, replace ROOT
2578WINDOW and leave alone any windows not contained in ROOT. 2578by WINDOW and leave alone any windows not part of ROOT's subtree.
2579 2579
2580When WINDOW is live try to reduce display jumps by keeping the text 2580When WINDOW is live try to reduce display jumps by keeping the text
2581previously visible in WINDOW in the same place on the frame. Doing this 2581previously 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.
3351Optional argument ADD non-nil means add SIZE to the new total size of 3351Optional argument ADD non-nil means add SIZE to the new total size of
3352WINDOW and return the sum. 3352WINDOW and return the sum.
3353 3353
3354Note: This function does not operate on any subwindows of WINDOW. */) 3354Note: 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.
3370Return SIZE. 3370Return SIZE.
3371 3371
3372Note: This function does not operate on any subwindows of WINDOW. */) 3372Note: 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
3536values. HORIZONTAL non-nil means apply requested width values. 3536values. HORIZONTAL non-nil means apply requested width values.
3537 3537
3538This function checks whether the requested values sum up to a valid 3538This function checks whether the requested values sum up to a valid
3539window layout, recursively assigns the new sizes of all subwindows and 3539window layout, recursively assigns the new sizes of all child windows
3540calculates and assigns the new start positions of these windows. 3540and calculates and assigns the new start positions of these windows.
3541 3541
3542Note: This function does not check any of `window-fixed-size-p', 3542Note: 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. */
5739void 5739void
5740delete_all_subwindows (Lisp_Object window) 5740delete_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))
diff --git a/src/window.h b/src/window.h
index c6fa5e7a338..6a9641e3e6d 100644
--- a/src/window.h
+++ b/src/window.h
@@ -824,7 +824,7 @@ extern Lisp_Object window_from_coordinates (struct frame *, int, int,
824 enum window_part *, int); 824 enum window_part *, int);
825EXFUN (Fwindow_dedicated_p, 1); 825EXFUN (Fwindow_dedicated_p, 1);
826extern void resize_frame_windows (struct frame *, int, int); 826extern void resize_frame_windows (struct frame *, int, int);
827extern void delete_all_subwindows (Lisp_Object); 827extern void delete_all_child_windows (Lisp_Object);
828extern void freeze_window_starts (struct frame *, int); 828extern void freeze_window_starts (struct frame *, int);
829extern void grow_mini_window (struct window *, int); 829extern void grow_mini_window (struct window *, int);
830extern void shrink_mini_window (struct window *); 830extern void shrink_mini_window (struct window *);