Function: server-mode
server-mode is an autoloaded, interactive and byte-compiled function
defined in server.el.gz.
Signature
(server-mode &optional ARG)
Documentation
Toggle Server mode.
Server mode runs a process that accepts commands from the
emacsclient program. See Info node (emacs)Emacs server and
server-start for details.
This is a global minor mode. If called interactively, toggle the
Server mode mode. If the prefix argument is positive, enable the
mode, and if it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate (default-value \=server-mode)'.
The mode's hook is called both when the mode is enabled and when it is disabled.
Probably introduced at or before Emacs version 22.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/server.el.gz
;;;###autoload
(define-minor-mode server-mode
"Toggle Server mode.
Server mode runs a process that accepts commands from the
`emacsclient' program. See Info node `Emacs server' and
`server-start' for details."
:global t
:version "22.1"
:keymap server-mode-map
;; Fixme: Should this check for an existing server socket and do
;; nothing if there is one (for multiple Emacs sessions)?
(server-start (not server-mode)))