From: ueno Date: Sun, 26 Oct 2003 01:44:39 +0000 (+0000) Subject: (riece-command-user-list-scroll-down): Rename X-Git-Tag: riece-0_1_6~16 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=855ad232de465fc582491cd561ad3f08ee22fc7c;p=elisp%2Friece.git (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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 33e09b4..f164562 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2003-10-26 Daiki Ueno + + * 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 * riece-rdcc.el: Bind temporary-file-directory. diff --git a/lisp/riece-commands.el b/lisp/riece-commands.el index 6bc20a9..9a52c04 100644 --- a/lisp/riece-commands.el +++ b/lisp/riece-commands.el @@ -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." diff --git a/lisp/riece.el b/lisp/riece.el index 6c07a16..aff13b9 100644 --- a/lisp/riece.el +++ b/lisp/riece.el @@ -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