Subject: bug#3442: 23.0.94; "C-x 5 1" (delete-other-frames) kills daemon

From: Eli Zaretskii <[email-masked]>
Date: Thu, 04 Jun 2009 23:20:00 -0400

> Date: Thu, 4 Jun 2009 18:25:09 -0700 (PDT)
> From: Dan Nicolaescu <[email-masked]>
> Cc: Teemu Likonen <[email-masked]>, [email-masked]
> Reply-To: Dan Nicolaescu <[email-masked]>, [email-masked]
> 
> Stefan Monnier <[email-masked]> writes:
> 
>   > I've installed a patch that makes C-x 5 1 only delete frames on the same
>   > terminal, which should fix this issue.
> 
> That's a behavior change, isn't it?
> Maybe people use C-x 5 1 to remove the rest of the frames on all
> terminals... (I personally have never used C-x 5 1)
> 
> If we don't want to change the C-x 5 1 behavior, we can just avoid
> deleting the daaemon special frame, i.e.:
> 
> 
> +      (unless (or (eq (frame-parameter frame 'minibuffer) 'only)
> +                 ;; Take care not to delete the special frame that
> +                 ;; the daemon uses.
> +                 (and is-daemon (eq frame terminal-frame)))
> 
> where is-daemon is let bound to (daemonp)

FWIW, I like Dan's suggestion better, especially since we are late in
the pretest, and shouldn't install changes that change well
established behavior.