aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGene Pasquet <dev@etenil.net>2026-04-18 05:59:07 +0100
committerGene Pasquet <dev@etenil.net>2026-04-18 05:59:07 +0100
commit84f251ee6e829d33a4f29aa4043924023a378724 (patch)
treeab03d18fa192303bf2e1758743ac16c11d9da87f /Makefile
parentc2085be2dd2a0cb3da05991847e35080915e547e (diff)
Re-format
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index aa8bb3c..1577aa8 100644
--- a/Makefile
+++ b/Makefile
@@ -37,7 +37,20 @@ bin/%.o: %.scm | bin
csc -c -J -unit downstroke.$* $*.scm -o bin/$*.o -I bin
@if [ -f downstroke.$*.import.scm ]; then mv downstroke.$*.import.scm bin/; fi
-.PHONY: clean test engine demos filter
+.PHONY: clean test engine demos filter format
+
+# Reformat every tracked .scm file with Emacs `indent-region` under the user's
+# real init (so geiser-chicken / scheme-mode rules apply consistently).
+# Override EMACS_INIT_DIR / EMACS_SUBSTRATE_DIR if your config lives elsewhere.
+EMACS_INIT_DIR ?= $(HOME)/.emacs-perso
+EMACS_SUBSTRATE_DIR ?= $(EMACS_INIT_DIR)/emacs-substrate
+format:
+ @emacs --batch \
+ --init-directory=$(EMACS_INIT_DIR) \
+ --eval "(add-to-list 'load-path \"$(EMACS_SUBSTRATE_DIR)/\")" \
+ -l $(EMACS_INIT_DIR)/init.el \
+ -l format.el \
+ --eval "(downstroke-format-tracked-scm-files)"
clean:
rm -rf bin downstroke/