aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rudalics2017-10-29 11:35:32 +0100
committerMartin Rudalics2017-10-29 11:35:32 +0100
commit4189d0ef7bf935fb8e6ab941e93d591be654ddac (patch)
treedd3e8ffab778e68fa44db9dcc9bdbded06d16aa5
parent2ebdde6e9cfe5bba337cad0a8be695f1e2bce7f8 (diff)
downloademacs-4189d0ef7bf935fb8e6ab941e93d591be654ddac.tar.gz
emacs-4189d0ef7bf935fb8e6ab941e93d591be654ddac.zip
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.
-rw-r--r--doc/lispref/frames.texi11
-rw-r--r--doc/lispref/minibuf.texi45
-rw-r--r--etc/NEWS5
-rw-r--r--src/frame.c15
-rw-r--r--src/window.c2
5 files changed, 45 insertions, 33 deletions
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index ad853418ac4..5ea7125882f 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -1850,8 +1850,14 @@ yes, @code{nil} means no, @code{only} means this frame is just a
1850minibuffer. If the value is a minibuffer window (in some other 1850minibuffer. If the value is a minibuffer window (in some other
1851frame), the frame uses that minibuffer. 1851frame), the frame uses that minibuffer.
1852 1852
1853This frame parameter takes effect when the frame is created, and can 1853This parameter takes effect when the frame is created. If specified as
1854not be changed afterwards. 1854@code{nil}, Emacs will try to set it to the minibuffer window of
1855@code{default-minibuffer-frame} (@pxref{Minibuffers and Frames}). For
1856an existing frame, this parameter can be used exclusively to specify
1857another minibuffer window. It is not allowed to change it from a
1858minibuffer window to @code{t} and vice-versa, or from @code{t} to
1859@code{nil}. If the parameter specifies a minibuffer window already,
1860setting it to @code{nil} has no effect.
1855 1861
1856@vindex buffer-predicate, a frame parameter 1862@vindex buffer-predicate, a frame parameter
1857@item buffer-predicate 1863@item buffer-predicate
@@ -1872,6 +1878,7 @@ most-recently-selected first.
1872If non-@code{nil}, this frame's window is never split automatically. 1878If non-@code{nil}, this frame's window is never split automatically.
1873@end table 1879@end table
1874 1880
1881
1875@node Frame Interaction Parameters 1882@node Frame Interaction Parameters
1876@subsubsection Frame Interaction Parameters 1883@subsubsection Frame Interaction Parameters
1877@cindex frame interaction parameters 1884@cindex frame interaction parameters
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index 1ece8996008..db69e7d8919 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -2256,39 +2256,44 @@ contents of the minibuffer before the point.
2256These functions access and select minibuffer windows, test whether they 2256These functions access and select minibuffer windows, test whether they
2257are active and control how they get resized. 2257are active and control how they get resized.
2258 2258
2259@defun active-minibuffer-window
2260This function returns the currently active minibuffer window, or
2261@code{nil} if there is none.
2262@end defun
2263
2264@defun minibuffer-window &optional frame 2259@defun minibuffer-window &optional frame
2265@anchor{Definition of minibuffer-window} 2260@anchor{Definition of minibuffer-window}
2266This function returns the minibuffer window used for frame @var{frame}. 2261This function returns the minibuffer window used for frame @var{frame}.
2267If @var{frame} is @code{nil}, that stands for the current frame. Note 2262If @var{frame} is @code{nil}, that stands for the selected frame.
2268that the minibuffer window used by a frame need not be part of that 2263
2264Note that the minibuffer window used by a frame need not be part of that
2269frame---a frame that has no minibuffer of its own necessarily uses some 2265frame---a frame that has no minibuffer of its own necessarily uses some
2270other frame's minibuffer window. 2266other frame's minibuffer window. The minibuffer window of a
2267minibuffer-less frame can be changed by setting that frame's
2268@code{minibuffer} frame parameter (@pxref{Buffer Parameters}).
2271@end defun 2269@end defun
2272 2270
2273@defun set-minibuffer-window window 2271@defun set-minibuffer-window window
2274This function specifies @var{window} as the minibuffer window to use. 2272This function specifies @var{window} as the minibuffer window to use.
2275This affects where the minibuffer is displayed if you put text in it 2273This affects where the minibuffer is displayed if you put text in it
2276without invoking the usual minibuffer commands. It has no effect on 2274without invoking the usual minibuffer commands. It has no effect on the
2277the usual minibuffer input functions because they all start by 2275usual minibuffer input functions because they all start by choosing the
2278choosing the minibuffer window according to the current frame. 2276minibuffer window according to the selected frame.
2279@end defun 2277@end defun
2280 2278
2281@c Emacs 19 feature 2279@c Emacs 19 feature
2282@defun window-minibuffer-p &optional window 2280@defun window-minibuffer-p &optional window
2283This function returns non-@code{nil} if @var{window} is a minibuffer 2281This function returns non-@code{nil} if @var{window} is a minibuffer
2284window. 2282window. @var{window} defaults to the selected window.
2285@var{window} defaults to the selected window. 2283@end defun
2284
2285The following function returns the window showing the currently active
2286minibuffer.
2287
2288@defun active-minibuffer-window
2289This function returns the currently active minibuffer window, or
2290@code{nil} if there is none.
2286@end defun 2291@end defun
2287 2292
2288It is not correct to determine whether a given window is a minibuffer by 2293It is not sufficient to determine whether a given window is the
2289comparing it with the result of @code{(minibuffer-window)}, because 2294currently active minibuffer window by comparing it with the result of
2290there can be more than one minibuffer window if there is more than one 2295@code{(minibuffer-window)}, because there can be more than one
2291frame. 2296minibuffer window if there is more than one frame.
2292 2297
2293@defun minibuffer-window-active-p window 2298@defun minibuffer-window-active-p window
2294This function returns non-@code{nil} if @var{window} is the currently 2299This function returns non-@code{nil} if @var{window} is the currently
@@ -2439,9 +2444,9 @@ minibuffer, it scrolls this window.
2439@end defvar 2444@end defvar
2440 2445
2441@defun minibuffer-selected-window 2446@defun minibuffer-selected-window
2442This function returns the window that was selected when the 2447This function returns the window that was selected at the moment the
2443minibuffer was entered. If selected window is not a minibuffer 2448minibuffer was entered. If the currently selected window is not a
2444window, it returns @code{nil}. 2449minibuffer window, it returns @code{nil}.
2445@end defun 2450@end defun
2446 2451
2447@defopt max-mini-window-height 2452@defopt max-mini-window-height
diff --git a/etc/NEWS b/etc/NEWS
index 357d528924f..1166e81da03 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1814,6 +1814,11 @@ handle fitting a frame to its buffer individually.
1814'drag-with-mode-line', 'snap-width', 'top-visible' and 'bottom-visible' 1814'drag-with-mode-line', 'snap-width', 'top-visible' and 'bottom-visible'
1815allow to drag and resize frames with the mouse. 1815allow to drag and resize frames with the mouse.
1816 1816
1817+++
1818**** 'minibuffer' is now set to the default minibuffer window when
1819initially specified as nil and is not reset to nil when initially
1820specifying a minibuffer window.
1821
1817*** The new function 'frame-list-z-order' returns a list of all frames 1822*** The new function 'frame-list-z-order' returns a list of all frames
1818in Z (stacking) order. 1823in Z (stacking) order.
1819 1824
diff --git a/src/frame.c b/src/frame.c
index ab801eec9c7..fe1709e6ede 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -5895,16 +5895,11 @@ or call the function `tool-bar-mode'. */);
5895#endif 5895#endif
5896 5896
5897 DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame, 5897 DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame,
5898 doc: /* Minibufferless frames use this frame's minibuffer. 5898 doc: /* Minibuffer-less frames by default use this frame's minibuffer.
5899Emacs cannot create minibufferless frames unless this is set to an 5899Emacs consults this variable only when creating a minibuffer-less frame
5900appropriate surrogate. 5900and no explicit minibuffer window has been specified for that frame via
5901 5901the `minibuffer' frame parameter. Once such a frame has been created,
5902Emacs consults this variable only when creating minibufferless 5902setting this variable does not change that frame's previous association.
5903frames; once the frame is created, it sticks with its assigned
5904minibuffer, no matter what this variable is set to. This means that
5905this variable doesn't necessarily say anything meaningful about the
5906current set of frames, or where the minibuffer is currently being
5907displayed.
5908 5903
5909This variable is local to the current terminal and cannot be buffer-local. */); 5904This variable is local to the current terminal and cannot be buffer-local. */);
5910 5905
diff --git a/src/window.c b/src/window.c
index ba86d73911f..f08979e1320 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5833,7 +5833,7 @@ by this function. This happens in an interactive call. */)
5833 5833
5834DEFUN ("minibuffer-selected-window", Fminibuffer_selected_window, Sminibuffer_selected_window, 0, 0, 0, 5834DEFUN ("minibuffer-selected-window", Fminibuffer_selected_window, Sminibuffer_selected_window, 0, 0, 0,
5835 doc: /* Return the window which was selected when entering the minibuffer. 5835 doc: /* Return the window which was selected when entering the minibuffer.
5836Returns nil, if selected window is not a minibuffer window. */) 5836Return nil if the selected window is not a minibuffer window. */)
5837 (void) 5837 (void)
5838{ 5838{
5839 if (minibuf_level > 0 5839 if (minibuf_level > 0