I'd like to execute some code in my init file only if emacs server is running (specifically if emacs is started with the --daemon
flag). There doesn't seem to be any hook that runs when server-start
is called and there's no variable I can look at to see if the server is running.
A hack is to use (featurep 'server)
, since the server feature is not loaded unless the server is started, and this does seem to work for my purposes, but I'd like to know what the right way of doing this is. Thanks.