From e6b1fdaec6129f6391429cee7b79afd9185e5d22 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20K=C3=A5gedal?= Date: Sun, 7 Dec 2008 13:31:57 +0100 Subject: [PATCH] stgit.el: Try to make the point stay on the coalesced patch MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: David Kågedal Signed-off-by: Karl Hasselström --- contrib/stgit.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/contrib/stgit.el b/contrib/stgit.el index d0f19c3..8264481 100644 --- a/contrib/stgit.el +++ b/contrib/stgit.el @@ -193,6 +193,9 @@ Commands: (let ((patchsym (intern patch))) (setq stgit-marked-patches (delq patchsym stgit-marked-patches)))) +(defun stgit-clear-marks () + (setq stgit-marked-patches '())) + (defun stgit-marked-patches () "Return the names of the marked patches." (mapcar 'symbol-name stgit-marked-patches)) @@ -407,7 +410,14 @@ With numeric prefix argument, pop that many patches." (stgit-capture-output nil (apply 'stgit-run "coalesce" "-f" file stgit-patches)) (with-current-buffer log-edit-parent-buffer - (stgit-refresh)))) + (stgit-clear-marks) + ;; Go to first marked patch and stay there + (goto-char (point-min)) + (re-search-forward (concat "^[>+-]\\*") nil t) + (move-to-column goal-column) + (let ((pos (point))) + (stgit-refresh) + (goto-char pos))))) (defun stgit-help () "Display help for the StGit mode." -- 2.11.0