changeset 111188:ae2943f17a5d

Add server-port option. (Bug#854) * lisp/server.el (server-port): New option. (server-start): Use server-port.
author Glenn Morris <rgm@gnu.org>
date Tue, 26 Oct 2010 00:40:07 -0700
parents bdd44c5fd3da
children 9ee83ad29674
files lisp/ChangeLog lisp/server.el
diffstat 2 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Oct 25 23:48:17 2010 -0700
+++ b/lisp/ChangeLog	Tue Oct 26 00:40:07 2010 -0700
@@ -1,3 +1,8 @@
+2010-10-26  Peter Oliver  <p.d.oliver@mavit.org.uk>  (tiny change)
+
+	* server.el (server-port): New option.
+	(server-start): Use server-port.
+
 2010-10-26  Glenn Morris  <rgm@gnu.org>
 
 	* term/ns-win.el (ns-version-string): Remove unused declaration.
--- a/lisp/server.el	Mon Oct 25 23:48:17 2010 -0700
+++ b/lisp/server.el	Tue Oct 26 00:40:07 2010 -0700
@@ -112,6 +112,15 @@
   :version "22.1")
 (put 'server-host 'risky-local-variable t)
 
+(defcustom server-port nil
+  "The port number that the server process should listen on."
+  :group 'server
+  :risky t
+  :type '(choice
+          (string :tag "Port number")
+          (const :tag "Random" nil))
+  :version "24.1")
+
 (defcustom server-auth-dir (locate-user-emacs-file "server/")
   "Directory for server authentication files.
 
@@ -564,7 +573,7 @@
 		       ;; 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