Erlang mode in Emacs
Ulf Wiger
etxuwig@REDACTED
Sun Dec 15 23:13:27 CET 2002
On 15 Dec 2002, Luke Gorrie wrote:
>I have a command for aligning the arrows in function heads
>that I've been meaning to send in for years - maybe
>something we can add to the mode and assign a key?
>
>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? (:
/Uffe
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson Telecom AB, ATM Multiservice Networks
More information about the erlang-questions
mailing list