From: ueno Date: Wed, 8 Oct 2003 19:51:11 +0000 (+0000) Subject: Undo. X-Git-Tag: riece-0_1_3~12 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1cb63592226b6a9dc1ea23036bfabc330ca36e6;p=elisp%2Friece.git Undo. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e402723..40e9934 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,9 +1,8 @@ 2003-10-08 Daiki Ueno - * 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 diff --git a/lisp/riece-filter.el b/lisp/riece-filter.el index a19221a..89abe6f 100644 --- a/lisp/riece-filter.el +++ b/lisp/riece-filter.el @@ -124,6 +124,8 @@ (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 @@ -154,7 +156,10 @@ (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) diff --git a/lisp/riece-server.el b/lisp/riece-server.el index b4b1729..2b18ba1 100644 --- a/lisp/riece-server.el +++ b/lisp/riece-server.el @@ -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