(riece-command-user-list-scroll-down): Rename
authorueno <ueno>
Sun, 26 Oct 2003 01:44:39 +0000 (01:44 +0000)
committerueno <ueno>
Sun, 26 Oct 2003 01:44:39 +0000 (01:44 +0000)
from riece-command-nick-scroll-down.
(riece-command-user-list-scroll-up): Rename from
riece-command-nick-scroll-up.
(riece-command-scroll-down): Check if riece-current-channel is bound.
(riece-command-scroll-up): Ditto.

lisp/ChangeLog
lisp/riece-commands.el
lisp/riece.el

index 33e09b4..f164562 100644 (file)
@@ -1,3 +1,12 @@
+2003-10-26  Daiki Ueno  <ueno@unixuser.org>
+
+       * riece-commands.el (riece-command-user-list-scroll-down): Rename
+       from riece-command-nick-scroll-down.
+       (riece-command-user-list-scroll-up): Rename from
+       riece-command-nick-scroll-up.
+       (riece-command-scroll-down): Check if riece-current-channel is bound.
+       (riece-command-scroll-up): Ditto.
+
 2003-10-25  Daiki Ueno  <ueno@unixuser.org>
 
        * riece-rdcc.el: Bind temporary-file-directory.
index 6bc20a9..9a52c04 100644 (file)
@@ -486,48 +486,50 @@ the layout to the selected layout-name."
 (defun riece-command-scroll-down (lines)
   "Scroll LINES down dialogue buffer from command buffer."
   (interactive "P")
-  (let ((other-window-scroll-buffer
-        (if riece-channel-buffer-mode
-            riece-channel-buffer
-          riece-dialogue-buffer)))
-    (when (get-buffer-window other-window-scroll-buffer)
-      (condition-case nil
-         (scroll-other-window-down lines)
-       (beginning-of-buffer
-        (message "Beginning of buffer"))))))
+  (let ((buffer (if (and riece-channel-buffer-mode
+                        riece-current-channel)
+                   riece-channel-buffer
+                 riece-dialogue-buffer)))
+    (if (get-buffer-window buffer)
+       (condition-case nil
+           (let ((other-window-scroll-buffer buffer))
+             (scroll-other-window-down lines))
+         (beginning-of-buffer
+          (message "Beginning of buffer"))))))
 
 (defun riece-command-scroll-up (lines)
   "Scroll LINES up dialogue buffer from command buffer."
   (interactive "P")
-  (let* ((other-window-scroll-buffer
-         (if riece-channel-buffer-mode
-             riece-channel-buffer
-           riece-dialogue-buffer)))
-    (when (get-buffer-window other-window-scroll-buffer)
-      (condition-case nil
-         (scroll-other-window lines)
-       (end-of-buffer
-        (message "End of buffer"))))))
-
-(defun riece-command-nick-scroll-down (lines)
-  "Scroll LINES down nick buffer from command buffer."
+  (let ((buffer (if (and riece-channel-buffer-mode
+                        riece-current-channel)
+                   riece-channel-buffer
+                 riece-dialogue-buffer)))
+    (if (get-buffer-window buffer)
+       (condition-case nil
+           (let ((other-window-scroll-buffer buffer))
+             (scroll-other-window lines))
+         (end-of-buffer
+          (message "End of buffer"))))))
+
+(defun riece-command-user-list-scroll-down (lines)
+  "Scroll LINES down user list buffer from command buffer."
   (interactive "P")
-  (let ((other-window-scroll-buffer riece-user-list-buffer))
-    (when (get-buffer-window other-window-scroll-buffer)
+  (if (get-buffer-window riece-user-list-buffer)
       (condition-case nil
-         (scroll-other-window-down lines)
+         (let ((other-window-scroll-buffer riece-user-list-buffer))
+           (scroll-other-window-down lines))
        (beginning-of-buffer
-        (message "Beginning of buffer"))))))
+        (message "Beginning of buffer")))))
 
-(defun riece-command-nick-scroll-up (lines)
-  "Scroll LINES up nick buffer from command buffer."
+(defun riece-command-user-list-scroll-up (lines)
+  "Scroll LINES up user list buffer from command buffer."
   (interactive "P")
-  (let* ((other-window-scroll-buffer riece-user-list-buffer))
-    (when (get-buffer-window other-window-scroll-buffer)
+  (if (get-buffer-window riece-user-list-buffer)
       (condition-case nil
-         (scroll-other-window lines)
+         (let ((other-window-scroll-buffer riece-user-list-buffer))
+           (scroll-other-window lines))
        (end-of-buffer
-        (message "End of buffer"))))))
+        (message "End of buffer")))))
 
 (defun riece-command-toggle-away (&optional message)
   "Mark yourself as being away."
index 6c07a16..aff13b9 100644 (file)
@@ -206,10 +206,10 @@ If optional argument SAFE is nil, overwrite previous definitions."
     "o" riece-command-set-operators
     "v" riece-command-set-voices
     "f" riece-command-finger
-    " " riece-command-nick-scroll-up
-    "\177" riece-command-nick-scroll-down
-    [delete] riece-command-nick-scroll-down
-    [backspace] riece-command-nick-scroll-down
+    " " riece-command-user-list-scroll-up
+    "\177" riece-command-user-list-scroll-down
+    [delete] riece-command-user-list-scroll-down
+    [backspace] riece-command-user-list-scroll-down
     "c" riece-command-select-command-buffer)
 
   (riece-define-keys riece-channel-list-mode-map