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

From: martin rudalics <[email-masked]>
Date: Sat, 13 Aug 2016 10:24:26 +0200

> 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.
 >
 > It seems to me, that this call should be replaced by a call to
 > quit-window, because this function does the right thing: It only deletes
 > the window if it was previously created and otherwise shows the previous
 > buffer in that window.
 >
 > If that analysis can be agreed upon: Grepping through lisp/*, I found 62
 > uses of delete-window outside window.el.  I assume that most of those
 > applications are problematic in the same way (e.g. finder.el).

I agree on that analysis.  At least for every window created or used by
‘display-buffer’ the appropriate action should be ‘quit-window’.  Could
you provide a patch fixing the (about ten) most obvious cases first?

Thanks, martin