* riece-naming.el (riece-naming-assert-join): Call
authorueno <ueno>
Thu, 12 Jun 2003 10:10:52 +0000 (10:10 +0000)
committerueno <ueno>
Thu, 12 Jun 2003 10:10:52 +0000 (10:10 +0000)
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.

lisp/ChangeLog
lisp/riece-commands.el
lisp/riece-display.el
lisp/riece-filter.el
lisp/riece-identity.el
lisp/riece-naming.el
lisp/riece-server.el

index 189d9af..d45070d 100644 (file)
@@ -1,5 +1,22 @@
 2003-06-12  Daiki Ueno  <ueno@unixuser.org>
 
+       * 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  <ueno@unixuser.org>
+
        * riece-doctor.el: Don't require 'doctor; autoload doctor-mode and
        doctor-read-print.
 
index 4e2776b..ff64843 100644 (file)
      (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
index 8dbea3c..1f80e57 100644 (file)
              "-")))))
 
 (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))
 
 (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)
index bf61aa0..088ee15 100644 (file)
                   (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
index 32cc7da..7a08a7a 100644 (file)
@@ -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)
 
index ce934d2..709abea 100644 (file)
@@ -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)
index c5a016a..6ca7939 100644 (file)
@@ -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)