Emacs: don't warn on startup with server running
Alan Pearce alan@alanpearce.eu
Thu, 13 Apr 2023 13:46:06 +0200
1 files changed, 5 insertions(+), 1 deletions(-)
jump to
M user/emacs/init.el → user/emacs/init.el
@@ -17,7 +17,11 @@ (defun restore-file-name-handler-alist () (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))