Subject: Re: bug#24213: 25.1.50; Fishy use of delete-window in register.el

From: Leo Liu <[email-masked]>
Date: Sat, 13 Aug 2016 10:39:49 +0800

On 2016-08-12 22:22 +0200, Andreas Politz wrote:
> The register.el commands display a preview of register contents, using
> display-buffer in register-preview.  Later, when some register was
> chosen by the user, the window showing this preview is closed via
> delete-window.

The window is created by `display-buffer-below-selected' so we know its
ours and thus delete-window is technically safe here. Use
quit-window/quit-windows-on is ok as well for being defensive.

Martin,

it seems the documentation of display-buffer-below-selected isn't clear
that it only reuses a window if it displays BUFFER already.

Leo