From db01bea28e8753a44d66c8f258159d422a255095 Mon Sep 17 00:00:00 2001 From: ueno Date: Sat, 23 Sep 2000 17:01:41 +0000 Subject: [PATCH] Synch up with `liece-1_4_4-6'. --- lisp/ChangeLog | 13 +++++++++++++ lisp/liece-commands.el | 11 +++-------- lisp/liece-filter.el | 2 +- lisp/liece-handle.el | 2 +- lisp/liece.el | 26 +++++++++++++------------- 5 files changed, 31 insertions(+), 23 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e16986f..e893169 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -6,6 +6,19 @@ `liece-command-own-freeze'. (liece-command-toggle-beep): Rename from `liece-dialogue-beep'. +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 a8e120e..0d9f0f1 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) @@ -779,13 +778,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 d8a5244..c80e779 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) @@ -356,7 +351,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 @@ -365,12 +360,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. -- 1.7.10.4