From c7adf5ef28be4b410a0acfb651d0ad68ab1e01f1 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Wed, 19 Dec 2007 18:00:08 +0000 Subject: [PATCH] Emacs mode: Bind "G" to "stg goto" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Organization: Straylight/Edgeware From: Karl Hasselström Signed-off-by: Karl Hasselström Signed-off-by: David Kågedal --- contrib/stgit.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/contrib/stgit.el b/contrib/stgit.el index d371e71..78e9520 100644 --- a/contrib/stgit.el +++ b/contrib/stgit.el @@ -83,6 +83,7 @@ (define-key stgit-mode-map "r" 'stgit-rename) (define-key stgit-mode-map ">" 'stgit-push-next) (define-key stgit-mode-map "<" 'stgit-pop-next) (define-key stgit-mode-map "P" 'stgit-push-or-pop) + (define-key stgit-mode-map "G" 'stgit-goto) (define-key stgit-mode-map "=" 'stgit-show)) (defun stgit-mode () @@ -154,6 +155,14 @@ (defun stgit-push-or-pop () (stgit-run (if applied "pop" "push") patch)) (stgit-refresh))) +(defun stgit-goto () + "Go to the patch on the current line" + (interactive) + (let ((patch (stgit-patch-at-point))) + (stgit-capture-output nil + (stgit-run "goto" patch)) + (stgit-refresh))) + (defun stgit-show () "Show the patch on the current line" (interactive) -- [mdw]