From: David Kågedal Date: Fri, 14 Dec 2007 10:56:28 GMT Subject: [StGit PATCH 02/17] Emacs mode: Show keybindings when user presses "h" or "?" Message-ID: <20071214105548.18066.10999.stgit@krank> In-Reply-To: <20071214105238.18066.23281.stgit@krank> From: Karl Hasselström These are the same keys the git emacs mode uses. Signed-off-by: Karl Hasselström Signed-off-by: David Kågedal --- contrib/stgit.el | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/contrib/stgit.el b/contrib/stgit.el index 1bdc0a5..09dec8b 100644 --- a/contrib/stgit.el +++ b/contrib/stgit.el @@ -65,6 +65,8 @@ Argument DIR is the repository path." (unless stgit-mode-map (setq stgit-mode-map (make-keymap)) (suppress-keymap stgit-mode-map) + (define-key stgit-mode-map "?" 'stgit-help) + (define-key stgit-mode-map "h" 'stgit-help) (define-key stgit-mode-map "g" 'stgit-refresh) (define-key stgit-mode-map "r" 'stgit-rename) (define-key stgit-mode-map ">" 'stgit-push-next) @@ -139,3 +141,8 @@ Commands: (with-current-buffer standard-output (goto-char (point-min)) (diff-mode)))) + +(defun stgit-help () + "Display help for the StGit mode." + (interactive) + (describe-function 'stgit-mode))