From: Jakub Narebski Date: Thu, 13 Jul 2006 20:22:14 +0000 (+0200) Subject: Display help for Git mode after pressing `h' or `?' in *git-status* X-Git-Tag: v1.4.2-rc1~24 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5716e794bf12ad9740da41d06c94e2771fe9e0ee;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el index 83a845dd9..34c995046 100644 --- a/contrib/emacs/git.el +++ b/contrib/emacs/git.el @@ -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