diff options
author | Jakub Narebski <jnareb@gmail.com> | 2006-07-13 22:22:14 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-07-13 21:21:34 -0700 |
commit | 5716e794bf12ad9740da41d06c94e2771fe9e0ee (patch) | |
tree | dd9d1779f6f9da5db3727ab1ff1ff3524780cc40 | |
parent | Wrap long lines in docstrings in contrib/emacs/git.el (diff) | |
download | tgif-5716e794bf12ad9740da41d06c94e2771fe9e0ee.tar.xz |
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>
-rw-r--r-- | contrib/emacs/git.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el index 83a845dd94..34c995046d 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 |