Fix minibuffer window related docs and strings (Bug#28978)
* src/frame.c (Vdefault_minibuffer_frame): Fix doc-string. * src/window.c (Fminibuffer_selected_window): Fix doc-string. * doc/lispref/frames.texi (Buffer Parameters): Rewrite description of `minibuffer' parameter. * doc/lispref/minibuf.texi (Minibuffer Windows): Reorder entries and partly rewrite section. (Minibuffer Misc): Clarify description of `minibuffer-selected-window'. * etc/NEWS: Mention new semantics of 'minibuffer' frame parameter.
This commit is contained in:
parent
2ebdde6e9c
commit
4189d0ef7b
5 changed files with 45 additions and 33 deletions
|
@ -1850,8 +1850,14 @@ yes, @code{nil} means no, @code{only} means this frame is just a
|
||||||
minibuffer. If the value is a minibuffer window (in some other
|
minibuffer. If the value is a minibuffer window (in some other
|
||||||
frame), the frame uses that minibuffer.
|
frame), the frame uses that minibuffer.
|
||||||
|
|
||||||
This frame parameter takes effect when the frame is created, and can
|
This parameter takes effect when the frame is created. If specified as
|
||||||
not be changed afterwards.
|
@code{nil}, Emacs will try to set it to the minibuffer window of
|
||||||
|
@code{default-minibuffer-frame} (@pxref{Minibuffers and Frames}). For
|
||||||
|
an existing frame, this parameter can be used exclusively to specify
|
||||||
|
another minibuffer window. It is not allowed to change it from a
|
||||||
|
minibuffer window to @code{t} and vice-versa, or from @code{t} to
|
||||||
|
@code{nil}. If the parameter specifies a minibuffer window already,
|
||||||
|
setting it to @code{nil} has no effect.
|
||||||
|
|
||||||
@vindex buffer-predicate, a frame parameter
|
@vindex buffer-predicate, a frame parameter
|
||||||
@item buffer-predicate
|
@item buffer-predicate
|
||||||
|
@ -1872,6 +1878,7 @@ most-recently-selected first.
|
||||||
If non-@code{nil}, this frame's window is never split automatically.
|
If non-@code{nil}, this frame's window is never split automatically.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
|
||||||
@node Frame Interaction Parameters
|
@node Frame Interaction Parameters
|
||||||
@subsubsection Frame Interaction Parameters
|
@subsubsection Frame Interaction Parameters
|
||||||
@cindex frame interaction parameters
|
@cindex frame interaction parameters
|
||||||
|
|
|
@ -2256,39 +2256,44 @@ contents of the minibuffer before the point.
|
||||||
These functions access and select minibuffer windows, test whether they
|
These functions access and select minibuffer windows, test whether they
|
||||||
are active and control how they get resized.
|
are active and control how they get resized.
|
||||||
|
|
||||||
@defun active-minibuffer-window
|
|
||||||
This function returns the currently active minibuffer window, or
|
|
||||||
@code{nil} if there is none.
|
|
||||||
@end defun
|
|
||||||
|
|
||||||
@defun minibuffer-window &optional frame
|
@defun minibuffer-window &optional frame
|
||||||
@anchor{Definition of minibuffer-window}
|
@anchor{Definition of minibuffer-window}
|
||||||
This function returns the minibuffer window used for frame @var{frame}.
|
This function returns the minibuffer window used for frame @var{frame}.
|
||||||
If @var{frame} is @code{nil}, that stands for the current frame. Note
|
If @var{frame} is @code{nil}, that stands for the selected frame.
|
||||||
that the minibuffer window used by a frame need not be part of that
|
|
||||||
|
Note that the minibuffer window used by a frame need not be part of that
|
||||||
frame---a frame that has no minibuffer of its own necessarily uses some
|
frame---a frame that has no minibuffer of its own necessarily uses some
|
||||||
other frame's minibuffer window.
|
other frame's minibuffer window. The minibuffer window of a
|
||||||
|
minibuffer-less frame can be changed by setting that frame's
|
||||||
|
@code{minibuffer} frame parameter (@pxref{Buffer Parameters}).
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
@defun set-minibuffer-window window
|
@defun set-minibuffer-window window
|
||||||
This function specifies @var{window} as the minibuffer window to use.
|
This function specifies @var{window} as the minibuffer window to use.
|
||||||
This affects where the minibuffer is displayed if you put text in it
|
This affects where the minibuffer is displayed if you put text in it
|
||||||
without invoking the usual minibuffer commands. It has no effect on
|
without invoking the usual minibuffer commands. It has no effect on the
|
||||||
the usual minibuffer input functions because they all start by
|
usual minibuffer input functions because they all start by choosing the
|
||||||
choosing the minibuffer window according to the current frame.
|
minibuffer window according to the selected frame.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
@c Emacs 19 feature
|
@c Emacs 19 feature
|
||||||
@defun window-minibuffer-p &optional window
|
@defun window-minibuffer-p &optional window
|
||||||
This function returns non-@code{nil} if @var{window} is a minibuffer
|
This function returns non-@code{nil} if @var{window} is a minibuffer
|
||||||
window.
|
window. @var{window} defaults to the selected window.
|
||||||
@var{window} defaults to the selected window.
|
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
It is not correct to determine whether a given window is a minibuffer by
|
The following function returns the window showing the currently active
|
||||||
comparing it with the result of @code{(minibuffer-window)}, because
|
minibuffer.
|
||||||
there can be more than one minibuffer window if there is more than one
|
|
||||||
frame.
|
@defun active-minibuffer-window
|
||||||
|
This function returns the currently active minibuffer window, or
|
||||||
|
@code{nil} if there is none.
|
||||||
|
@end defun
|
||||||
|
|
||||||
|
It is not sufficient to determine whether a given window is the
|
||||||
|
currently active minibuffer window by comparing it with the result of
|
||||||
|
@code{(minibuffer-window)}, because there can be more than one
|
||||||
|
minibuffer window if there is more than one frame.
|
||||||
|
|
||||||
@defun minibuffer-window-active-p window
|
@defun minibuffer-window-active-p window
|
||||||
This function returns non-@code{nil} if @var{window} is the currently
|
This function returns non-@code{nil} if @var{window} is the currently
|
||||||
|
@ -2439,9 +2444,9 @@ minibuffer, it scrolls this window.
|
||||||
@end defvar
|
@end defvar
|
||||||
|
|
||||||
@defun minibuffer-selected-window
|
@defun minibuffer-selected-window
|
||||||
This function returns the window that was selected when the
|
This function returns the window that was selected at the moment the
|
||||||
minibuffer was entered. If selected window is not a minibuffer
|
minibuffer was entered. If the currently selected window is not a
|
||||||
window, it returns @code{nil}.
|
minibuffer window, it returns @code{nil}.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
@defopt max-mini-window-height
|
@defopt max-mini-window-height
|
||||||
|
|
5
etc/NEWS
5
etc/NEWS
|
@ -1814,6 +1814,11 @@ handle fitting a frame to its buffer individually.
|
||||||
'drag-with-mode-line', 'snap-width', 'top-visible' and 'bottom-visible'
|
'drag-with-mode-line', 'snap-width', 'top-visible' and 'bottom-visible'
|
||||||
allow to drag and resize frames with the mouse.
|
allow to drag and resize frames with the mouse.
|
||||||
|
|
||||||
|
+++
|
||||||
|
**** 'minibuffer' is now set to the default minibuffer window when
|
||||||
|
initially specified as nil and is not reset to nil when initially
|
||||||
|
specifying a minibuffer window.
|
||||||
|
|
||||||
*** The new function 'frame-list-z-order' returns a list of all frames
|
*** The new function 'frame-list-z-order' returns a list of all frames
|
||||||
in Z (stacking) order.
|
in Z (stacking) order.
|
||||||
|
|
||||||
|
|
15
src/frame.c
15
src/frame.c
|
@ -5895,16 +5895,11 @@ or call the function `tool-bar-mode'. */);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame,
|
DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame,
|
||||||
doc: /* Minibufferless frames use this frame's minibuffer.
|
doc: /* Minibuffer-less frames by default use this frame's minibuffer.
|
||||||
Emacs cannot create minibufferless frames unless this is set to an
|
Emacs consults this variable only when creating a minibuffer-less frame
|
||||||
appropriate surrogate.
|
and no explicit minibuffer window has been specified for that frame via
|
||||||
|
the `minibuffer' frame parameter. Once such a frame has been created,
|
||||||
Emacs consults this variable only when creating minibufferless
|
setting this variable does not change that frame's previous association.
|
||||||
frames; once the frame is created, it sticks with its assigned
|
|
||||||
minibuffer, no matter what this variable is set to. This means that
|
|
||||||
this variable doesn't necessarily say anything meaningful about the
|
|
||||||
current set of frames, or where the minibuffer is currently being
|
|
||||||
displayed.
|
|
||||||
|
|
||||||
This variable is local to the current terminal and cannot be buffer-local. */);
|
This variable is local to the current terminal and cannot be buffer-local. */);
|
||||||
|
|
||||||
|
|
|
@ -5833,7 +5833,7 @@ by this function. This happens in an interactive call. */)
|
||||||
|
|
||||||
DEFUN ("minibuffer-selected-window", Fminibuffer_selected_window, Sminibuffer_selected_window, 0, 0, 0,
|
DEFUN ("minibuffer-selected-window", Fminibuffer_selected_window, Sminibuffer_selected_window, 0, 0, 0,
|
||||||
doc: /* Return the window which was selected when entering the minibuffer.
|
doc: /* Return the window which was selected when entering the minibuffer.
|
||||||
Returns nil, if selected window is not a minibuffer window. */)
|
Return nil if the selected window is not a minibuffer window. */)
|
||||||
(void)
|
(void)
|
||||||
{
|
{
|
||||||
if (minibuf_level > 0
|
if (minibuf_level > 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue