Erlang mode in Emacs

Luke Gorrie luke@REDACTED
Sun Dec 15 23:23:25 CET 2002


Ulf Wiger <etxuwig@REDACTED> writes:

> >Here's the command w/ description:
> >
> >(defun erlang-align-arrows (start end)
> >  "Align arrows (\"->\") in function clauses from START to END.
> >When called interactively, aligns arrows inside the region.
> >
> >Example:
> >
> >sum(L) -> sum(L, 0).
> >sum([H|T], Sum) -> sum(T, Sum + H);
> >sum([], Sum) -> Sum.
> >
> >becomes:
> >
> >sum(L)          -> sum(L, 0).
> >sum([H|T], Sum) -> sum(T, Sum + H);
> >sum([], Sum)    -> Sum."
> 
> Wonderful, Luke! What's kept you?  (:

Well, to be honest, that is a rewrite of the original command, which
was quite grotesquely implemented and had a bug that I couldn't
account for :-)

-Luke




More information about the erlang-questions mailing list