-(defvar server-program (expand-file-name "emacsserver" exec-directory)
- "*The program to use as the edit server.")
-
-(defvar server-visit-hook nil
- "*List of hooks to call when visiting a file for the Emacs server.")
-
-(defvar server-switch-hook nil
- "*List of hooks to call when switching to a buffer for the Emacs server.")
-
-(defvar server-done-hook nil
- "*List of hooks to call when done editing a buffer for the Emacs server.")
+(defgroup server nil
+ "Emacs running as a server process."
+ :group 'external)
+
+(defcustom server-program (expand-file-name "emacsserver" exec-directory)
+ "*The program to use as the edit server."
+ :group 'server
+ :type 'string)
+
+(defcustom server-visit-hook nil
+ "*List of hooks to call when visiting a file for the Emacs server."
+ :group 'server
+ :type '(repeat function))
+
+(defcustom server-switch-hook nil
+ "*List of hooks to call when switching to a buffer for the Emacs server."
+ :group 'server
+ :type '(repeat function))
+
+(defcustom server-done-hook nil
+ "*List of hooks to call when done editing a buffer for the Emacs server."
+ :group 'server
+ :type '(repeat function))