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-running-p))
(server-start))
But on some computers where I use Emacs, calling (server-running-p)
gives an error because said call is not available. So I want to check if server-running-p
is available before calling it. I thought boundp
would do the try, but calling (boundp 'server-running-p)
return nil
even though the (server-running-p)
call succeeds. What's the right way to check that calling server-running-p
won't fail... or at least to suppress the error if said call fails. (And what kind of weird object is server-running-p
anyway that boundp
returns nil
, but calling it succeeds?)
This is on Emacs 23.2.1, if it makes any difference.
Actually found the answer. You have to use fboundp
for this instead of boundp
, for some reason.