Subject: bug#47300: delete-window to select window with same position

From: martin rudalics <[email-masked]>
Date: Wed, 19 May 2021 09:42:49 +0200

> I can't find where `get-mru-window' is called during window deletion.

It's here in `delete-window-internal'

	  /* Now look whether `get-mru-window' gets us something.  */
	  mru_window = call1 (Qget_mru_window, frame);

 > Maybe a new option e.g. `delete-window-select' with type not boolean,
 > but a predicate with the default value `get-mru-window', and another
 > choice `delete-window-select-underlying' to select the "merged" window.

`get-mru-window' is not a predicate.  You probably mean a function so
that someone could also use `get-lru-window' as value of that option?
The problem with such a function is that it has to be called with some
predefined sort of FRAME or ALL-FRAMES argument so some explanatory
footwork would be required.

martin