]> git.eshelyaron.com Git - emacs.git/commit
Provide new option `delete-window-set-selected' (Bug#47300)
authorMartin Rudalics <rudalics@gmx.at>
Thu, 10 Jun 2021 07:14:21 +0000 (09:14 +0200)
committerMartin Rudalics <rudalics@gmx.at>
Thu, 10 Jun 2021 07:14:21 +0000 (09:14 +0200)
commitb3dd0ce75ba9314eb7a682e5fcf8b4cfbc67655b
treeab7873f3a18ce3873200863e37fed9534558ce93
parentdd9385b404c28a155a91960a4f1c4c77fdc5413d
Provide new option `delete-window-set-selected' (Bug#47300)

When `delete-window' deletes its frame's selected window, this new
option allows to choose another window as replacement.

* lisp/window.el (get-lru-window, get-mru-window)
(get-largest-window): New optional argument NO-OTHER.
(window-at-pos): New function.
(delete-window-set-selected): New option.
(delete-window): Handle `delete-window-set-selected'.
* src/window.c (Fdelete_window_internal): Set the selected
window of WINDOW's frame to the first window on that frame and
let `delete-window' choose a more suitable window instead.
* doc/lispref/windows.texi (Deleting Windows): Describe new
option `delete-window-set-selected'.
(Cyclic Window Ordering): Describe new NO-OTHER argument for
`get-lru-window', `get-mru-window' and `get-largest-window'.
* etc/NEWS: Mention `delete-window-set-selected' and the NO-OTHER
argument.
doc/lispref/windows.texi
etc/NEWS
lisp/window.el
src/window.c