Emacs: Set EMACS_SERVER env variable when starting server
parent
cfac5bbea9
commit
eff7e306db
|
@ -280,7 +280,7 @@
|
|||
(setq inferior-lisp-program "clisp")
|
||||
|
||||
;; Let Emacs auto-load/save sessions.
|
||||
(when (and (fboundp 'server-running-p) (server-running-p))
|
||||
(when (getenv "EMACS_SERVER")
|
||||
(desktop-save-mode 1)
|
||||
(setq history-length 250)
|
||||
(setq desktop-dirname (concat emacs-cache-folder "desktop"))
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
(set-face-bold-p 'error t))
|
||||
|
||||
;; Blinking cursor is on only when Emacs is not daemonized.
|
||||
(when (not (boundp 'server-running-p))
|
||||
(unless (getenv "EMACS_SERVER")
|
||||
(blink-cursor-mode -1))
|
||||
|
||||
;; Line numbers. Graphic version has a gray bar separating text from line
|
||||
|
|
|
@ -13,6 +13,9 @@ Calling script can have different names.
|
|||
* emc: emacs instance is opened in current terminal.
|
||||
* emw: if graphical, tell client to wait.
|
||||
|
||||
When starting the server, the EMACS_SERVER variable is set so that Emacs can
|
||||
know in its initialization file whether the server is going to be started.
|
||||
|
||||
All emacsclient(1) options are supported.
|
||||
|
||||
$(emacsclient --help)
|
||||
|
@ -32,5 +35,5 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
[ ! -e /tmp/emacs$(id -u)/server ] && emacs --daemon --no-site-file
|
||||
[ ! -e /tmp/emacs$(id -u)/server ] && EMACS_SERVER=t emacs --daemon --no-site-file
|
||||
emacsclient $param "$@"
|
||||
|
|
Loading…
Reference in New Issue