Subject: bug#16661: 24.3.50; standalone minibuffer frame gets renamed with name of aother frame

From: Drew Adams <[email-masked]>
Date: Mon, 24 Feb 2014 13:34:57 -0800 (PST)

> When called from window-setup-hook, you have no guarantee about what is
> the current buffer.  It may be a buffer that's not even displayed.
> So you want to use (window-buffer (frame-selected-window)) rather than
> current-buffer, here.

Good point; the default for non-interactive use was flaky.

> Not sure if it's related to your actual bug, tho, since
> window-setup-hook is only run once at startup and your problem seems to
> happen later.

Yes.