chiark / gitweb /
stgit.el: Add stgit-redo as C-c C-_ and C-c C-/
authorGustav Hållberg <gustav@virtutech.com>
Tue, 4 Aug 2009 13:57:05 +0000 (15:57 +0200)
committerGustav Hållberg <gustav@virtutech.com>
Thu, 6 Aug 2009 20:49:08 +0000 (22:49 +0200)
Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
contrib/stgit.el

index 132c19efe51436ad1661c38d5d7c05ae379031d1..31f36d79f199732714587bf51a4fe4db76eba19f 100644 (file)
@@ -718,8 +718,10 @@ (unless stgit-mode-map
             ("G" .        stgit-goto)
             ("=" .        stgit-diff)
             ("D" .        stgit-delete)
-            ([(control ?/)] . stgit-undo)
+            ([?\C-/] .    stgit-undo)
             ("\C-_" .     stgit-undo)
+            ([?\C-c ?\C-/] . stgit-redo)
+            ("\C-c\C-_" . stgit-redo)
             ("B" .        stgit-branch)
             ("t" .        ,toggle-map)
             ("d" .        ,diff-map)
@@ -1392,7 +1394,9 @@ (defun stgit-help ()
 
 (defun stgit-undo (&optional arg)
   "Run stg undo.
-With prefix argument, run it with the --hard flag."
+With prefix argument, run it with the --hard flag.
+
+See also `stgit-redo'."
   (interactive "P")
   (stgit-capture-output nil
     (if arg
@@ -1400,6 +1404,18 @@ (defun stgit-undo (&optional arg)
       (stgit-run "undo")))
   (stgit-reload))
 
+(defun stgit-redo (&optional arg)
+  "Run stg redo.
+With prefix argument, run it with the --hard flag.
+
+See also `stgit-undo'."
+  (interactive "P")
+  (stgit-capture-output nil
+    (if arg
+        (stgit-run "redo" "--hard")
+      (stgit-run "redo")))
+  (stgit-reload))
+
 (defun stgit-refresh (&optional arg)
   "Run stg refresh.
 If the index contains any changes, only refresh from index.