Change Guile license to LGPLv3+
[bpt/guile.git] / emacs / gds-server.el
index cca23c8..d4fe997 100644 (file)
@@ -5,8 +5,7 @@
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
 ;;;; License as published by the Free Software Foundation; either
-;;;; version 2.1 of the License, or (at your option) any later
-;;;; version.
+;;;; version 3 of the License, or (at your option) any later version.
 ;;;; 
 ;;;; This library is distributed in the hope that it will be useful,
 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -26,7 +25,7 @@
   :group 'scheme)
 
 
-;;;; Communication with the (ossau gds-server) subprocess.
+;;;; Communication with the (ice-9 gds-server) subprocess.
 
 ;; Subprocess output goes into the `*GDS Process*' buffer, and
 ;; is then read from there one form at a time.  `gds-read-cursor' is
   :group 'gds
   :type '(choice (const :tag "nil" nil) directory))
 
-(defun gds-start-server (procname port protocol-handler &optional bufname)
-  "Start a GDS server process called PROCNAME, listening on TCP port PORT.
-PROTOCOL-HANDLER should be a function that accepts and processes one
-protocol form.  Optional arg BUFNAME specifies the name of the buffer
-that is used for process output\; if not specified the buffer name is
-the same as the process name."
+(defun gds-start-server (procname port-or-path protocol-handler &optional bufname)
+  "Start a GDS server process called PROCNAME, listening on TCP port
+or Unix domain socket PORT-OR-PATH.  PROTOCOL-HANDLER should be a
+function that accepts and processes one protocol form.  Optional arg
+BUFNAME specifies the name of the buffer that is used for process
+output; if not specified the buffer name is the same as the process
+name."
   (with-current-buffer (get-buffer-create (or bufname procname))
     (erase-buffer)
     (let* ((code (format "(begin
                             %s
-                            (use-modules (ossau gds-server))
-                            (run-server %d))"
+                            (use-modules (ice-9 gds-server))
+                            (run-server %S))"
                         (if gds-scheme-directory
                             (concat "(set! %load-path (cons "
                                     (format "%S" gds-scheme-directory)
                                     " %load-path))")
                           "")
-                         port))
+                         port-or-path))
            (process-connection-type nil) ; use a pipe
            (proc (start-process procname
                                 (current-buffer)