[MLton] Emacs mode for editing ML Basis files

Vesa Karvonen vesa.karvonen@cs.helsinki.fi
Mon, 8 Aug 2005 06:53:51 +0300


Quoting Stephen Weeks <sweeks@sweeks.com>:
[...]
> Yes.  I guess what I wanted is impossible, since the computed
> indentation would depend on the current indentation -- i.e. if a
> comment is in column 0, then keep it there, otherwise indent as normal
> code.  The reason I wanted this is because there are two different
> kinds of comments -- those that are for documentation and those that
> are temporarily turning off some code.  For the latter, I usually
> start the comment in column zero, while for the former I indent as
> code.  Who knows why?

(My guess would be that you want the comments starting at column 0 to
stick out. That's quite reasonable, IMO.)

It occured to me that there is probably no need to completely give
up the indentation style. It should be quite possible to support two
(or any number of) different kinds of comments as long as they can
be distinguished from each other. For example, you could use `(*/' to
start and `/*)' to end the special comments. The indentation rules
could be customized to indent the special comments to column 0. The
rule should even be quite simple: if line starts with `(*/', indent
to column 0.

BTW, I probably won't have proper time to rewrite the indentation
algorithm until thursday.

-Vesa Karvonen