Subject: 25.2; desktop-clear with emacs as daemon results in error on C-x 5 0

From: Alex Branham <[email-masked]>
Date: Sat, 13 May 2017 18:58:19 +0200

Running Emacs as a daemon, call desktop-clear, then later try to close the last frame with C-x 5 0, it results in an error ("Attempt to delete the sole visible or iconified frame") and the frame does not close.

I can reproduce it with:

emacs -Q --daemon
emacsclient -nc
M-x desktop-clear RET
C-x 5 0

I'm using Emacs 25.2 on a linux system.