[MLton] Emacs mode for editing ML Basis files
Thu, 4 Aug 2005 13:49:12 -0700
> > (4) (warning/warning) Error caught in `font-lock-pre-idle-hook': (error No such face font-lock-module-def-face)
> The face is defined by sml-mode, which is required at the beginning
> of esml-mlb-mode.el. I fixed this by duplicating a face definition
> from sml-mode.
That fixed it for me. Thanks. The problem is probably that I use a
really old sml-mode.
> > Also, it seems to have trouble indenting after the following line
> > basis B = bas end
> I can't reproduce the problem. Seems to work (as intended) on my
> machine (on both GNU Emacs and XEmacs). Could this be caused by
> the missing face?
Aha. I found the problem. I had my own (unused) case macro sitting
around from over a decade ago when I was trying to make Emacs Lisp
look like Scheme :-). Needless to say, that macro conflicted with the
one you loaded from cl. Anyways, deleting that made everything work
great. I really like the mode, and used it to re-indent all the MLton
MLBs. I found one case it doesn't handle well -- when an annotation
is all on one line, as in
ann "warnUnused true" in a.sml end
> I uploaded the fixed version as esml-mlb-mode.el.v2. Feel free to
> rename the new one and delete the original if you can. The Wiki
> interface doesn't let me do those operations (for a good reason).
I think it's worth putting this code in the SVN, for easier future
editing, so you don't have to muck with the wiki. It's at
doc/esml-mlb-mode.el, and can be accessed with ViewCVS at
I also updated the wiki to point there.
BTW, Vesa, I've been meaning to send you a MLton t-shirt in
appreciation of your past (and hopefully future!) contributions to the
MLton project. If you'll send my your address and size (M, L, XL),
I'll drop one in the mail.