How to check if a function (e.g. server-running-p) is available under Emacs?

后端 未结 3 584
予麋鹿
予麋鹿 2021-01-01 17:28

I\'m trying to check if server-running-p is available in my .emacs file before calling it. I already have the following:

(if (not (server-runnin         


        
3条回答
  •  长发绾君心
    2021-01-01 18:08

    A simpler way is to use "require" to make sure the server code is loaded. Here's what I use:

    (require 'server)
    (unless (server-running-p)
        (server-start))
    

提交回复
热议问题