Skip to content

Commit

Permalink
Display help for Git mode after pressing h' or ?' in *git-status*
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jakub Narebski authored and Junio C Hamano committed Jul 14, 2006
1 parent 1b3a667 commit 5716e79
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions contrib/emacs/git.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

0 comments on commit 5716e79

Please sign in to comment.