aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rudalics2014-03-07 10:53:23 +0100
committerMartin Rudalics2014-03-07 10:53:23 +0100
commitf2c5082b9302fa6eb6be3f0b502528a8d61cc813 (patch)
tree7b2575324fb33d60f2c3ab48485f11dcc4db1d02
parent27821a89847575b3249bb42d1050f6e1d21a5eac (diff)
downloademacs-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/ChangeLog5
-rw-r--r--doc/lispref/windows.texi60
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 @@
12014-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
12014-03-06 Martin Rudalics <rudalics@gmx.at> 62014-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
659The following function tells how small a specific window can get taking
660into 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
665This function returns the minimum size of @var{window}. @var{window}
666must be a valid window and defaults to the selected one. The optional
667argument @var{horizontal} non-@code{nil} means to return the minimum
668number of columns of @var{window}; otherwise return the minimum number
669of @var{window}'s lines.
670
671The return value makes sure that all components of @var{window} remain
672fully 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
674bottom divider. With @var{horizontal} non-@code{nil} it includes the
675fringes, a scroll bar, and a right divider, if present. It does not,
676however, include the space reserved for the margins.
677
678The optional argument @var{ignore}, if non-@code{nil}, means ignore
679restrictions imposed by fixed size windows, @code{window-min-height} or
680@code{window-min-width} settings. If @var{ignore} equals @code{safe},
681live 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,
683ignore restrictions for that window only. Any other non-@code{nil}
684value means ignore all of the above restrictions for all windows.
685
686The optional argument @var{pixelwise} non-@code{nil} means to return the
687minimum 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.
718The optional argument @var{ignore} has the same meaning as for the 748The optional argument @var{ignore} has the same meaning as for the
719function @code{window-resizable} above. 749function @code{window-resizable} above.
720 750
721If the optional argument @code{pixelwise} is non-@code{nil}, 751If 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
724The choice of which window edges this function alters depends on the 754The choice of which window edges this function alters depends on the
@@ -879,7 +909,7 @@ window.
879This section describes functions for creating a new window by 909This 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
883This function creates a new live window next to the window 913This 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
885to the selected window. That window is ``split'', and reduced in 915to 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
894window is given @minus{}@var{size} lines (or columns). 924window is given @minus{}@var{size} lines (or columns).
895 925
896If @var{size} is @code{nil}, this function obeys the variables 926If @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
898Window,,Deleting and Rearranging Windows, emacs, The GNU Emacs 928Sizes}). Thus, it signals an error if splitting would result in making
899Manual}. Thus, it signals an error if splitting would result in 929a window smaller than those variables specify. However, a
900making a window smaller than those variables specify. However, a
901non-@code{nil} value for @var{size} causes those variables to be 930non-@code{nil} value for @var{size} causes those variables to be
902ignored; in that case, the smallest allowable window is considered to 931ignored; in that case, the smallest allowable window is considered to be
903be one that has space for a text area one line tall and/or two columns 932one that has space for a text area one line tall and/or two columns
904wide. 933wide.
905 934
935Hence, if @var{size} is specified, it's the caller's responsibility to
936check whether the emanating windows are large enough to encompass all
937areas like a mode line or a scroll bar. The function
938@code{window-min-size} (@pxref{Window Sizes}) can be used to determine
939the minimum requirements of @var{window} in this regard. Since the new
940window usually ``inherits'' areas like the mode line or the scroll bar
941from @var{window}, that function is also a good guess for the minimum
942size of the new window. The caller should specify a smaller size only
943if it correspondingly removes an inherited area before the next
944redisplay.
945
906The optional third argument @var{side} determines the position of the 946The optional third argument @var{side} determines the position of the
907new window relative to @var{window}. If it is @code{nil} or 947new 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
914window is placed on the left of @var{window}. In both these cases, 954window 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
957The optional fourth argument @var{pixelwise}, if non-@code{nil}, means
958to interpret @var{size} in units of pixels, instead of lines and
959columns.
960
917If @var{window} is a live window, the new window inherits various 961If @var{window} is a live window, the new window inherits various
918properties from it, including margins and scroll bars. If 962properties 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