commit c2ef7846314b3e8c70adc3a313cef7da32995f57 from: mtmn date: Fri Aug 28 01:26:30 2026 UTC remove fmt commit - 6b766e6549276590bcec115a32a6a00bc41ead59 commit + c2ef7846314b3e8c70adc3a313cef7da32995f57 blob - 978f0f887355fb0b72979f2de7997002ce5187df blob + f7c8555345e82288b69856537a76e184616c5216 --- README.md +++ README.md @@ -13,7 +13,6 @@ You need Bash, [Landrun](https://github.com/Zouuup/lan or later, and Make. Install `fzf` to search for directories. Without it, enter a path directly. -Install `emacs` to run `make fmt`. ```sh make tui @@ -105,14 +104,10 @@ not allow unrestricted networking. It adds a Wayland s ```sh make build make test -make fmt make install make copy-config ``` -`make fmt` formats Scheme files in place with `emacs` scheme mode. Run it after -you edit Scheme files. It does not change files that are already formatted. - `make install` defaults to `/usr/local`; use `sudo make install` only when your chosen destination requires it. Set `PREFIX`, `DESTDIR`, `BINDIR`, `LIBEXECDIR`, `MANDIR`, or `SCHEME` to blob - e97283066235c2f176a19ce9bd6d6e278182618d (mode 755) blob + /dev/null --- tools/fmt.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -set -eu - -fmt_file() { - file=$1 - emacs --batch \ - --eval "(require 'scheme)" \ - --eval "(setq-default indent-tabs-mode nil)" \ - --eval "(setq lisp-body-indent 2)" \ - --eval "(put 'library 'scheme-indent-function (lambda (&rest _) 1))" \ - --eval "(put 'cond 'scheme-indent-function 0)" \ - --eval "(put 'dynamic-wind 'scheme-indent-function 0)" \ - --eval "(put 'lambda 'scheme-indent-function 'defun)" \ - --eval "(find-file \"$file\")" \ - --eval "(indent-region (point-min) (point-max) nil)" \ - --eval "(save-buffer)" >/dev/null 2>&1 - if head -n1 "$file" | grep -q '^(library'; then - sed -i -E '${/^[[:space:]]*\)+[[:space:]]*$/s/^[[:space:]]*//}' "$file" - fi -} - -for file in "$@"; do - fmt_file "$file" -done