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>
Jakub Narebski committed
Jul 13, 2006 at 22:22 UTC
5716e794bf12ad9740da41d06c94e2771fe9e0ee
1 file changed
+7
contrib/emacs/git.el
+7
@@ -943,6 +943,8 @@ and returns the process output as a string."
943
(let ((map (make-keymap))
944
(diff-map (make-sparse-keymap)))
945
(suppress-keymap map)
946
+ (define-key map "?" 'git-help)
947
+ (define-key map "h" 'git-help)
948
(define-key map " " 'git-next-file)
949
(define-key map "a" 'git-add-file)
950
(define-key map "c" 'git-commit-file)
@@ -1012,5 +1014,10 @@ Commands:
1014
(goto-char (point-min)))
1015
(message "%s is not a git working tree." dir)))
1016
1017
+(defun git-help ()
1018
+ "Display help for Git mode."
1019
+ (interactive)
1020
+ (describe-function 'git-status-mode))
1021
+
1022
(provide 'git)
1023
;;; git.el ends here