[erlang-questions] Controversial subject of the day: tabs and spaces for indentation

Carsten Bormann cabo@REDACTED
Tue Feb 11 23:51:59 CET 2014

On 11 Feb 2014, at 10:56, Jesper Louis Andersen <jesper.louis.andersen@REDACTED> wrote:

> variable width font

You can get alignment with that with a simple algorithm:
For every sequence of two or more space characters, note the column of the end of the sequence (measured in characters), note the position (in escapement units) of the same column in the previous line, and align to that.
Doesn’t always work perfectly, but except for pathological cases, preserves the meaning of most source codes laboriously aligned on fixed-width terminals.
(Certainly was good enough for my Prolog programs in 1984.  I’m not sure I still have the code that generated the troff input out of the Prolog.)

Now get that code into Emacs :-)

Grüße, Carsten

PS.: Elixir looks so much less like VB when set in Baskerville!  Combine with prettify-symbols-mode...

More information about the erlang-questions mailing list