diff options
| author | Martin Rudalics | 2017-10-29 11:35:32 +0100 |
|---|---|---|
| committer | Martin Rudalics | 2017-10-29 11:35:32 +0100 |
| commit | 4189d0ef7bf935fb8e6ab941e93d591be654ddac (patch) | |
| tree | dd3e8ffab778e68fa44db9dcc9bdbded06d16aa5 | |
| parent | 2ebdde6e9cfe5bba337cad0a8be695f1e2bce7f8 (diff) | |
| download | emacs-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.texi | 11 | ||||
| -rw-r--r-- | doc/lispref/minibuf.texi | 45 | ||||
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | src/frame.c | 15 | ||||
| -rw-r--r-- | src/window.c | 2 |
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 | |||
| 1850 | minibuffer. If the value is a minibuffer window (in some other | 1850 | minibuffer. If the value is a minibuffer window (in some other |
| 1851 | frame), the frame uses that minibuffer. | 1851 | frame), the frame uses that minibuffer. |
| 1852 | 1852 | ||
| 1853 | This frame parameter takes effect when the frame is created, and can | 1853 | This parameter takes effect when the frame is created. If specified as |
| 1854 | not 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 | ||
| 1856 | an existing frame, this parameter can be used exclusively to specify | ||
| 1857 | another minibuffer window. It is not allowed to change it from a | ||
| 1858 | minibuffer window to @code{t} and vice-versa, or from @code{t} to | ||
| 1859 | @code{nil}. If the parameter specifies a minibuffer window already, | ||
| 1860 | setting 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. | |||
| 1872 | If non-@code{nil}, this frame's window is never split automatically. | 1878 | If 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. | |||
| 2256 | These functions access and select minibuffer windows, test whether they | 2256 | These functions access and select minibuffer windows, test whether they |
| 2257 | are active and control how they get resized. | 2257 | are active and control how they get resized. |
| 2258 | 2258 | ||
| 2259 | @defun active-minibuffer-window | ||
| 2260 | This 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} |
| 2266 | This function returns the minibuffer window used for frame @var{frame}. | 2261 | This function returns the minibuffer window used for frame @var{frame}. |
| 2267 | If @var{frame} is @code{nil}, that stands for the current frame. Note | 2262 | If @var{frame} is @code{nil}, that stands for the selected frame. |
| 2268 | that the minibuffer window used by a frame need not be part of that | 2263 | |
| 2264 | Note that the minibuffer window used by a frame need not be part of that | ||
| 2269 | frame---a frame that has no minibuffer of its own necessarily uses some | 2265 | frame---a frame that has no minibuffer of its own necessarily uses some |
| 2270 | other frame's minibuffer window. | 2266 | other frame's minibuffer window. The minibuffer window of a |
| 2267 | minibuffer-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 |
| 2274 | This function specifies @var{window} as the minibuffer window to use. | 2272 | This function specifies @var{window} as the minibuffer window to use. |
| 2275 | This affects where the minibuffer is displayed if you put text in it | 2273 | This affects where the minibuffer is displayed if you put text in it |
| 2276 | without invoking the usual minibuffer commands. It has no effect on | 2274 | without invoking the usual minibuffer commands. It has no effect on the |
| 2277 | the usual minibuffer input functions because they all start by | 2275 | usual minibuffer input functions because they all start by choosing the |
| 2278 | choosing the minibuffer window according to the current frame. | 2276 | minibuffer 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 |
| 2283 | This function returns non-@code{nil} if @var{window} is a minibuffer | 2281 | This function returns non-@code{nil} if @var{window} is a minibuffer |
| 2284 | window. | 2282 | window. @var{window} defaults to the selected window. |
| 2285 | @var{window} defaults to the selected window. | 2283 | @end defun |
| 2284 | |||
| 2285 | The following function returns the window showing the currently active | ||
| 2286 | minibuffer. | ||
| 2287 | |||
| 2288 | @defun active-minibuffer-window | ||
| 2289 | This function returns the currently active minibuffer window, or | ||
| 2290 | @code{nil} if there is none. | ||
| 2286 | @end defun | 2291 | @end defun |
| 2287 | 2292 | ||
| 2288 | It is not correct to determine whether a given window is a minibuffer by | 2293 | It is not sufficient to determine whether a given window is the |
| 2289 | comparing it with the result of @code{(minibuffer-window)}, because | 2294 | currently active minibuffer window by comparing it with the result of |
| 2290 | there can be more than one minibuffer window if there is more than one | 2295 | @code{(minibuffer-window)}, because there can be more than one |
| 2291 | frame. | 2296 | minibuffer window if there is more than one frame. |
| 2292 | 2297 | ||
| 2293 | @defun minibuffer-window-active-p window | 2298 | @defun minibuffer-window-active-p window |
| 2294 | This function returns non-@code{nil} if @var{window} is the currently | 2299 | This 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 |
| 2442 | This function returns the window that was selected when the | 2447 | This function returns the window that was selected at the moment the |
| 2443 | minibuffer was entered. If selected window is not a minibuffer | 2448 | minibuffer was entered. If the currently selected window is not a |
| 2444 | window, it returns @code{nil}. | 2449 | minibuffer 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 |
| @@ -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' |
| 1815 | allow to drag and resize frames with the mouse. | 1815 | allow to drag and resize frames with the mouse. |
| 1816 | 1816 | ||
| 1817 | +++ | ||
| 1818 | **** 'minibuffer' is now set to the default minibuffer window when | ||
| 1819 | initially specified as nil and is not reset to nil when initially | ||
| 1820 | specifying 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 |
| 1818 | in Z (stacking) order. | 1823 | in 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. |
| 5899 | Emacs cannot create minibufferless frames unless this is set to an | 5899 | Emacs consults this variable only when creating a minibuffer-less frame |
| 5900 | appropriate surrogate. | 5900 | and no explicit minibuffer window has been specified for that frame via |
| 5901 | 5901 | the `minibuffer' frame parameter. Once such a frame has been created, | |
| 5902 | Emacs consults this variable only when creating minibufferless | 5902 | setting this variable does not change that frame's previous association. |
| 5903 | frames; once the frame is created, it sticks with its assigned | ||
| 5904 | minibuffer, no matter what this variable is set to. This means that | ||
| 5905 | this variable doesn't necessarily say anything meaningful about the | ||
| 5906 | current set of frames, or where the minibuffer is currently being | ||
| 5907 | displayed. | ||
| 5908 | 5903 | ||
| 5909 | This variable is local to the current terminal and cannot be buffer-local. */); | 5904 | This 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 | ||
| 5834 | DEFUN ("minibuffer-selected-window", Fminibuffer_selected_window, Sminibuffer_selected_window, 0, 0, 0, | 5834 | DEFUN ("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. |
| 5836 | Returns nil, if selected window is not a minibuffer window. */) | 5836 | Return 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 |