Start the emacs server only if another instance of the server is not running.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sat, 18 Jun 2011 10:28:19 +0300
changeset 640 b430ca70e6b0
parent 639 3e66a9605c4f
child 641 712eec51428a
Start the emacs server only if another instance of the server is not running.
.emacs-my
--- a/.emacs-my	Wed Jun 08 11:43:23 2011 +0300
+++ b/.emacs-my	Sat Jun 18 10:28:19 2011 +0300
@@ -246,7 +246,8 @@
   (require 'server)
   (when (and (= emacs-major-version 23) (>= emacs-minor-version 1) (<= emacs-minor-version 2) (equal window-system 'w32))
     (defun server-ensure-safe-dir (dir) "Noop" t)) ; Suppress error directory ~/.emacs.d/server is unsafe on windows.
-  (server-start)
+  (unless (server-running-p server-name)
+    (server-start))
   )
 
 ;; (desktop-load-default)