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
44954c2f
Commit
44954c2f
authored
Sep 19, 2007
by
Stefan Monnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(server-running-p): New function.
parent
44fe0f65
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/server.el
lisp/server.el
+17
-1
No files found.
lisp/ChangeLog
View file @
44954c2f
2007-09-19 Stefan Monnier <monnier@iro.umontreal.ca>
* server.el (server-running-p): New function.
2007-09-18 Jason Rumney <jasonr@gnu.org>
* term/w32-win.el (w32-focus-frame): Make obsolete alias for
...
...
lisp/server.el
View file @
44954c2f
...
...
@@ -391,7 +391,8 @@ message."
(
server-log
(
format
"server-handle-suspend-tty, terminal %s"
terminal
)
proc
)
(
condition-case
err
(
server-send-string
proc
"-suspend \n"
)
(
file-error
(
ignore-errors
(
server-delete-client
proc
))))))
(
file-error
;The pipe/socket was closed.
(
ignore-errors
(
server-delete-client
proc
))))))
(
defun
server-unquote-arg
(
arg
)
"Remove &-quotation from ARG.
...
...
@@ -526,6 +527,21 @@ kill any existing server communications subprocess."
" "
(
int-to-string
(
emacs-pid
))
"\n"
auth-key
)))))))))
(
defun
server-running-p
(
&optional
name
)
"Test whether server NAME is running."
(
interactive
(
list
(
if
current-prefix-arg
(
read-string
"Server name: "
nil
nil
server-name
))))
(
unless
name
(
setq
name
server-name
))
(
condition-case
nil
(
progn
(
delete-process
(
make-network-process
:name
"server-client-test"
:family
'local
:server
nil
:noquery
t
:service
(
expand-file-name
name
server-socket-dir
)))
t
)
(
file-error
nil
)))
;;;###autoload
(
define-minor-mode
server-mode
"Toggle Server mode.
...
...
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