From 7e169a20e1da2f949b4a08a54df1b0cfc078c5bd Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 13 Apr 2023 13:46:06 +0200 Subject: Emacs: don't warn on startup with server running --- user/emacs/init.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)) -- cgit 1.4.1