Subject: Re: bug#19468: 25.0.50; UI inconveniences with M-.

From: Dmitry Gutov <[email-masked]>
Date: Mon, 05 Jan 2015 01:51:39 +0300

On 01/04/2015 11:55 AM, martin rudalics wrote:

> You could try to bind "q" to a function that invokes `quit-window' for
> both windows (preferably in inverse order of how they were made).

In all likelihood, we've displayed several buffers in succession in that 
other window. Or none. Doing `quit-window' there exactly once won't suffice.

So I guess this amounts to keeping a buffer-window history of everything 
that was opened from *xrefs*, and on `q', iterate through that list and, 
if the given window displays the given buffer, `quit-buffer' on it. Then 
clear the history and quit *xrefs*.

I kinda like that.