From: ueno Date: Thu, 12 Jun 2003 10:10:52 +0000 (+0000) Subject: * riece-naming.el (riece-naming-assert-join): Call X-Git-Tag: strict-naming-mergepoint~11 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f7b45e1171c34405a3c757535a83f022fec58782;p=elisp%2Friece.git * riece-naming.el (riece-naming-assert-join): Call riece-update-buffers. (riece-naming-assert-part): Ditto. * riece-filter.el (riece-sentinel): Don't bind riece-overriding-server-name; use riece-part-channel. * riece-display.el (riece-switch-to-channel): Don't set riece-channel-buffer. (riece-update-buffers): Set riece-channel-buffer here. * riece-commands.el (riece-command-switch-to-channel-by-number): Fixed. (riece-command-close-server): Fixed completion bug. (riece-command-universal-server-name-argument): Ditto. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 189d9af..d45070d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,22 @@ 2003-06-12 Daiki Ueno + * riece-naming.el (riece-naming-assert-join): Call + riece-update-buffers. + (riece-naming-assert-part): Ditto. + + * riece-filter.el (riece-sentinel): Don't bind + riece-overriding-server-name; use riece-part-channel. + + * riece-display.el (riece-switch-to-channel): Don't set + riece-channel-buffer. + (riece-update-buffers): Set riece-channel-buffer here. + + * riece-commands.el (riece-command-switch-to-channel-by-number): Fixed. + (riece-command-close-server): Fixed completion bug. + (riece-command-universal-server-name-argument): Ditto. + +2003-06-12 Daiki Ueno + * riece-doctor.el: Don't require 'doctor; autoload doctor-mode and doctor-read-print. diff --git a/lisp/riece-commands.el b/lisp/riece-commands.el index 4e2776b..ff64843 100644 --- a/lisp/riece-commands.el +++ b/lisp/riece-commands.el @@ -46,15 +46,9 @@ (if (string-match "[0-9]+$" command-name) (list (string-to-number (match-string 0 command-name))) (list (string-to-number (read-string "Number: ")))))) - (let ((channels riece-current-channels) - (index 1)) - (while (and channels - (< index number)) - (if (car channels) - (setq index (1+ index))) - (setq channels (cdr channels))) - (if (car channels) - (riece-command-switch-to-channel (car channels)) + (let ((channel (nth (1- number) riece-current-channels))) + (if channel + (riece-command-switch-to-channel channel) (error "No such number!")))) (eval-and-compile @@ -610,7 +604,7 @@ If prefix argument ARG is non-nil, toggle frozen status." (mapcar (lambda (process) (with-current-buffer (process-buffer process) - riece-server-name)) + (list riece-server-name))) riece-process-list)) (if current-prefix-arg (read-string "Message: ") @@ -629,7 +623,7 @@ If prefix argument ARG is non-nil, toggle frozen status." (mapcar (lambda (process) (with-current-buffer (process-buffer process) - riece-server-name)) + (list riece-server-name))) riece-process-list))) (command (key-binding (read-key-sequence diff --git a/lisp/riece-display.el b/lisp/riece-display.el index 8dbea3c..1f80e57 100644 --- a/lisp/riece-display.el +++ b/lisp/riece-display.el @@ -217,6 +217,9 @@ "-"))))) (defun riece-update-buffers () + (if riece-current-channel + (setq riece-channel-buffer (get-buffer (riece-channel-buffer-name + riece-current-channel)))) (run-hooks 'riece-update-buffer-functions) (force-mode-line-update t) (run-hooks 'riece-update-buffers-hook)) @@ -241,9 +244,7 @@ (defun riece-switch-to-channel (identity) (setq riece-last-channel riece-current-channel - riece-current-channel identity - riece-channel-buffer - (get-buffer (riece-channel-buffer-name identity))) + riece-current-channel identity) (run-hooks 'riece-channel-switch-hook)) (defun riece-join-channel (identity) diff --git a/lisp/riece-filter.el b/lisp/riece-filter.el index bf61aa0..088ee15 100644 --- a/lisp/riece-filter.el +++ b/lisp/riece-filter.el @@ -152,14 +152,14 @@ (substring status 0 (1- (length status)))) (message "Connection to \"%s\" closed: %s" server-name (substring status 0 (1- (length status)))))) - (let ((riece-overriding-server-name server-name) - (channels riece-current-channels)) + (let ((channels riece-current-channels)) (while channels (if (and (car channels) (equal (riece-identity-server (car channels)) server-name)) - (setcar channels nil)) - (setq channels (cdr channels)))) + (riece-part-channel (car channels))) + (setq channels (cdr channels))) + (riece-redisplay-buffers)) (riece-close-server-process process) ;; If no server process is available, exit. (unless riece-process-list diff --git a/lisp/riece-identity.el b/lisp/riece-identity.el index 32cc7da..7a08a7a 100644 --- a/lisp/riece-identity.el +++ b/lisp/riece-identity.el @@ -123,7 +123,7 @@ RFC2812, 2.2 \"Character codes\" says: (if process (with-current-buffer (process-buffer process) ,@body) - (error "Server closed.")))) + (error "Server closed")))) (put 'riece-with-identity-buffer 'lisp-indent-function 1) diff --git a/lisp/riece-naming.el b/lisp/riece-naming.el index ce934d2..709abea 100644 --- a/lisp/riece-naming.el +++ b/lisp/riece-naming.el @@ -30,9 +30,9 @@ (require 'riece-display) (defun riece-naming-assert-join (user-name channel-name) - (if (riece-identity-equal-no-server user-name riece-real-nickname) - (riece-join-channel (riece-make-identity channel-name - riece-server-name))) + (when (riece-identity-equal-no-server user-name riece-real-nickname) + (riece-join-channel (riece-make-identity channel-name riece-server-name)) + (riece-update-buffers)) (riece-user-toggle-channel user-name channel-name t) (riece-channel-toggle-user channel-name user-name t)) @@ -41,6 +41,7 @@ (progn (riece-part-channel (riece-make-identity channel-name riece-server-name)) + (riece-update-buffers) (riece-forget-channel channel-name)) (riece-user-toggle-channel user-name channel-name nil) (riece-channel-toggle-user channel-name user-name nil) diff --git a/lisp/riece-server.el b/lisp/riece-server.el index c5a016a..6ca7939 100644 --- a/lisp/riece-server.el +++ b/lisp/riece-server.el @@ -124,7 +124,7 @@ the `riece-server-keyword-map' variable." (if process (with-current-buffer (process-buffer process) ,@body) - (error "Server closed.")))) + (error "Server closed")))) (put 'riece-with-server-buffer 'lisp-indent-function 1)