summaryrefslogtreecommitdiff
path: root/doc/lispref/minibuf.texi
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2019-03-11 09:57:23 +0100
committerMartin Rudalics <rudalics@gmx.at>2019-03-11 09:57:23 +0100
commit95373b69b34f9756d2f05b19798b763d22aa5f0a (patch)
treeffd55c71f1cccf34fc90aeb56dfeb4e78afb1915 /doc/lispref/minibuf.texi
parent27466c62fdc977e8d3b23c5ae4f529a64ac7374f (diff)
downloademacs-95373b69b34f9756d2f05b19798b763d22aa5f0a.tar.gz
Rewrite minibuffer window resizing code
* src/frame.c (resize_mini_frames): New variable. * src/window.c (resize_mini_window_apply): New function. (grow_mini_window, shrink_mini_window): Remove PIXELWISE argument. Call resize_mini_window_apply to apply changes. (Fresize_mini_window_internal): Call resize_mini_window_apply to apply changes. (Qwindow__resize_mini_frame): New symbol. * src/window.h (grow_mini_window, shrink_mini_window): Adjust external declarations. * src/xdisp.c (resize_mini_window): For minibuffer-only frames call 'window--resize-mini-frame' if resize_mini_frames is non-nil. Offload parts of logic to grow_mini_window and shrink_mini_window which are now called without the PIXELWISE argument. (Vresize_mini_windows): Mention 'resize-mini-frames' in doc-string. * lisp/cus-start.el (resize-mini-frames): Add customization support. * lisp/window.el (window--resize-mini-window): Simplify code. (window--resize-mini-frame): New function. * doc/lispref/minibuf.texi (Minibuffer Windows): Describe new option 'resize-mini-frames'. * etc/NEWS: Mention new option 'resize-mini-frames'.
Diffstat (limited to 'doc/lispref/minibuf.texi')
-rw-r--r--doc/lispref/minibuf.texi19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index a2b6e145502..6c37fa92d6c 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -2402,6 +2402,25 @@ will not work. If you want to prevent resizing of minibuffer windows
when displaying long messages, bind the @code{message-truncate-lines}
variable instead (@pxref{Echo Area Customization}).
+The option @code{resize-mini-windows} does not affect the behavior of
+minibuffer-only frames (@pxref{Frame Layout}). The following option
+allows to automatically resize such frames as well.
+
+@defopt resize-mini-frames
+If this is @code{nil}, minibuffer-only frames are never resized
+automatically.
+
+If this is a function, that function is called with the
+minibuffer-only frame to be resized as sole argument. At the time
+this function is called, the buffer of the minibuffer window of that
+frame is the buffer whose contents will be shown the next time that
+window is redisplayed. The function is expected to fit the frame to
+the buffer in some appropriate way.
+
+Any other non-@code{nil} value means to resize minibuffer-only frames
+by calling @code{fit-frame-to-buffer} (@pxref{Resizing Windows}).
+@end defopt
+
@node Minibuffer Contents
@section Minibuffer Contents