I have no idea why erlang-mode indents that code so poorly but if you put `orelse` on its own line then it's a little better.

```erlang
leap_year(Year) ->
    divisible_by(Year, 400)
        orelse (divisible_by(Year, 4) andalso
                not divisible_by(Year, 100)).
```