From 000bc54951fc2c8f502176755fca53ca2b8aa9a4 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Thu, 25 Dec 2014 14:13:26 +0100 Subject: [PATCH] Make `resize-mini-windows' customizable and update documentation for it. * cus-start.el (resize-mini-windows): Make it customizable. * minibuf.texi (Minibuffer Windows): Add descriptions of `resize-mini-windows' and `max-mini-window-height'. --- doc/lispref/ChangeLog | 3 +++ doc/lispref/minibuf.texi | 27 +++++++++++++++++++++++++-- lisp/ChangeLog | 4 ++++ lisp/cus-start.el | 7 ++++++- 4 files changed, 38 insertions(+), 3 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index b74719cd029..2d964cf6505 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -2,6 +2,9 @@ * windows.texi (Windows): Resync @menu order with @node order. + * minibuf.texi (Minibuffer Windows): Add descriptions of + `resize-mini-windows' and `max-mini-window-height'. + 2014-12-25 Glenn Morris * windows.texi (Windows): Sync @menu order with @node order. diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 1c6a74a89fd..57ae0e999b4 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -2218,8 +2218,8 @@ contents of the minibuffer before the point. @section Minibuffer Windows @cindex minibuffer windows - These functions access and select minibuffer windows -and test whether they are active. +These functions access and select minibuffer windows, test whether they +are active and control how they get resized. @defun active-minibuffer-window This function returns the currently active minibuffer window, or @@ -2260,6 +2260,29 @@ This function returns non-@code{nil} if @var{window} is the currently active minibuffer window. @end defun +The following two options control whether minibuffer windows are resized +automatically and how large they can get in the process. + +@defopt resize-mini-windows +This option specifies whether minibuffer windows are resized +automatically. The default value is @code{grow-only}, which means that +a minibuffer window by default expands automatically to accommodate the +text it displays and shrinks back to one line as soon as the minibuffer +gets empty. If the value is @code{t}, Emacs will always try to fit the +height of a minibuffer window to the text it displays (with a minimum of +one line). If the value is @code{nil}, a minibuffer window never +changes size automatically. In that case the window resizing commands +(@pxref{Resizing Windows}) can be used to adjust its height. +@end defopt + +@defopt max-mini-window-height +This option provides a maximum height for resizing minibuffer windows +automatically. A floating-point number specifies a fraction of the +frame's height; an integer specifies the maximum number of lines. The +default value is 0.25. +@end defopt + + @node Minibuffer Contents @section Minibuffer Contents diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c369c7940f4..6b0f2961d65 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-12-25 Martin Rudalics + + * cus-start.el (resize-mini-windows): Make it customizable. + 2014-12-24 Stephen Leake * startup.el (fancy-about-text): Change buttons for etc/CONTRIBUTE diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 4049974841e..5394a1c3744 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -520,7 +520,12 @@ since it could result in memory overflow and make Emacs crash." (const :tag "Hourglass" :value hourglass))) (display-hourglass cursor boolean) (hourglass-delay cursor number) - + (resize-mini-windows + windows (choice + (const :tag "Off (nil)" :value nil) + (const :tag "Fit (t)" :value t) + (const :tag "Grow only" :value grow-only)) + "25.1") ;; xfaces.c (scalable-fonts-allowed display boolean "22.1") ;; xfns.c -- 2.39.2