Subject: bug#59668: 29.0.50; [PATCH] Make 'server-stop-automatically' into a defcustom

From: Eli Zaretskii <[email-masked]>
Date: Fri, 02 Dec 2022 16:42:21 +0200

> Date: Thu, 1 Dec 2022 19:30:03 -0800
> Cc: [email-masked]
> From: Jim Porter <[email-masked]>
> 
> @@ -1805,7 +1814,7 @@ server-save-buffers-kill-terminal
>  	    (t (error "Invalid client frame"))))))
>  
>  (defun server-stop-automatically--handle-delete-frame (frame)
> -  "Handle deletion of FRAME when `server-stop-automatically' is used."
> +  "Handle deletion of FRAME when `server-stop-automatically' is `delete-frame'."
>    (when server-stop-automatically
>      (if (if (and (processp (frame-parameter frame 'client))
>  		 (eq this-command 'save-buffers-kill-terminal))
> @@ -1828,7 +1837,7 @@ server-stop-automatically--handle-delete-frame
>  	  (delete-frame frame)))))

AFAIU, this delete-frame is called after save-buffers-kill-emacs, which is
strange: there will be no Emacs to perform this call after that.  What am I
missing?
> +          (const :tag "When empty" empty)

"When empty" doesn't explain itself well enough.  Can we come up with a
better description?

Otherwise LGTM, thanks.