Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -181,12 +181,12 @@ rmt.o : mofiles/ducttape-lib.o mofiles/pkts.o mofiles/stml2.o mofiles/mutils.o mofiles/mtargs.o mofiles/rmtmod.o : mofiles/apimod.o megatest-fossil-hash.scm : $(SRCFILES) megatest.scm *_records.scm - echo "(define megatest-fossil-hash \"$(MTESTHASH)\")" > megatest-fossil-hash.new - if ! diff -q megatest-fossil-hash.new megatest-fossil-hash.scm ; then echo copying .new to .scm;cp -f megatest-fossil-hash.new megatest-fossil-hash.scm;fi + @echo "(define megatest-fossil-hash \"$(MTESTHASH)\")" > megatest-fossil-hash.new + @if ! diff -q megatest-fossil-hash.new megatest-fossil-hash.scm ; then echo copying .new to .scm;cp -f megatest-fossil-hash.new megatest-fossil-hash.scm;fi $(OFILES) $(GOFILES) : common_records.scm # This having the full list of MOFILES cause everything to be rebuilt every time. # @@ -432,10 +432,28 @@ @grep : Makefile | perl -ne '/^([A-Za-z0-9_-]+):/ && print "$$1\n"' unit : cd tests;make unit + +ALLSCMFILES=$(shell ls *scm|grep -v import) +ALLREINDENT=$(addprefix reindent/,$(ALLSCMFILES)) + +indentreport : reindentall + @for x in $(ALLSCMFILES);do if ! diff -q $$x reindent/$$x > /dev/null;then echo "FAIL $$x";fi;done + +reindentall : $(ALLREINDENT) + echo "ENSURE YOU HAVE THE LINES FROM emacs.config IN YOUR ~/.emacs FILE!" + +reindent/README : + mkdir -p reindent + echo "Indent modified files are put here." > reindent/README + +reindent/%.scm : %.scm reindent/README + cp $< reindent + cd reindent;emacs -batch $< --eval '(indent-region (point-min) (point-max) nil)' -f save-buffer + #====================================================================== # Attic #====================================================================== ADDED emacs.config Index: emacs.config ================================================================== --- /dev/null +++ emacs.config @@ -0,0 +1,13 @@ +;; Indenting module body code at column 0 +(defun scheme-module-indent (state indent-point normal-indent) 0) +(put 'module 'scheme-indent-function 'scheme-module-indent) + +(put 'and-let* 'scheme-indent-function 1) +(put 'parameterize 'scheme-indent-function 1) +(put 'handle-exceptions 'scheme-indent-function 1) +(put 'when 'scheme-indent-function 1) +(put 'unless 'scheme-indent-function 1) +(put 'match 'scheme-indent-function 1) +(put 'let-values 'scheme-indent-function 1) + +