Subject: bug#48493: 28.0.50; quit-window doesn't work

From: pillule <[email-masked]>
Date: Tue, 25 May 2021 01:58:22 +0000

>> What is the desired behavior of a dedicated window here ?
>> Must *Messages* be displayed after we killed *Backtrace* in the 
>> first
>> place ?
>
> I think so, yes.

Then I suppose that the dedicated window parameter must be 
restored
after a kill-buffer accordingly; this solve the previous test but
ask for more modifications.

I am testing a version of this.

> [...] When
> *Messages* is killed, the window should have no more previous 
> buffers to
> display and we should be able to kill it.  But 
> `switch-to-prev-buffer'
> shows the "next" buffer instead.  Try to come up with a solution 
> that
> does not reintroduce Bug#48493 and deletes the window when no 
> previous
> buffer is found.

I can modify to `switch-to-prev-buffer' (and its sibling
`switch-to-prev-buffer') to return nil instead of the current 
buffer;
however the result is the same : the window rest in place with an
undesired buffer inside.
Note that we may want that anyway if it can solve the cases where
`quit-restore-window' display the same buffer again.

I am still looking to find what may be messing the prev-buffers 
list.

--