aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2006-07-13 22:22:14 +0200
committerJunio C Hamano <junkio@cox.net>2006-07-13 21:21:34 -0700
commit5716e794bf12ad9740da41d06c94e2771fe9e0ee (patch)
treedd9d1779f6f9da5db3727ab1ff1ff3524780cc40 /contrib
parent1b3a667461c7b85068d38eb50fa60529959855fb (diff)
downloadgit-5716e794bf12ad9740da41d06c94e2771fe9e0ee.tar.gz
git-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>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/emacs/git.el7
1 files changed, 7 insertions, 0 deletions
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