Undo.
authorueno <ueno>
Wed, 8 Oct 2003 19:51:11 +0000 (19:51 +0000)
committerueno <ueno>
Wed, 8 Oct 2003 19:51:11 +0000 (19:51 +0000)
lisp/ChangeLog
lisp/riece-filter.el
lisp/riece-server.el

index e402723..40e9934 100644 (file)
@@ -1,9 +1,8 @@
 2003-10-08  Daiki Ueno  <ueno@unixuser.org>
 
-       * riece-filter.el (riece-sentinel): Don't call riece-exit here.
-       * riece-server.el (riece-close-server-process): Call riece-exit.
+       * riece-server.el (riece-close-server-process): 
        (riece-quit-server-process): Call riece-close-server-process
-       instead of kill-process.
+       instead of kill-process; call riece-exit if no process is available.
 
 2003-10-07  Daiki Ueno  <ueno@unixuser.org>
 
index a19221a..89abe6f 100644 (file)
                (throw 'contiguous nil)))))
        (forward-line)))))
 
+(eval-when-compile
+  (autoload 'riece-exit "riece"))
 (defun riece-sentinel (process status)
   (if riece-reconnect-with-password
       (let ((server-name
              (riece-part-channel (car channels)))
          (setq channels (cdr channels))))
       (riece-redisplay-buffers)
-      (riece-close-server-process process))))
+      (riece-close-server-process process)
+      ;; If no server process is available, exit.
+      (unless riece-process-list
+       (riece-exit)))))
 
 (provide 'riece-filter)
 
index b4b1729..2b18ba1 100644 (file)
@@ -193,16 +193,11 @@ the `riece-server-keyword-map' variable."
     (buffer-disable-undo)
     (erase-buffer)))
 
-(eval-when-compile
-  (autoload 'riece-exit "riece"))
 (defun riece-close-server-process (process)
   (if riece-debug
       (delete-process process)
     (kill-buffer (process-buffer process)))
-  (setq riece-process-list (delq process riece-process-list))
-  ;; If no server process is available, exit.
-  (unless riece-process-list
-    (riece-exit)))
+  (setq riece-process-list (delq process riece-process-list)))
 
 (defun riece-server-opened (&optional server-name)
   (let ((process-list riece-process-list))
@@ -212,11 +207,16 @@ the `riece-server-keyword-map' variable."
            (throw 'found t))
        (setq process-list (cdr process-list))))))
 
+(eval-when-compile
+  (autoload 'riece-exit "riece"))
 (defun riece-quit-server-process (process &optional message)
   (run-at-time riece-quit-timeout nil
               (lambda (process)
-                (if (memq process riece-process-list)
-                    (riece-close-server-process process)))
+                (when (memq process riece-process-list)
+                  (riece-close-server-process process)
+                  ;; If no server process is available, exit.
+                  (unless riece-process-list
+                    (riece-exit))))
               process)
   (riece-process-send-string process
                             (if message