From: ueno Date: Mon, 11 Sep 2000 03:34:58 +0000 (+0000) Subject: * liece-commands.el (liece-command-quit): Don't send QUIT. X-Git-Tag: liece-1_4_4-1~22 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ef55f3cc67cb78e9da203aeaf3b4725635c51e0;p=elisp%2Fliece.git * 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-close-server): Accept optional argument `quit-string'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3925b7d..9717630 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,9 +1,17 @@ 2000-09-11 Daiki Ueno + * 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. diff --git a/lisp/liece-commands.el b/lisp/liece-commands.el index 963fc55..8d3331e 100644 --- a/lisp/liece-commands.el +++ b/lisp/liece-commands.el @@ -821,9 +821,8 @@ 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-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) diff --git a/lisp/liece-emacs.el b/lisp/liece-emacs.el index dee2eda..8f7761c 100644 --- a/lisp/liece-emacs.el +++ b/lisp/liece-emacs.el @@ -121,9 +121,10 @@ (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) diff --git a/lisp/liece-xemacs.el b/lisp/liece-xemacs.el index 37d30aa..0bc60bc 100644 --- a/lisp/liece-xemacs.el +++ b/lisp/liece-xemacs.el @@ -539,10 +539,10 @@ If ARG is given, don't hide splash buffer." (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) diff --git a/lisp/liece.el b/lisp/liece.el index a47d228..539509f 100644 --- a/lisp/liece.el +++ b/lisp/liece.el @@ -379,19 +379,20 @@ is running on." 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) @@ -799,8 +800,7 @@ Instead, these commands are available: (set-buffer (liece-get-buffer-create buffer)) (or (eq major-mode mode) (null mode) - (funcall mode))))) - )) + (funcall mode))))))) ;;;###liece-autoload (defun liece-clear-system ()