aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/server.el16
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/server.el b/lisp/server.el
index 910c0047dce..20b9ff57ffe 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -465,10 +465,16 @@ If a server is already running, the server is not started.
465To force-start a server, do \\[server-force-delete] and then 465To force-start a server, do \\[server-force-delete] and then
466\\[server-start]." 466\\[server-start]."
467 (interactive "P") 467 (interactive "P")
468 (when (or 468 (when (or (not server-clients)
469 (not server-clients) 469 ;; Ask the user before deleting existing clients---except
470 (yes-or-no-p 470 ;; when we can't get user input, which may happen when
471 "The current server still has clients; delete them? ")) 471 ;; doing emacsclient --eval "(kill-emacs)" in daemon mode.
472 (if (and (daemonp)
473 (null (cdr (frame-list)))
474 (eq (selected-frame) terminal-frame))
475 leave-dead
476 (yes-or-no-p
477 "The current server still has clients; delete them? ")))
472 (let* ((server-dir (if server-use-tcp server-auth-dir server-socket-dir)) 478 (let* ((server-dir (if server-use-tcp server-auth-dir server-socket-dir))
473 (server-file (expand-file-name server-name server-dir))) 479 (server-file (expand-file-name server-name server-dir)))
474 (when server-process 480 (when server-process
@@ -979,7 +985,7 @@ The following commands are accepted by the client:
979 ;; We can't use the Emacs daemon's 985 ;; We can't use the Emacs daemon's
980 ;; terminal frame. 986 ;; terminal frame.
981 (not (and (daemonp) 987 (not (and (daemonp)
982 (= (length (frame-list)) 1) 988 (null (cdr (frame-list)))
983 (eq (selected-frame) 989 (eq (selected-frame)
984 terminal-frame))))) 990 terminal-frame)))))
985 (setq tty-name nil tty-type nil) 991 (setq tty-name nil tty-type nil)