(riece-command-switch-to-channel-by-number): Fixed. riece-0_0
authorueno <ueno>
Sun, 17 Aug 2003 18:34:07 +0000 (18:34 +0000)
committerueno <ueno>
Sun, 17 Aug 2003 18:34:07 +0000 (18:34 +0000)
lisp/ChangeLog
lisp/riece-commands.el

index 24c3802..5570f09 100644 (file)
@@ -1,3 +1,7 @@
+2003-06-12  Daiki Ueno  <ueno@unixuser.org>
+
+       * riece-commands.el (riece-command-switch-to-channel-by-number): Fixed.
+
 2003-08-17  Daiki Ueno  <ueno@unixuser.org>
 
        * riece-commands.el (riece-command-previous-channel): Skip nil in
index 8b9b99d..94a41aa 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
   (let ((number 1))
     (while (<= number 20)