2003-05-31 Daiki Ueno <ueno@unixuser.org>
+ * riece-filter.el (riece-sentinel): Simplified.
+
+ * riece-display.el (riece-user-list-update-buffer): Check the
+ existence of riece-user-list-buffer.
+ (riece-channel-list-update-buffer): Check the existence of
+ riece-channel-list-buffer.
+ (riece-set-window-points): Ditto.
+
+ * riece-commands.el (riece-command-open-server): Simplified.
+ (riece-command-toggle-channel-buffer-mode): Set
+ riece-save-variables-are-dirty to t.
+ (riece-command-toggle-user-list-buffer-mode): Ditto.
+ (riece-command-toggle-channel-list-buffer-mode): Ditto.
+
+ * riece-server.el (riece-start-server): Abolish.
+ (riece-open-server): Set riece-server-process-alist and
+ riece-server-process here.
+
+2003-05-31 Daiki Ueno <ueno@unixuser.org>
+
* riece-filter.el (riece-sentinel): Close process even if
riece-reconnect-with-password == t.
(riece-handle-message): Catch errors occured in hooks.
(defun riece-command-toggle-channel-buffer-mode ()
(interactive)
(setq riece-channel-buffer-mode
- (not riece-channel-buffer-mode))
+ (not riece-channel-buffer-mode)
+ riece-save-variables-are-dirty t)
(riece-command-configure-windows))
(defun riece-command-toggle-user-list-buffer-mode ()
(interactive)
(setq riece-user-list-buffer-mode
- (not riece-user-list-buffer-mode))
+ (not riece-user-list-buffer-mode)
+ riece-save-variables-are-dirty t)
(riece-command-configure-windows))
(defun riece-command-toggle-channel-list-buffer-mode ()
(interactive)
(setq riece-channel-list-buffer-mode
- (not riece-channel-list-buffer-mode))
+ (not riece-channel-list-buffer-mode)
+ riece-save-variables-are-dirty t)
(riece-command-configure-windows))
(defun riece-command-finger (user &optional recurse)
(defun riece-command-open-server (server-name)
(interactive
(list (completing-read "Server: " riece-server-alist)))
- (let ((process (riece-start-server
- (riece-server-name-to-server server-name)
- server-name)))
- (with-current-buffer (process-buffer process)
- (setq riece-server-name server-name))
- (setq riece-server-process-alist
- (cons (cons server-name process)
- riece-server-process-alist))))
+ (riece-open-server
+ (riece-server-name-to-server server-name)
+ server-name))
(defun riece-command-close-server (server-name &optional message)
(interactive
(unless (riece-frozen riece-user-list-buffer)
(set-window-start (get-buffer-window riece-user-list-buffer)
(point-min)))))
- (if (get-buffer-window riece-channel-list-buffer)
+ (if (and riece-channel-list-buffer
+ (get-buffer-window riece-channel-list-buffer))
(with-current-buffer riece-channel-list-buffer
(unless (riece-frozen riece-channel-list-buffer)
(set-window-start (get-buffer-window riece-channel-list-buffer)
(point-min))))))
(defun riece-user-list-update-buffer ()
- (if (get-buffer riece-user-list-buffer)
+ (if (and riece-user-list-buffer
+ (get-buffer riece-user-list-buffer))
(save-excursion
(set-buffer riece-user-list-buffer)
(when (and riece-current-channel
(setq users (cdr users))))))))
(defun riece-channel-list-update-buffer ()
- (if (get-buffer riece-channel-list-buffer)
+ (if (and riece-channel-list-buffer
+ (get-buffer riece-channel-list-buffer))
(save-excursion
(set-buffer riece-channel-list-buffer)
(let ((inhibit-read-only t)
(unwind-protect
(if (eq process riece-server-process)
(riece) ;Need to initialize system.
- (let* ((entry (rassq process riece-server-process-alist))
- (server-name
- (with-current-buffer (process-buffer process)
- riece-server-name)))
- (setcdr entry (riece-start-server
- (riece-server-name-to-server server-name)
- server-name))
- (riece-close-server-process process)))
+ (let ((server-name
+ (car (rassq process riece-server-process-alist))))
+ (riece-close-server server-name)
+ (riece-open-server
+ (riece-server-name-to-server server-name)
+ server-name)))
(setq riece-reconnect-with-password nil))
(let ((server-name (with-current-buffer (process-buffer process)
riece-server-name)))
(put 'riece-server-keyword-bind 'lisp-indent-function 1)
(put 'riece-server-keyword-bind 'edebug-form-spec '(form body))
-(defun riece-start-server (server &optional server-name)
- (if server-name
- (message "Connecting to IRC server on %s..." server-name)
- (message "Connecting to IRC server..."))
- (prog1 (riece-open-server server server-name)
- (if server-name
- (message "Connecting to IRC server on %s...done" server-name)
- (message "Connecting to IRC server...done"))))
-
(defun riece-clear-system ()
(while riece-buffer-list
(if (and (get-buffer (car riece-buffer-list))
riece-save-variables-are-dirty t))
(cdr entry)))
-(defun riece-open-server (server server-name)
+(defun riece-open-server (server &optional server-name)
+ (if server-name
+ (message "Connecting to IRC server on %s..." server-name)
+ (message "Connecting to IRC server..."))
(riece-server-keyword-bind server
(let* (selective-display
(coding-system-for-read 'binary)
(setq riece-last-nickname riece-real-nickname
riece-nick-accepted 'sent
riece-coding-system coding-system))
- process)))
+ (if server-name
+ (setq riece-server-process-alist
+ (cons (cons server-name process)
+ riece-server-process-alist))
+ (setq riece-server-process process))))
+ (if server-name
+ (message "Connecting to IRC server on %s...done" server-name)
+ (message "Connecting to IRC server...done")))
(defun riece-reset-process-buffer (process)
(save-excursion
(if (or confirm (null riece-server))
(completing-read "Server: " riece-server-alist)
riece-server)))
- (setq riece-server-process (riece-start-server
- (riece-server-name-to-server server-name))))
+ (riece-open-server (riece-server-name-to-server server-name)))
(riece-create-buffers)
(riece-configure-windows)
(let ((channel-list riece-startup-channel-list))