The window size functions fall into two classes: high-level commands that change the size of windows and low-level functions that access window size. Emacs does not permit overlapping windows or gaps between windows, so resizing one window affects other windows.
window-min-height
lines, that window disappears.
If horizontal is non-nil
, this function makes
window wider by size columns, stealing columns instead of
lines. If a window from which columns are stolen shrinks below
window-min-width
columns, that window disappears.
If the requested size would exceed that of the window's frame, then the function makes the window occupy the entire height (or width) of the frame.
If size is negative, this function shrinks the window by
-size lines or columns. If that makes the window smaller
than the minimum size (window-min-height
and
window-min-width
), enlarge-window
deletes the window.
enlarge-window
returns nil
.
(defun enlarge-window-horizontally (columns) (enlarge-window columns t))
enlarge-window
but negates the argument
size, making the selected window smaller by giving lines (or
columns) to the other windows. If the window shrinks below
window-min-height
or window-min-width
, then it disappears.
If size is negative, the window is enlarged by -size lines or columns.
(defun shrink-window-horizontally (columns) (shrink-window columns t))
window-min-height
lines.
However, the command does nothing if the window is already too small to display the whole text of the buffer, or if part of the contents are currently scrolled off screen, or if the window is not the full width of its frame, or if the window is the only window in its frame.
The following two variables constrain the window-size-changing functions to a minimum height and width.
window-min-height
automatically deletes it, and no window may be
created shorter than this. The absolute minimum height is two (allowing
one line for the mode line, and one line for the buffer display).
Actions that change window sizes reset this variable to two if it is
less than two. The default value is 4.
window-min-width
automatically deletes it, and no window may be
created narrower than this. The absolute minimum width is one; any
value below that is ignored. The default value is 10.
Go to the first, previous, next, last section, table of contents.