From 0663524d44cf6256c812a186feca2e9b4d8d1aa7 Mon Sep 17 00:00:00 2001 Message-Id: <0663524d44cf6256c812a186feca2e9b4d8d1aa7.1747269578.git.mdw@distorted.org.uk> From: Mark Wooding Date: Wed, 19 Dec 2007 18:00:07 +0000 Subject: [PATCH] Emacs mode: Show keybindings when user presses "h" or "?" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Organization: Straylight/Edgeware 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 file changed, 7 insertions(+) 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 @@ (defvar stgit-mode-map nil (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 @@ (defun stgit-show () (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)) -- [mdw]