From 4d29d7b7b6a2bbda78acb669905a9b46bef88cfac3daac2f769482760a58711d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Bj=C3=B6rnstam?= Date: Fri, 23 Oct 2026 11:59:09 +0200 Subject: [PATCH] don't rememeber --- _02_.Writing-programs.sz | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_02_.Writing-programs.sz b/_02_.Writing-programs.sz index 2c40622..ee04eb0 100644 --- a/_02_.Writing-programs.sz +++ b/_02_.Writing-programs.sz @@ -314,7 +314,7 @@ Because @code{bjo} automatically detects the project root by walking upward unti In @code{bjo run . one two}, the dot specifies the project itself. Any arguments following the target are forwarded directly to the program's @code{main} function, binding @code{args} to @code{[one two]}. You can also point @code{bjo run} at a specific test file, such as @code{bjo run tests/deck-test.bjo}; the file will be compiled and linked against the project's declared packages. -@code{bjo fmt} indents every line the way @code{indent-region} does in Emacs's @code{bjo-mode}, so the two always agree. It also moves a line of closing brackets up onto the line before it, Lisp style, removes trailing whitespace, and turns three or more blank lines into two. Line breaks are otherwise kept, and the lines of a string are never touched. Since it only moves text to the right, it names every line it makes wider than 100 columns, so that you can break it by hand. With no arguments it lays out every file under @code{src/}, @code{tests/} and @code{benches/}; you can also name files or directories. @code{bjo fmt --check} changes nothing, names the files that are not laid out, and fails if there are any, which is what a CI job wants. @code{bjo fmt -} reads standard input and writes the result to standard output, for an editor. A file whose brackets do not pair up, or that has a string that does not end, is refused with the line where it goes wrong. +@code{bjo fmt} indents every line the way @code{indent-region} does in Emacs's @code{bjo-mode}, so the two always agree. It also moves a line of closing brackets up onto the line before it, Lisp style, removes trailing whitespace, turns tabs into spaces (or @code{\t} in a string), and turns three or more blank lines into two. It adds a few line breaks: a @code{def}'s failure part (@code{:leave}, @code{:leave-with}, @code{:default}, @code{:propagate}) starts its own line, so does each form of a @code{cond}, @code{begin}, @code{seq} or @code{try} that spans lines, and so does each binding of a @code{let} whose bindings span lines. Line breaks are otherwise kept, and the lines of a string are never touched. Since it only moves text to the right, it names every line it makes wider than 102 columns, so that you can break it by hand. With no arguments it lays out every file under @code{src/}, @code{tests/} and @code{benches/}; you can also name files or directories. @code{bjo fmt --check} changes nothing, names the files that are not laid out, and fails if there are any, which is what a CI job wants. @code{bjo fmt --diff} changes nothing either, and prints what it would change as a unified diff, which @code{git apply -p0} or @code{patch -p0} takes. @code{bjo fmt -} reads standard input and writes the result to standard output, for an editor. A file whose brackets do not pair up, or that has a string that does not end, is refused with the line where it goes wrong. @subsubsection{Modules only the package may use}