2000-09-11 Daiki Ueno <ueno@unixuser.org>
+ * liece-commands.el (liece-command-quit): Don't send QUIT.
+
+ * liece-emacs.el (liece-emacs-splash): Use `generate-new-buffer'
+ instead of `liece-get-buffer-create'
+
+ * liece-xemacs.el (liece-xemacs-splash): Synch with liece-emacs.el
+
* liece.el (liece-clear-system): Call
`liece-buffer-dispose-function' instead of burying buffer.
(liece-open-server-internal): Simplify; Don't use
`liece-get-buffer-create' to prepare process-buffer.
+ (liece-close-server): Accept optional argument `quit-string'.
* liece-vars.el (liece-buffer-dispose-function): New variable.
(if arg (read-string (_ "Signoff message: "))
(or liece-signoff-message
(product-name (product-find 'liece-version))))))
- (liece-send "QUIT :%s" quit-string))
+ (liece-close-server quit-string))
(liece-clear-system)
- (liece-close-server)
(if liece-save-variables-are-dirty
(liece-command-save-vars))
(if (interactive-p)
(progn
(setq config (current-window-configuration))
(save-excursion
- (switch-to-buffer (setq buffer (liece-get-buffer-create
- (concat (if arg "*" " *")
- (liece-version) "*"))))
+ (setq buffer (generate-new-buffer
+ (concat (if arg "*" " *")
+ (liece-version) "*")))
+ (switch-to-buffer buffer)
(erase-buffer)
(static-cond
((and (fboundp 'image-type-available-p)
(unwind-protect
(progn
(setq config (current-window-configuration))
- (switch-to-buffer
- (setq buffer (generate-new-buffer
- (concat (if arg "*" " *")
- (liece-version) "*"))))
+ (setq buffer (generate-new-buffer
+ (concat (if arg "*" " *")
+ (liece-version) "*")))
+ (switch-to-buffer buffer)
(delete-other-windows)
(liece-xemacs-splash-at-point)
(set-buffer-modified-p nil)
liece-server nil))
;;;###liece-autoload
-(defun liece-close-server ()
+(defun liece-close-server (&optional quit-string)
"Close chat server."
(unwind-protect
(progn
;; Unset default sentinel function before closing connection.
- (and
- liece-server-process
- (eq (quote liece-sentinel)
- (process-sentinel liece-server-process))
- (set-process-sentinel liece-server-process nil))
+ (when (and liece-server-process
+ (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.
- (if (liece-server-opened)
- (liece-send "QUIT")))
+ (when (liece-server-opened)
+ (if quit-string
+ (liece-send "QUIT :%s" quit-string)
+ (liece-send "QUIT"))))
(liece-close-server-internal)))
(defmacro liece-server-keyword-bind (plist &rest body)
(set-buffer (liece-get-buffer-create buffer))
(or (eq major-mode mode)
(null mode)
- (funcall mode)))))
- ))
+ (funcall mode)))))))
;;;###liece-autoload
(defun liece-clear-system ()