Commit 6439ae19 authored by Glenn Morris's avatar Glenn Morris
Browse files

Document fit-frame-to-buffer

* doc/lispref/frames.texi (Size and Position): Add fit-frame-to-buffer command.
* doc/lispref/windows.texi (Resizing Windows): Add fit-frame-to-buffer option.
(Window Sizes): Add vindex for window-min-height, window-min-width.

* etc/NEWS: Related markup.
parent 9a5e2ee3
2012-11-17 Glenn Morris <rgm@gnu.org>
* frames.texi (Size and Position): Add fit-frame-to-buffer command.
* windows.texi (Resizing Windows): Add fit-frame-to-buffer option.
(Window Sizes): Add vindex for window-min-height, window-min-width.
2012-11-16 Martin Rudalics <rudalics@gmx.at>
* windows.texi (Choosing Window): Rewrite description of
......
......@@ -1113,6 +1113,21 @@ The argument @var{pretend} has the same meaning as in
@code{set-frame-height}.
@end defun
@c FIXME? Belongs more in Emacs manual than here?
@c But eg fit-window-to-buffer is in this manual.
@deffn Command fit-frame-to-buffer &optional frame max-height min-height
This command adjusts the height of @var{frame} (the default is the
selected frame) to fit its contents. The optional arguments
@var{max-height} and @var{min-height} specify the maximum and minimum
new frame heights, respectively.
@vindex fit-frame-to-buffer-bottom-margin
The default minimum height corresponds to @code{window-min-height}.
The default maximum height is the screen height below the current top
position of the frame, minus any margin specified by the option
@code{fit-frame-to-buffer-bottom-margin}.
@end deffn
@node Geometry
@subsection Geometry
......
......@@ -490,6 +490,8 @@ partially-visible line at the bottom of the text area is not counted.
aliases are considered obsolete and will be removed in the future.
@cindex fixed-size window
@vindex window-min-height
@vindex window-min-width
Commands that change the size of windows (@pxref{Resizing Windows}),
or split them (@pxref{Splitting Windows}), obey the variables
@code{window-min-height} and @code{window-min-width}, which specify
......@@ -633,6 +635,10 @@ variable @code{window-min-height}.
If the optional argument @var{override} is non-@code{nil}, this
function ignores any size restrictions imposed by
@code{window-min-height} and @code{window-min-width}.
@vindex fit-frame-to-buffer
If the option @code{fit-frame-to-buffer} is non-@code{nil}, this
command may resize the frame to fit its contents.
@end deffn
@deffn Command shrink-window-if-larger-than-buffer &optional window
......
......@@ -848,12 +848,15 @@ now accept a third argument to avoid choosing the selected window.
*** New macro `with-temp-buffer-window'.
---
*** `temp-buffer-resize-mode' no longer resizes windows that have been
reused.
+++
*** New command `fit-frame-to-buffer' adjusts the frame height to
fit the contents.
+++
*** The command `fit-window-to-buffer' can adjust the frame height
if the new option `fit-frame-to-buffer' is non-nil.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment