diff options
-rw-r--r-- | lisp/km-snakemake.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/km-snakemake.el b/lisp/km-snakemake.el index 64c7221..013d21a 100644 --- a/lisp/km-snakemake.el +++ b/lisp/km-snakemake.el @@ -30,13 +30,14 @@ (interactive) (unless (buffer-live-p compilation-last-buffer) (user-error "No previous compile command found")) - (with-current-buffer compilation-last-buffer - (let ((command (car compilation-arguments))) - (if (string-prefix-p snakemake-program command) - (setf (car compilation-arguments) - (replace-regexp-in-string " --dryrun" "" command)) - (user-error "Last compile was not with %s" snakemake-program))) - (recompile))) + (let ((program snakemake-program)) + (with-current-buffer compilation-last-buffer + (let ((command (car compilation-arguments))) + (if (string-prefix-p program command) + (setf (car compilation-arguments) + (replace-regexp-in-string " --dryrun" "" command)) + (user-error "Last compile was not with %s" program))) + (recompile)))) (provide 'km-snakemake) ;;; km-snakemake.el ends here |