Revised.
[riece] / lisp / riece-server.el
index 74bf56c..e0ffa28 100644 (file)
@@ -105,7 +105,7 @@ the `riece-server-keyword-map' variable."
 (put 'riece-with-server-buffer 'lisp-indent-function 1)
 (put 'riece-with-server-buffer 'edebug-form-spec '(form body))
 
 (put 'riece-with-server-buffer 'lisp-indent-function 1)
 (put 'riece-with-server-buffer 'edebug-form-spec '(form body))
 
-(defun riece-flush-send-queue (process &optional reset)
+(defun riece-flush-send-queue (process reset)
   (with-current-buffer (process-buffer process)
     (let ((length 0)
          string)
   (with-current-buffer (process-buffer process)
     (let ((length 0)
          string)
@@ -199,10 +199,10 @@ the `riece-server-keyword-map' variable."
     (make-local-variable 'riece-channel-filter)
     (make-local-variable 'riece-server-name)
     (make-local-variable 'riece-read-point)
     (make-local-variable 'riece-channel-filter)
     (make-local-variable 'riece-server-name)
     (make-local-variable 'riece-read-point)
+    (setq riece-read-point (point-min))
     (make-local-variable 'riece-send-queue)
     (make-local-variable 'riece-send-size)
     (setq riece-send-size 0)
     (make-local-variable 'riece-send-queue)
     (make-local-variable 'riece-send-size)
     (setq riece-send-size 0)
-    (setq riece-read-point (point-min))
     (make-local-variable 'riece-obarray)
     (setq riece-obarray (make-vector riece-obarray-size 0))
     (make-local-variable 'riece-coding-system)
     (make-local-variable 'riece-obarray)
     (setq riece-obarray (make-vector riece-obarray-size 0))
     (make-local-variable 'riece-coding-system)