From: ueno Date: Fri, 22 Sep 2000 08:59:33 +0000 (+0000) Subject: * liece-handle.el (liece-handle-kill-message): Call X-Git-Tag: liece-1_4_7~46 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=847f4887c8a8d2a867c86156a4e685155096b279;p=elisp%2Fliece.git * liece-handle.el (liece-handle-kill-message): Call `liece-close-server' instead of `liece-clear-system'. * liece-commands.el: Don't autoload `liece-window-configuration-pop'. (liece-command-quit): Just send quit. * liece.el (liece-close-server): Run `liece-exit-hook'; abolish argument `quit-string'. * liece-filter.el (liece-sentinel): Call `liece-close-server'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c609757..fda1081 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2000-09-22 Daiki Ueno + + * liece-handle.el (liece-handle-kill-message): Call + `liece-close-server' instead of `liece-clear-system'. + + * liece-commands.el: Don't autoload `liece-window-configuration-pop'. + (liece-command-quit): Just send quit. + + * liece.el (liece-close-server): Run `liece-exit-hook'; abolish + argument `quit-string'. + + * liece-filter.el (liece-sentinel): Call `liece-close-server'. + 2000-09-20 Daiki Ueno * liece-compat.el: Require `wid-edit'. diff --git a/lisp/liece-commands.el b/lisp/liece-commands.el index 53ab9ec..15053a3 100644 --- a/lisp/liece-commands.el +++ b/lisp/liece-commands.el @@ -39,7 +39,6 @@ (require 'liece-minibuf) (autoload 'liece-dcc-chat-send "liece-dcc") -(autoload 'liece-window-configuration-pop "liece-window") (autoload 'liece-command-ctcp-version "liece-ctcp" nil t) (autoload 'liece-command-ctcp-userinfo "liece-ctcp" nil t) @@ -760,13 +759,9 @@ If prefix argument ARG is non-nil, leave signoff message." (if arg (read-string (_ "Signoff message: ")) (or liece-signoff-message (product-name (product-find 'liece-version)))))) - (liece-close-server quit-string)) - (liece-clear-system) - (if liece-save-variables-are-dirty - (liece-command-save-vars)) - (if (interactive-p) - (liece-window-configuration-pop)) - (run-hooks 'liece-exit-hook))) + (if quit-string + (liece-send "QUIT :%s" quit-string) + (liece-send "QUIT"))))) (defun liece-command-generic (message) "Enter a generic IRC MESSAGE, which is sent to the server. diff --git a/lisp/liece-filter.el b/lisp/liece-filter.el index fa5ef6f..0d6430f 100644 --- a/lisp/liece-filter.el +++ b/lisp/liece-filter.el @@ -119,7 +119,7 @@ (liece-sentinel-error proc status) (liece-message (_ "Connection closed. (%s)") (substring status 0 (1- (length status))))) - (liece-clear-system)) + (liece-close-server)) (liece-reconnect-with-password (liece)) (t diff --git a/lisp/liece-handle.el b/lisp/liece-handle.el index 18bbfb0..c47fbf8 100644 --- a/lisp/liece-handle.el +++ b/lisp/liece-handle.el @@ -374,7 +374,7 @@ (liece-insert-info (append liece-D-buffer liece-O-buffer) (format "You were killed by %s. (Path: %s. RIP)\n" prefix path))) - (liece-clear-system)) + (liece-close-server)) (defun* liece-handle-join-message (prefix rest) (let (flag (xnick prefix) (nick prefix) (chnl rest)) diff --git a/lisp/liece.el b/lisp/liece.el index a8ca428..d9fa3ae 100644 --- a/lisp/liece.el +++ b/lisp/liece.el @@ -65,12 +65,7 @@ "Mapping from keywords to default values. All keywords that can be used must be listed here.")) -(defadvice save-buffers-kill-emacs - (before liece-save-buffers-kill-emacs activate) - "Prompt user to quit IRC explicitly." - (run-hooks 'liece-before-kill-emacs-hook) ) - -(add-hook 'liece-before-kill-emacs-hook 'liece-command-quit) +(add-hook 'kill-emacs-hook 'liece-command-quit) (defvar liece-tmp-server-name nil "Temporaly server name.") (defvar liece-buffer-last-check-time nil) @@ -361,7 +356,7 @@ is running on." liece-server nil)) ;;;###liece-autoload -(defun liece-close-server (&optional quit-string) +(defun liece-close-server () "Close chat server." (unwind-protect (progn @@ -370,12 +365,17 @@ is running on." (eq 'liece-sentinel (process-sentinel liece-server-process))) (set-process-sentinel liece-server-process nil)) - ;; We cannot send QUIT command unless the process is running. - (when (liece-server-opened) - (if quit-string - (liece-send "QUIT :%s" quit-string) - (liece-send "QUIT")))) - (liece-close-server-internal))) + (if (liece-server-opened) + (liece-command-quit))) + (liece-close-server-internal) + ;; Save settings to the `~/.liece/init.el' file. + (if liece-save-variables-are-dirty + (liece-command-save-vars)) + ;; Reset everything. + (liece-clear-system) + (liece-window-configuration-pop) + ;; Allow the user to do things after cleaning up. + (run-hooks 'liece-exit-hook))) (defmacro liece-server-keyword-bind (plist &rest body) "Return a `let' form that binds all variables in PLIST.