* 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.
+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
@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
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
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
*** 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.