diff options
author | Alan Pearce | 2023-04-13 13:46:06 +0200 |
---|---|---|
committer | Alan Pearce | 2023-04-14 18:05:49 +0200 |
commit | 7e169a20e1da2f949b4a08a54df1b0cfc078c5bd (patch) | |
tree | 3054b1dcd515ed34cd3c035bf70f21585768fc1d /user/emacs | |
parent | 50b2162aefcf6c63aa07b467e48e8973d5ed254e (diff) | |
download | nixfiles-7e169a20e1da2f949b4a08a54df1b0cfc078c5bd.tar.lz nixfiles-7e169a20e1da2f949b4a08a54df1b0cfc078c5bd.tar.zst nixfiles-7e169a20e1da2f949b4a08a54df1b0cfc078c5bd.zip |
Emacs: don't warn on startup with server running
Diffstat (limited to 'user/emacs')
-rw-r--r-- | user/emacs/init.el | 6 |
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)) |