From 39edfbe1f17ad6e29f58744b6136d998da6eccf9 Mon Sep 17 00:00:00 2001 From: ueno Date: Wed, 16 Jun 2004 22:27:25 +0000 Subject: [PATCH] * riece-commands.el (riece-command-end-of-buffer): New command. * riece.el (riece-dialogue-mode-map): Bind end-of-buffer to Home. (riece-command-map): Bind riece-command-end-of-buffer to Home. --- lisp/ChangeLog | 6 ++++++ lisp/riece-commands.el | 17 ++++++++++++++++- lisp/riece.el | 2 ++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0fda94c..2ddae28 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-06-16 Daiki Ueno + + * riece-commands.el (riece-command-end-of-buffer): New command. + * riece.el (riece-dialogue-mode-map): Bind end-of-buffer to Home. + (riece-command-map): Bind riece-command-end-of-buffer to Home. + 2004-06-15 Daiki Ueno * riece.el (riece-dialogue-mode-map): Bind end-of-buffer to End. diff --git a/lisp/riece-commands.el b/lisp/riece-commands.el index 0e31a64..9348028 100644 --- a/lisp/riece-commands.el +++ b/lisp/riece-commands.el @@ -625,8 +625,23 @@ If prefix argument ARG is non-nil, toggle frozen status." (interactive "sIRC command: ") (riece-send-string (concat command "\r\n"))) +(defun riece-command-beginning-of-buffer () + "Scroll channel buffer to the beginning." + (interactive) + (let (buffer window) + (setq buffer (if riece-channel-buffer-mode + riece-channel-buffer + riece-dialogue-buffer)) + (or (setq window (get-buffer-window buffer)) + (setq window (get-buffer-window riece-dialogue-buffer) + buffer riece-dialogue-buffer)) + (when window + (save-selected-window + (select-window window) + (goto-char (point-min)))))) + (defun riece-command-end-of-buffer () - "Get end of the dialogue buffer." + "Scroll channel buffer to the end." (interactive) (let (buffer window) (setq buffer (if riece-channel-buffer-mode diff --git a/lisp/riece.el b/lisp/riece.el index 93cd56b..373afff 100644 --- a/lisp/riece.el +++ b/lisp/riece.el @@ -151,6 +151,7 @@ If optional argument SAFE is nil, overwrite previous definitions." [backspace] scroll-down [return] scroll-up " " scroll-up + [home] beginning-of-buffer "$" end-of-buffer [end] end-of-buffer "/" riece-command-raw @@ -195,6 +196,7 @@ If optional argument SAFE is nil, overwrite previous definitions." [delete] riece-command-scroll-down [backspace] riece-command-scroll-down " " riece-command-scroll-up + [home] riece-command-beginning-of-buffer "$" riece-command-end-of-buffer [end] riece-command-end-of-buffer ">" riece-command-next-channel -- 1.7.10.4