Sync up with egg-980712.
[elisp/egg.git] / egg / sj3rpc.el
index 9520e53..4d76603 100644 (file)
@@ -33,7 +33,9 @@
 
 (eval-when-compile
   (require 'egg-com)
-;;  (load-library "egg/sj3")
+
+  ;; To get definition of sj3-make-bunsetsu and others
+  (load-library "egg/sj3")
   (defmacro sj3-const (c)
     (cond ((eq c 'OPEN)            1)
          ((eq c 'CLOSE)           2)
          (t (error "No such constant")))))
 
 ;; XXX
-(defconst sj3rpc-error-message (vector ))
+(defconst sj3rpc-error-message 
+     [ 
+      "Error #0 \e$B$G$9\e(B"
+      ])
 
 (defun sj3rpc-get-error-message (errno)
   (or (and (>= errno 0)
                 ;; program name
                 (format "%d.emacs-egg" (emacs-pid)))
     (comm-unpack (u) result)
-    (if (= result -2)
-       0
-      result)))
+    (if (= result -2)                  ; negated version number
+       0                               ; OK
+      -1)))                            ; Failure (different version)
 
 (defun sj3rpc-close (proc)
   (comm-call-with-proc proc (result)