[MLton-user] SML IDE/editor

Ian Zimmerman itz@buug.org
29 Dec 2004 19:10:26 -0800


Alexandre> Emacs - I didn't like it's approach... 

This may be as good a time as any to re-plug my own SML mode for Emacs.

Unlike the widespread sml-mode.el it doesn't try to indent code based on
ML syntax.  I gradually got sceptical about this approach after writing
the initial indentation support for caml mode and watching it bloat
insanely as the language added new features.  Also, any such attempts
that I know of impose a particular coding style, or at best a choice
among a limited set of styles, which I now oppose.

Instead my mode is based on a generic package which provides manual
bindable commands for common indentation operations (example: indent the
current line under the n-th occurrence of a particular character in the
previous non-blank line).  I found I liked this approach so much I now
even use it with languages that are simple enough that a workable
automatic indentation mode exists (Perl, shell script).

RMS has expressed interest in this generic manual indentation code, and
it may end up in the next major Emacs release.  Or it may not.

It must be said that a large part of my code (just like the other sml-mode)
deals with interacting with a SML toplevel, and so is wasted with MLton
since it doesn't have a toplevel (yet).

It can be found here:

http://primate.net/~itz/mindent.tar

-- 
"It's not true or not."  A reality show producer (real quote)