summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--user/emacs/init.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 6e0dac50..927ed1fb 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -17,7 +17,11 @@
   (setq file-name-handler-alist default-file-name-handler-alist))
 (add-hook 'emacs-startup-hook #'restore-file-name-handler-alist)
 
-(add-hook 'after-init-hook #'server-start)
+(defun maybe-start-server ()
+  (require 'server)
+  (unless (server-running-p)
+    (server-start)))
+(add-hook 'after-init-hook #'maybe-start-server)
 
 (eval-when-compile (require 'fringe-helper))