From 84f251ee6e829d33a4f29aa4043924023a378724 Mon Sep 17 00:00:00 2001 From: Gene Pasquet Date: Sat, 18 Apr 2026 05:59:07 +0100 Subject: Re-format --- Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'Makefile') 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/ -- cgit v1.2.3