Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
97e121cc
Commit
97e121cc
authored
Jan 21, 2009
by
Chong Yidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(server-start): Allow server to shut down when no frames are available
in daemon-mode.
parent
3c196b45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
lisp/server.el
lisp/server.el
+11
-5
No files found.
lisp/server.el
View file @
97e121cc
...
...
@@ -465,10 +465,16 @@ If a server is already running, the server is not started.
To force-start a server, do \\[server-force-delete] and then
\\[server-start]."
(
interactive
"P"
)
(
when
(
or
(
not
server-clients
)
(
yes-or-no-p
"The current server still has clients; delete them? "
))
(
when
(
or
(
not
server-clients
)
;; Ask the user before deleting existing clients---except
;; when we can't get user input, which may happen when
;; doing emacsclient --eval "(kill-emacs)" in daemon mode.
(
if
(
and
(
daemonp
)
(
null
(
cdr
(
frame-list
)))
(
eq
(
selected-frame
)
terminal-frame
))
leave-dead
(
yes-or-no-p
"The current server still has clients; delete them? "
)))
(
let*
((
server-dir
(
if
server-use-tcp
server-auth-dir
server-socket-dir
))
(
server-file
(
expand-file-name
server-name
server-dir
)))
(
when
server-process
...
...
@@ -979,7 +985,7 @@ The following commands are accepted by the client:
;; We can't use the Emacs daemon's
;; terminal frame.
(
not
(
and
(
daemonp
)
(
=
(
length
(
frame-list
))
1
)
(
null
(
cdr
(
frame-list
)))
(
eq
(
selected-frame
)
terminal-frame
)))))
(
setq
tty-name
nil
tty-type
nil
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment