diff --git a/ship-mate.el b/ship-mate.el index ea9712c..ea28b71 100644 --- a/ship-mate.el +++ b/ship-mate.el @@ -377,7 +377,8 @@ EDIT is passed as-is to all invocations of RECOMPILE." ((ship-mate--command-buffer-p) (let* ((cmd ship-mate--this-command) (history (ship-mate-command--history ship-mate--this-command)) - (compile-history (and history (ring-elements history)))) + (compile-history (and history (ring-elements history))) + (compilation-process-setup-function #'ship-mate-command--reserve)) (with-current-buffer (funcall-interactively recompile edit) diff --git a/test/ship-mate-test.el b/test/ship-mate-test.el index d4703db..49758cf 100644 --- a/test/ship-mate-test.el +++ b/test/ship-mate-test.el @@ -465,6 +465,7 @@ (:mock ship-mate-command--fuzzy-match :return matches) (:mock ship-mate--local-value :return environment) (:mock ship-mate-command--last-command :var last :initial nil) + (:watch compilation-process-setup-function) ship-mate-command--update-history ship-mate-command) @@ -488,6 +489,8 @@ (ship-mate-command--capture (lambda (&rest _) (current-buffer))) + (bydi-was-set-to compilation-process-setup-function #'ship-mate-command--reserve) + (bydi-was-called-with ship-mate-command--update-history '(test "make recompile" t)))))