diff options
| author | Martin Rudalics | 2012-11-07 10:41:52 +0100 |
|---|---|---|
| committer | Martin Rudalics | 2012-11-07 10:41:52 +0100 |
| commit | fdaf534a7b1f94563065f0136cb7bac981722877 (patch) | |
| tree | 7fe4b0539c7d1915a888bb2aaa0bd447c740a3bf /src | |
| parent | 031b2ea7f5cefc53885d469c3c37ef68103d49aa (diff) | |
| download | emacs-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/ChangeLog | 8 | ||||
| -rw-r--r-- | src/window.c | 23 |
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 @@ | |||
| 1 | 2012-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 | |||
| 1 | 2012-11-06 Eli Zaretskii <eliz@gnu.org> | 9 | 2012-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 | ||
| 601 | DEFUN ("window-combination-limit", Fwindow_combination_limit, Swindow_combination_limit, 1, 1, 0, | 601 | DEFUN ("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. |
| 603 | WINDOW must be a valid window and defaults to the selected one. | 603 | If the return value is nil, child windows of WINDOW can be recombined |
| 604 | If the return value is nil, child windows of WINDOW can be recombined with | 604 | with WINDOW's siblings. A return value of t means that child windows of |
| 605 | WINDOW's siblings. A return value of t means that child windows of | 605 | WINDOW are never \(re-)combined with WINDOW's siblings. |
| 606 | WINDOW are never \(re-)combined with WINDOW's siblings. */) | 606 | |
| 607 | WINDOW must be a valid window. The return value is meaningful for | ||
| 608 | internal 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 | ||
| 612 | DEFUN ("set-window-combination-limit", Fset_window_combination_limit, Sset_window_combination_limit, 2, 2, 0, | 614 | DEFUN ("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. |
| 614 | WINDOW must be a valid window and defaults to the selected one. | ||
| 615 | If LIMIT is nil, child windows of WINDOW can be recombined with WINDOW's | 616 | If LIMIT is nil, child windows of WINDOW can be recombined with WINDOW's |
| 616 | siblings. LIMIT t means that child windows of WINDOW are never | 617 | siblings. 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 |
| 618 | future use. */) | 619 | future use. |
| 620 | |||
| 621 | WINDOW must be a valid window. Setting the combination limit is | ||
| 622 | meaningful 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); |