diff options
| author | Martin Rudalics | 2014-03-07 10:53:23 +0100 |
|---|---|---|
| committer | Martin Rudalics | 2014-03-07 10:53:23 +0100 |
| commit | f2c5082b9302fa6eb6be3f0b502528a8d61cc813 (patch) | |
| tree | 7b2575324fb33d60f2c3ab48485f11dcc4db1d02 | |
| parent | 27821a89847575b3249bb42d1050f6e1d21a5eac (diff) | |
| download | emacs-f2c5082b9302fa6eb6be3f0b502528a8d61cc813.tar.gz emacs-f2c5082b9302fa6eb6be3f0b502528a8d61cc813.zip | |
Add/update elisp texinfo for window-min-size and split-window.
* windows.texi (Window Sizes): Describe `window-min-size'.
(Splitting Windows): Update description of `split-window'.
| -rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/windows.texi | 60 |
2 files changed, 57 insertions, 8 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index cac66f6e9e1..114d0197308 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-03-07 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * windows.texi (Window Sizes): Describe `window-min-size'. | ||
| 4 | (Splitting Windows): Update description of `split-window'. | ||
| 5 | |||
| 1 | 2014-03-06 Martin Rudalics <rudalics@gmx.at> | 6 | 2014-03-06 Martin Rudalics <rudalics@gmx.at> |
| 2 | 7 | ||
| 3 | * frames.texi (Size and Position): Rewrite entries for | 8 | * frames.texi (Size and Position): Rewrite entries for |
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 3fa4117e52c..0020c8bc967 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -656,6 +656,36 @@ determine that, use the function @code{window-resizable}. | |||
| 656 | @xref{Resizing Windows}. | 656 | @xref{Resizing Windows}. |
| 657 | @end defvar | 657 | @end defvar |
| 658 | 658 | ||
| 659 | The following function tells how small a specific window can get taking | ||
| 660 | into account the sizes of its areas and the values of | ||
| 661 | @code{window-min-height}, @code{window-min-width} and | ||
| 662 | @code{window-size-fixed}. | ||
| 663 | |||
| 664 | @defun window-min-size &optional window horizontal ignore pixelwise | ||
| 665 | This function returns the minimum size of @var{window}. @var{window} | ||
| 666 | must be a valid window and defaults to the selected one. The optional | ||
| 667 | argument @var{horizontal} non-@code{nil} means to return the minimum | ||
| 668 | number of columns of @var{window}; otherwise return the minimum number | ||
| 669 | of @var{window}'s lines. | ||
| 670 | |||
| 671 | The return value makes sure that all components of @var{window} remain | ||
| 672 | fully visible if @var{window}'s size were actually set to it. With | ||
| 673 | @var{horizontal} @code{nil} it includes the mode and header line and the | ||
| 674 | bottom divider. With @var{horizontal} non-@code{nil} it includes the | ||
| 675 | fringes, a scroll bar, and a right divider, if present. It does not, | ||
| 676 | however, include the space reserved for the margins. | ||
| 677 | |||
| 678 | The optional argument @var{ignore}, if non-@code{nil}, means ignore | ||
| 679 | restrictions imposed by fixed size windows, @code{window-min-height} or | ||
| 680 | @code{window-min-width} settings. If @var{ignore} equals @code{safe}, | ||
| 681 | live windows may get as small as @code{window-safe-min-height} lines and | ||
| 682 | @code{window-safe-min-width} columns. If @var{ignore} is a window, | ||
| 683 | ignore restrictions for that window only. Any other non-@code{nil} | ||
| 684 | value means ignore all of the above restrictions for all windows. | ||
| 685 | |||
| 686 | The optional argument @var{pixelwise} non-@code{nil} means to return the | ||
| 687 | minimum size of @var{window} counted in pixels. | ||
| 688 | @end defun | ||
| 659 | 689 | ||
| 660 | @node Resizing Windows | 690 | @node Resizing Windows |
| 661 | @section Resizing Windows | 691 | @section Resizing Windows |
| @@ -718,7 +748,7 @@ the window cannot be resized as demanded, an error is signaled. | |||
| 718 | The optional argument @var{ignore} has the same meaning as for the | 748 | The optional argument @var{ignore} has the same meaning as for the |
| 719 | function @code{window-resizable} above. | 749 | function @code{window-resizable} above. |
| 720 | 750 | ||
| 721 | If the optional argument @code{pixelwise} is non-@code{nil}, | 751 | If the optional argument @var{pixelwise} is non-@code{nil}, |
| 722 | @var{delta} will be interpreted as pixels. | 752 | @var{delta} will be interpreted as pixels. |
| 723 | 753 | ||
| 724 | The choice of which window edges this function alters depends on the | 754 | The choice of which window edges this function alters depends on the |
| @@ -879,7 +909,7 @@ window. | |||
| 879 | This section describes functions for creating a new window by | 909 | This section describes functions for creating a new window by |
| 880 | @dfn{splitting} an existing one. | 910 | @dfn{splitting} an existing one. |
| 881 | 911 | ||
| 882 | @defun split-window &optional window size side | 912 | @defun split-window &optional window size side pixelwise |
| 883 | This function creates a new live window next to the window | 913 | This function creates a new live window next to the window |
| 884 | @var{window}. If @var{window} is omitted or @code{nil}, it defaults | 914 | @var{window}. If @var{window} is omitted or @code{nil}, it defaults |
| 885 | to the selected window. That window is ``split'', and reduced in | 915 | to the selected window. That window is ``split'', and reduced in |
| @@ -894,15 +924,25 @@ value of @var{side}). If @var{size} is a negative number, the new | |||
| 894 | window is given @minus{}@var{size} lines (or columns). | 924 | window is given @minus{}@var{size} lines (or columns). |
| 895 | 925 | ||
| 896 | If @var{size} is @code{nil}, this function obeys the variables | 926 | If @var{size} is @code{nil}, this function obeys the variables |
| 897 | @code{window-min-height} and @code{window-min-width}. @xref{Change | 927 | @code{window-min-height} and @code{window-min-width} (@pxref{Window |
| 898 | Window,,Deleting and Rearranging Windows, emacs, The GNU Emacs | 928 | Sizes}). Thus, it signals an error if splitting would result in making |
| 899 | Manual}. Thus, it signals an error if splitting would result in | 929 | a window smaller than those variables specify. However, a |
| 900 | making a window smaller than those variables specify. However, a | ||
| 901 | non-@code{nil} value for @var{size} causes those variables to be | 930 | non-@code{nil} value for @var{size} causes those variables to be |
| 902 | ignored; in that case, the smallest allowable window is considered to | 931 | ignored; in that case, the smallest allowable window is considered to be |
| 903 | be one that has space for a text area one line tall and/or two columns | 932 | one that has space for a text area one line tall and/or two columns |
| 904 | wide. | 933 | wide. |
| 905 | 934 | ||
| 935 | Hence, if @var{size} is specified, it's the caller's responsibility to | ||
| 936 | check whether the emanating windows are large enough to encompass all | ||
| 937 | areas like a mode line or a scroll bar. The function | ||
| 938 | @code{window-min-size} (@pxref{Window Sizes}) can be used to determine | ||
| 939 | the minimum requirements of @var{window} in this regard. Since the new | ||
| 940 | window usually ``inherits'' areas like the mode line or the scroll bar | ||
| 941 | from @var{window}, that function is also a good guess for the minimum | ||
| 942 | size of the new window. The caller should specify a smaller size only | ||
| 943 | if it correspondingly removes an inherited area before the next | ||
| 944 | redisplay. | ||
| 945 | |||
| 906 | The optional third argument @var{side} determines the position of the | 946 | The optional third argument @var{side} determines the position of the |
| 907 | new window relative to @var{window}. If it is @code{nil} or | 947 | new window relative to @var{window}. If it is @code{nil} or |
| 908 | @code{below}, the new window is placed below @var{window}. If it is | 948 | @code{below}, the new window is placed below @var{window}. If it is |
| @@ -914,6 +954,10 @@ the right of @var{window}. If @var{side} is @code{left}, the new | |||
| 914 | window is placed on the left of @var{window}. In both these cases, | 954 | window is placed on the left of @var{window}. In both these cases, |
| 915 | @var{size} specifies a total window width, in columns. | 955 | @var{size} specifies a total window width, in columns. |
| 916 | 956 | ||
| 957 | The optional fourth argument @var{pixelwise}, if non-@code{nil}, means | ||
| 958 | to interpret @var{size} in units of pixels, instead of lines and | ||
| 959 | columns. | ||
| 960 | |||
| 917 | If @var{window} is a live window, the new window inherits various | 961 | If @var{window} is a live window, the new window inherits various |
| 918 | properties from it, including margins and scroll bars. If | 962 | properties from it, including margins and scroll bars. If |
| 919 | @var{window} is an internal window, the new window inherits the | 963 | @var{window} is an internal window, the new window inherits the |