3

As I was going through learnyousomeerlang I came across code formatted like so:

if X > Y -> a()
 ; true  -> b()
end

Presently As close as I can get is:

if X > Y ->
    a()
        ;
->

I am assuming this is due to the electric > and electric ;. In Erlang.el. I'm just wondering If anyone happens to know of a useful criteria for the electric-semicolon and such that would make this possible.

Lindydancer
  • 6,095
  • 1
  • 13
  • 25

1 Answers1

2

It's not only about the electric semicolon; it's also the indentation functions themselves that indent the semicolon too far. The indentation level is calculated in the function erlang-calculate-stack-indent. It would be nice if this behaviour were configurable, a bit like how you can select different styles in cc-mode, but it currently isn't.

legoscia
  • 6,012
  • 29
  • 54