summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2011-07-15 17:13:00 +0200
committerLars Magne Ingebrigtsen <larsi@gnus.org>2011-07-15 17:13:00 +0200
commit06789f9706db4c8fc335619c28daeda2c1e75e48 (patch)
treee472981ce4a45213b07b5b2d5f6e6b6f788285ac
parentc39da69053fc7bd17a3859dc56a9cd0991961999 (diff)
downloademacs-06789f9706db4c8fc335619c28daeda2c1e75e48.tar.gz
Add new command `Info-beginning-of-buffer' to allow announcing `b'
* info.el (Info-beginning-of-buffer): New command. (Info-mode-map): Use it instead of `beginning-of-buffer' to allow announcing `b' as the key (bug#8325).
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/info.el12
2 files changed, 13 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1ec6c18e6a9..47dff71bdff 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * info.el (Info-beginning-of-buffer): New command.
+ (Info-mode-map): Use it instead of `beginning-of-buffer' to allow
+ announcing `b' as the key (bug#8325).
+
* emacs-lisp/cl-macs.el (declare): Doc string fix-up.
* international/mule-cmds.el
diff --git a/lisp/info.el b/lisp/info.el
index cbdc8cc7ab3..638227dd30c 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -2789,6 +2789,11 @@ N is the digit argument used to invoke this command."
(goto-char (point-max)))))
(t (error "No previous nodes"))))
+(defun Info-beginning-of-buffer ()
+ "Go to the beginnning of the buffer."
+ (interactive)
+ (goto-char (point-min)))
+
(defun Info-scroll-up ()
"Scroll one screenful forward in Info, considering all nodes as one sequence.
Once you scroll far enough in a node that its menu appears on the screen
@@ -3650,7 +3655,7 @@ If FORK is non-nil, it is passed to `Info-goto-node'."
(defvar Info-mode-map
(let ((map (make-keymap)))
(suppress-keymap map)
- (define-key map "." 'beginning-of-buffer)
+ (define-key map "." 'Info-beginning-of-buffer)
(define-key map " " 'Info-scroll-up)
(define-key map "\C-m" 'Info-follow-nearest-node)
(define-key map "\t" 'Info-next-reference)
@@ -3671,7 +3676,8 @@ If FORK is non-nil, it is passed to `Info-goto-node'."
(define-key map "[" 'Info-backward-node)
(define-key map "<" 'Info-top-node)
(define-key map ">" 'Info-final-node)
- (define-key map "b" 'beginning-of-buffer)
+ (define-key map "b" 'Info-beginning-of-buffer)
+ (put 'Info-beginning-of-buffer :advertised-binding "b")
(define-key map "d" 'Info-directory)
(define-key map "e" 'Info-edit)
(define-key map "f" 'Info-follow-reference)
@@ -3931,7 +3937,7 @@ Moving within a node:
\\[Info-scroll-down] Normally, scroll backward. If the beginning of the buffer is
already visible, try to go to the previous menu entry, or up
if there is none.
-\\[beginning-of-buffer] Go to beginning of node.
+\\[Info-beginning-of-buffer] Go to beginning of node.
Advanced commands:
\\[Info-search] Search through this Info file for specified regexp,