Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit 42aa16c

Browse files
ve-ntjoachimschmidt557
authored andcommitted
Save buffers before running zig commands
This ensures our source files are in sync before zig reads them, otherwise zig may implicitly compile out-of-date source files.
1 parent b78d03a commit 42aa16c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

zig-mode.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"Use compile command to execute a zig CMD with ARGS if given.
6868
If given a SOURCE, execute the CMD on it."
6969
(let ((cmd-args (if source (cons source args) args)))
70+
(save-some-buffers)
7071
(compilation-start (mapconcat 'shell-quote-argument
7172
`(,zig-zig-bin ,cmd ,@cmd-args) " "))))
7273

0 commit comments

Comments
 (0)