Synch up with `liece-1_4_4-6'.
authorueno <ueno>
Sat, 23 Sep 2000 17:01:41 +0000 (17:01 +0000)
committerueno <ueno>
Sat, 23 Sep 2000 17:01:41 +0000 (17:01 +0000)
lisp/ChangeLog
lisp/liece-commands.el
lisp/liece-filter.el
lisp/liece-handle.el
lisp/liece.el

index e16986f..e893169 100644 (file)
@@ -6,6 +6,19 @@
        `liece-command-own-freeze'.
        (liece-command-toggle-beep): Rename from `liece-dialogue-beep'.
 
+2000-09-22   Daiki Ueno  <ueno@unixuser.org>
+
+       * 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  <ueno@unixuser.org>
 
        * liece-compat.el: Require `wid-edit'.
index a8e120e..0d9f0f1 100644 (file)
@@ -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.
index fa5ef6f..0d6430f 100644 (file)
        (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
index 18bbfb0..c47fbf8 100644 (file)
     (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))
index d8a5244..c80e779 100644 (file)
     "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.