aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Rudalics2012-11-07 10:41:52 +0100
committerMartin Rudalics2012-11-07 10:41:52 +0100
commitfdaf534a7b1f94563065f0136cb7bac981722877 (patch)
tree7fe4b0539c7d1915a888bb2aaa0bd447c740a3bf /src
parent031b2ea7f5cefc53885d469c3c37ef68103d49aa (diff)
downloademacs-fdaf534a7b1f94563065f0136cb7bac981722877.tar.gz
emacs-fdaf534a7b1f94563065f0136cb7bac981722877.zip
Fix and rewrite doc on window recombining facilities.
* window.c (Fsplit_window_internal): Set combination limit of new parent window to t iff Vwindow_combination_limit is t; fixing a regression introduced with the change from 2012-09-22. (Fwindow_combination_limit, Fset_window_combination_limit): Fix doc-strings. * elisp.texi (Top): Add Recombining Windows to menu. * windows.texi (Recombining Windows): New subsection. (Splitting Windows): Rewrite text on handling of window combinations and move it to new subsection.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/window.c23
2 files changed, 22 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 11e657cffa9..9e0f92f557e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12012-11-07 Martin Rudalics <rudalics@gmx.at>
2
3 * window.c (Fsplit_window_internal): Set combination limit of
4 new parent window to t iff Vwindow_combination_limit is t;
5 fixing a regression introduced with the change from 2012-09-22.
6 (Fwindow_combination_limit, Fset_window_combination_limit): Fix
7 doc-strings.
8
12012-11-06 Eli Zaretskii <eliz@gnu.org> 92012-11-06 Eli Zaretskii <eliz@gnu.org>
2 10
3 * xdisp.c (try_scrolling): Fix correction of aggressive-scroll 11 * xdisp.c (try_scrolling): Fix correction of aggressive-scroll
diff --git a/src/window.c b/src/window.c
index dfcabda59b9..4981b8cd7c0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -600,10 +600,12 @@ Return nil if WINDOW has no previous sibling. */)
600 600
601DEFUN ("window-combination-limit", Fwindow_combination_limit, Swindow_combination_limit, 1, 1, 0, 601DEFUN ("window-combination-limit", Fwindow_combination_limit, Swindow_combination_limit, 1, 1, 0,
602 doc: /* Return combination limit of window WINDOW. 602 doc: /* Return combination limit of window WINDOW.
603WINDOW must be a valid window and defaults to the selected one. 603If the return value is nil, child windows of WINDOW can be recombined
604If the return value is nil, child windows of WINDOW can be recombined with 604with WINDOW's siblings. A return value of t means that child windows of
605WINDOW's siblings. A return value of t means that child windows of 605WINDOW are never \(re-)combined with WINDOW's siblings.
606WINDOW are never \(re-)combined with WINDOW's siblings. */) 606
607WINDOW must be a valid window. The return value is meaningful for
608internal windows only. */)
607 (Lisp_Object window) 609 (Lisp_Object window)
608{ 610{
609 return decode_valid_window (window)->combination_limit; 611 return decode_valid_window (window)->combination_limit;
@@ -611,11 +613,13 @@ WINDOW are never \(re-)combined with WINDOW's siblings. */)
611 613
612DEFUN ("set-window-combination-limit", Fset_window_combination_limit, Sset_window_combination_limit, 2, 2, 0, 614DEFUN ("set-window-combination-limit", Fset_window_combination_limit, Sset_window_combination_limit, 2, 2, 0,
613 doc: /* Set combination limit of window WINDOW to LIMIT; return LIMIT. 615 doc: /* Set combination limit of window WINDOW to LIMIT; return LIMIT.
614WINDOW must be a valid window and defaults to the selected one.
615If LIMIT is nil, child windows of WINDOW can be recombined with WINDOW's 616If LIMIT is nil, child windows of WINDOW can be recombined with WINDOW's
616siblings. LIMIT t means that child windows of WINDOW are never 617siblings. LIMIT t means that child windows of WINDOW are never
617\(re-)combined with WINDOW's siblings. Other values are reserved for 618\(re-)combined with WINDOW's siblings. Other values are reserved for
618future use. */) 619future use.
620
621WINDOW must be a valid window. Setting the combination limit is
622meaningful for internal windows only. */)
619 (Lisp_Object window, Lisp_Object limit) 623 (Lisp_Object window, Lisp_Object limit)
620{ 624{
621 wset_combination_limit (decode_valid_window (window), limit); 625 wset_combination_limit (decode_valid_window (window), limit);
@@ -3892,9 +3896,10 @@ set correctly. See the code of `split-window' for how this is done. */)
3892 3896
3893 make_parent_window (old, horflag); 3897 make_parent_window (old, horflag);
3894 p = XWINDOW (o->parent); 3898 p = XWINDOW (o->parent);
3895 /* Store t in the new parent's combination_limit slot to avoid 3899 if (EQ (Vwindow_combination_limit, Qt))
3896 that its children get merged into another window. */ 3900 /* Store t in the new parent's combination_limit slot to avoid
3897 wset_combination_limit (p, Qt); 3901 that its children get merged into another window. */
3902 wset_combination_limit (p, Qt);
3898 /* These get applied below. */ 3903 /* These get applied below. */
3899 wset_new_total (p, horflag ? o->total_cols : o->total_lines); 3904 wset_new_total (p, horflag ? o->total_cols : o->total_lines);
3900 wset_new_normal (p, new_normal); 3905 wset_new_normal (p, new_normal);