* server.el (server-host, server-port, server-auth-dir): Autoload risky.
[bpt/emacs.git] / lisp / server.el
index bc49087..6fbef70 100644 (file)
@@ -110,8 +110,19 @@ If set, the server accepts remote connections; otherwise it is local."
           (string :tag "Name or IP address")
           (const :tag "Local" nil))
   :version "22.1")
+;;;###autoload
 (put 'server-host 'risky-local-variable t)
 
+(defcustom server-port nil
+  "The port number that the server process should listen on."
+  :group 'server
+  :type '(choice
+          (string :tag "Port number")
+          (const :tag "Random" nil))
+  :version "24.1")
+;;;###autoload
+(put 'server-port 'risky-local-variable t)
+
 (defcustom server-auth-dir (locate-user-emacs-file "server/")
   "Directory for server authentication files.
 
@@ -122,6 +133,7 @@ directory residing in a NTFS partition instead."
   :group 'server
   :type 'directory
   :version "22.1")
+;;;###autoload
 (put 'server-auth-dir 'risky-local-variable t)
 
 (defcustom server-raise-frame t
@@ -564,7 +576,7 @@ server or call `M-x server-force-delete' to forcibly disconnect it.")
                       ;; The other args depend on the kind of socket used.
                       (if server-use-tcp
                           (list :family 'ipv4  ;; We're not ready for IPv6 yet
-                                :service t
+                                :service (or server-port t)
                                 :host (or server-host 'local)
                                 :plist '(:authenticated nil))
                         (list :family 'local
@@ -1473,5 +1485,4 @@ only these files will be asked to be saved."
 \f
 (provide 'server)
 
-;; arch-tag: 1f7ecb42-f00a-49f8-906d-61995d84c8d6
 ;;; server.el ends here