branch: elpa/typst-ts-mode commit f18e189c659009177ae538f07bb07bc5b243802d Author: Valentino Slavkin <vslv...@proton.me> Commit: Valentino Slavkin <vslv...@proton.me>
`typst-ts-compile` now previews only with using with prefix arg --- typst-ts-compile.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/typst-ts-compile.el b/typst-ts-compile.el index 4c417fb3f1..4e20e51f2d 100644 --- a/typst-ts-compile.el +++ b/typst-ts-compile.el @@ -63,12 +63,12 @@ compilation buffer before compilation." (remove-hook 'compilation-finish-functions (typst-ts-compile--compilation-finish-function cur-buffer))))) -(defun typst-ts-compile (&optional arg) +(defun typst-ts-compile (&optional preview) "Compile current typst file. -When use a prefix argument, don't preview the document after compilation. -ARG: prefix argument." +When using a prefix argument or the optional argument PREVIEW, + preview the document after compilation." (interactive "P") - (unless arg + (when preview (add-hook 'compilation-finish-functions (typst-ts-mode-compile-and-preview--compilation-finish-function (current-buffer))))