Subject: Re: bug#5616: 23.1.92; `delete-frame' deletes the last frame when emacsclient runs

From: Stefan Monnier <[email-masked]>
Date: Tue, 23 Feb 2010 12:48:47 -0500

> when I run `emacs --daemon -Q' and `emacsclient -nc', then if I try `M-x
> delete-frame', emacsclient seems will delete last remaining frame
> without check or remind.

Yes, this is only marginally new: if you have frames on several
displays, then M-x delete-frame will happily delete the last frame of
a given display, as long as there are still frames on some
other display.

So the case of "emacs --daemon" is only new in that the remaining frame
is actually not visible to the user, but is instead used internally by
the "emacs --daemon" code.

The rule for delete-frame should be something like "refuse to delete
a frame if it would result in a dead Emacs process", but admittedly, the
code doesn't really enforce that either.

        Stefan