mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-28 19:42:02 +00:00
Add function minibuffer-restore-windows (bug#45072)
* lisp/minibuffer.el (minibuffer-restore-windows): New function that removes the completions buffer. Add it to minibuffer-exit-hook. * src/minibuf.c (read-minibuffer-restore-windows): Mention minibuffer-restore-windows.
This commit is contained in:
parent
4ec10c80ab
commit
18d7562e91
2
etc/NEWS
2
etc/NEWS
@ -180,6 +180,8 @@ nor t.
|
||||
|
||||
+++
|
||||
** New user option 'read-minibuffer-restore-windows'.
|
||||
When customized to nil, it uses 'minibuffer-restore-windows' in
|
||||
'minibuffer-exit-hook' to remove only the *Completions* window.
|
||||
|
||||
+++
|
||||
** New system for displaying documentation for groups of functions.
|
||||
|
@ -2328,6 +2328,16 @@ variables.")
|
||||
(setq deactivate-mark nil)
|
||||
(throw 'exit nil))
|
||||
|
||||
(defun minibuffer-restore-windows ()
|
||||
"Restore some windows on exit from minibuffer.
|
||||
When `read-minibuffer-restore-windows' is nil, then this function
|
||||
added to `minibuffer-exit-hook' will remove at least the window
|
||||
with the *Completions* buffer."
|
||||
(unless read-minibuffer-restore-windows
|
||||
(minibuffer-hide-completions)))
|
||||
|
||||
(add-hook 'minibuffer-exit-hook 'minibuffer-restore-windows)
|
||||
|
||||
(defun minibuffer-quit-recursive-edit ()
|
||||
"Quit the command that requested this recursive edit without error.
|
||||
Like `abort-recursive-edit' without aborting keyboard macro
|
||||
|
@ -2535,8 +2535,11 @@ instead. */);
|
||||
If this is non-nil (the default), reading input with the minibuffer will
|
||||
restore, on exit, the window configurations of the frame where the
|
||||
minibuffer was entered from and, if it is different, the frame that owns
|
||||
the associated minibuffer window. If this is nil, no such restorations
|
||||
are done. */);
|
||||
the associated minibuffer window.
|
||||
|
||||
If this is nil, no such restorations are done.
|
||||
But still `minibuffer-restore-windows' in `minibuffer-exit-hook'
|
||||
will remove the window with the *Completions* buffer. */);
|
||||
read_minibuffer_restore_windows = true;
|
||||
|
||||
defsubr (&Sactive_minibuffer_window);
|
||||
|
Loading…
Reference in New Issue
Block a user