]> code.delx.au - gnu-emacs/commitdiff
Document fit-frame-to-buffer
authorGlenn Morris <rgm@gnu.org>
Sat, 17 Nov 2012 01:33:26 +0000 (20:33 -0500)
committerGlenn Morris <rgm@gnu.org>
Sat, 17 Nov 2012 01:33:26 +0000 (20:33 -0500)
* 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.

doc/lispref/ChangeLog
doc/lispref/frames.texi
doc/lispref/windows.texi
etc/NEWS

index 062692ee9f3c9323f881154c9a507a5f40e1e096..b7baac9c2fe3650124506e8b018201369a49c386 100644 (file)
@@ -1,3 +1,9 @@
+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
index 27d55c4fdb9c85beedfc32c3c3c2b6f24ea8a3e7..846dfbaf17cfcbcd8001276fed5f731c7fc75f41 100644 (file)
@@ -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
 
index 77f1ff9a179ed5937d5de113cd6cd66144f84986..9a5c7f053e6e97e6fa00ccee6688bc46e8472117 100644 (file)
@@ -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
index 3bd4ebae4fa55dfcbdce00a44ab3d8361bdf7148..a951677bd1d28f4d065de89d9f7bf8752cf649f4 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -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.