* riece-commands.el (riece-command-end-of-buffer): New command.
authorueno <ueno>
Wed, 16 Jun 2004 22:27:25 +0000 (22:27 +0000)
committerueno <ueno>
Wed, 16 Jun 2004 22:27:25 +0000 (22:27 +0000)
* 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
lisp/riece-commands.el
lisp/riece.el

index 0fda94c..2ddae28 100644 (file)
@@ -1,3 +1,9 @@
+2004-06-16  Daiki Ueno  <ueno@unixuser.org>
+
+       * 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  <ueno@unixuser.org>
 
        * riece.el (riece-dialogue-mode-map): Bind end-of-buffer to End.
index 0e31a64..9348028 100644 (file)
@@ -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
index 93cd56b..373afff 100644 (file)
@@ -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