From 5672e25f5a255a0f8a8f2628fc5b1b00304fe5e7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 27 May 2010 22:54:37 -0400 Subject: [PATCH] - --- makefile.pkg | 6 +++--- sml-mode.el | 3 ++- testcases.sml | 15 ++++++++++----- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/makefile.pkg b/makefile.pkg index 6f4d61ca08f..c879e7d8142 100644 --- a/makefile.pkg +++ b/makefile.pkg @@ -7,9 +7,9 @@ TESTCASE = testcases.sml test: $(RM) $(TESTCASE).new - $(EMACS) \ - --eval '(add-to-list (quote load-path) ".")' \ - -batch $(TESTCASE) \ + $(EMACS) --batch \ + --eval "(load \"$$(pwd)/sml-mode-startup\")" \ + $(TESTCASE) \ --eval '(indent-region (point-min) (point-max) nil)' \ --eval '(write-region (point-min) (point-max) "$(TESTCASE).new")' diff -u -B $(TESTCASE) $(TESTCASE).new diff --git a/sml-mode.el b/sml-mode.el index 2bf66318885..06d677fed83 100644 --- a/sml-mode.el +++ b/sml-mode.el @@ -450,7 +450,8 @@ Regexp match data 0 points to the chars." ((t . ",") . -2) ((t . ";") . -2) ("(" 2 nil) - ("local" 2) + ("local" 4) + ("let" 2) ;; FIXME: Maybe it would be handy to be able to specify different ;; indentation after local's "in" than after let's "in", but currently ;; SMIE doesn't allow us to do that. diff --git a/testcases.sml b/testcases.sml index 2bc4b73d6f2..21305f8a095 100644 --- a/testcases.sml +++ b/testcases.sml @@ -2,16 +2,21 @@ (let val a = 1 val b = 2 val c = 3 - in 1 + in + let + val x = 3 + in + x + end end); (* From "Christopher Dutchyn" *) (case foo of - (* FIXME: The line gets unindented by 2 every time you hit TAB :-( *) - | BAR => baz) + (* FIXME: The line gets unindented by 2 every time you hit TAB :-( *) + | BAR => baz) -(* sml-mode here treats the second `=' as an equal op because it assumes - * that the first is the definitional equal for the structure. FIXME! *) +(* sml-mode here treats the second `=' as an equal op because it + * thinks it's seeing something like "... type t = (s.t = ...)". FIXME! *) functor foo (structure s : S) where type t = s.t = struct val bar = 0 -- 2.11.4.GIT