Subject: Re: bug#3303: delete-frame raises old (invisible) frame

From: Stefan Monnier <[email-masked]>
Date: Tue, 19 May 2009 10:30:26 -0400

>>> I still don't understand the above code, for the reason already
>>> explained: you use `selected-frame' in a way that seems to imply
>>> that you expect make-frame to change the selected-frame, where its
>>> docstring says explicitly that it doesn't.

>> Ah, now I see why you don't understand.

>> The doc string says that the system may select it, and that's
>> exactly what happens here on Cocoa/OSX.

> That's due to the following NS-specific code in term/ns-win.el:

>   ;; frame will be focused anyway, so select it
>   ;; (if this is not done, modeline is dimmed until first interaction)
>   (add-hook 'after-make-frame-functions 'select-frame)

> I would read this comment as "this is a workaround".  TRT is to
> investigate why the modeline is dimmed until the first interaction and
> fix it, of course.  Otherwise, the NS port will face hard-to-find
> incompatibilities in various elisp packages.

Agreed.  Could someone remove the above line and install a proper fix
for it?

        Stefan