Display help for Git mode after pressing `h' or `?' in *git-status*

Add bindings for "h" and "?" in git-status-mode to display help about the mode,
including keymap via (describe-function 'git-status-mode), like in PCL-CVS.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Jakub Narebski 2006-07-13 22:22:14 +02:00 committed by Junio C Hamano
parent 1b3a667461
commit 5716e794bf
1 changed files with 7 additions and 0 deletions

View File

@ -943,6 +943,8 @@ and returns the process output as a string."
(let ((map (make-keymap))
(diff-map (make-sparse-keymap)))
(suppress-keymap map)
(define-key map "?" 'git-help)
(define-key map "h" 'git-help)
(define-key map " " 'git-next-file)
(define-key map "a" 'git-add-file)
(define-key map "c" 'git-commit-file)
@ -1012,5 +1014,10 @@ Commands:
(goto-char (point-min)))
(message "%s is not a git working tree." dir)))

(defun git-help ()
"Display help for Git mode."
(interactive)
(describe-function 'git-status-mode))

(provide 'git)
;;; git.el ends here