From 36185eb3f4c441a0394e3c0d82c42fa413fe41a3 Mon Sep 17 00:00:00 2001 From: ueno Date: Sun, 24 Aug 2003 01:15:23 +0000 Subject: [PATCH] * riece.el (riece-buffer-mode-alist): Add riece-command-buffer. (riece): Signal an error when a server is opened; No need to initialize riece-command-buffer specially. --- lisp/riece.el | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/lisp/riece.el b/lisp/riece.el index d253cc1..ade5273 100644 --- a/lisp/riece.el +++ b/lisp/riece.el @@ -51,7 +51,8 @@ (put 'riece-others-mode 'derived-mode-parent 'riece-dialogue-mode) (defvar riece-buffer-mode-alist - '((riece-dialogue-buffer . riece-dialogue-mode) + '((riece-command-buffer . riece-command-mode) + (riece-dialogue-buffer . riece-dialogue-mode) (riece-others-buffer . riece-others-mode) (riece-user-list-buffer . riece-user-list-mode) (riece-channel-list-buffer . riece-channel-list-mode) @@ -236,28 +237,23 @@ If optional argument SAFE is nil, overwrite previous definitions." ;;;###autoload (defun riece (&optional confirm) "Connect to the IRC server and start chatting. -If optional argument CONFIRM is non-nil, ask which IRC server to connect. -If already connected, just pop up the windows." +If optional argument CONFIRM is non-nil, ask which IRC server to connect." (interactive "P") (riece-read-variables-files (if noninteractive (car command-line-args-left))) (riece-insinuate-addons riece-addons) (run-hooks 'riece-after-load-startup-hook) (if (riece-server-opened) - (riece-redisplay-buffers) - (switch-to-buffer (riece-get-buffer-create riece-command-buffer)) - (unless (eq major-mode 'riece-command-mode) - (riece-command-mode)) - (if (or confirm (null riece-server)) - (setq riece-server (completing-read "Server: " riece-server-alist))) - (if (stringp riece-server) - (setq riece-server (riece-server-name-to-server riece-server))) - (riece-create-buffers) - (riece-redisplay-buffers) - (riece-open-server riece-server "") - (run-hooks 'riece-startup-hook) - (message "%s" (substitute-command-keys - "Type \\[describe-mode] for help")))) + (error "Already running")) + (if (or confirm (null riece-server)) + (setq riece-server (completing-read "Server: " riece-server-alist))) + (if (stringp riece-server) + (setq riece-server (riece-server-name-to-server riece-server))) + (riece-create-buffers) + (riece-redisplay-buffers) + (riece-open-server riece-server "") + (run-hooks 'riece-startup-hook) + (message "%s" (substitute-command-keys "Type \\[describe-mode] for help"))) (defun riece-exit () (setq riece-server nil) -- 1.7.10.4