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>
This commit is contained in:
Jakub Narebski 2006-07-13 22:22:14 +02:00 коммит произвёл Junio C Hamano
Родитель 1b3a667461
Коммит 5716e794bf
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

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