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.

1 Answer 1

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.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.