JuliaLang/julia — pull request #9308 by Wilfred (2014-12-11 00:01:16+00:00)
Title: julia-mode.el: Set a maximum lookback for finding enclosing parens/blocks

Fixes #9254.

After further thought, I didn't like my proposed solution of just considering the previous line for indenting. The current approach is much smarter and more desirable -- we try to work out how many enclosing blocks we're in.

I've compromised by setting a maximum lookback for finding enclosing parens (this was the most expensive part) and for finding enclosing blocks (this is cheaper, but still affects performance, so I've set a higher value).

I've also added a few unit tests for indentation.

Let me know what you think, I think this is a big improvement. Sorry it took so long.

cc @JeffBezanson