X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/c20b20a50d7111ccb2d9cf1624823656a2c0a312..655a39775cad71e4184563c24771306b34b4a470:/contrib/stgit.el diff --git a/contrib/stgit.el b/contrib/stgit.el index 7ab17a9..4482e67 100644 --- a/contrib/stgit.el +++ b/contrib/stgit.el @@ -1499,7 +1499,9 @@ If ONLY-PATCHES is not nil, exclude index and work tree." (stgit-reload)) (defun stgit-goto () - "Go to the patch on the current line." + "Go to the patch on the current line. + +Pops or pushes patches to make this patch topmost." (interactive) (stgit-assert-mode) (let ((patchsym (stgit-patch-name-at-point t))) @@ -1701,7 +1703,8 @@ file ended up. You can then jump to the file with \ (set (make-local-variable 'stgit-edit-patchsym) patchsym) (setq default-directory dir) (let ((standard-output edit-buf)) - (stgit-run-silent "edit" "--save-template=-" patchsym)))) + (save-excursion + (stgit-run-silent "edit" "--save-template=-" patchsym))))) (defun stgit-confirm-edit () (interactive) @@ -1889,8 +1892,9 @@ deepest patch had before the squash." (set (make-local-variable 'stgit-patchsyms) sorted-patchsyms) (setq default-directory dir) (let ((result (let ((standard-output edit-buf)) - (apply 'stgit-run-silent "squash" - "--save-template=-" sorted-patchsyms)))) + (save-excursion + (apply 'stgit-run-silent "squash" + "--save-template=-" sorted-patchsyms))))) ;; stg squash may have reordered the patches or caused conflicts (with-current-buffer stgit-buffer