[plt-scheme] project
When I have a Scheme program about thousand LOC opened in definition
window and "reindent all", it takes quite a few seconds for DrScheme to
indent, and DrScheme stops to react during this time. I haven't checked
the code, but it seems the current code takes O(loc^2) time to "reindent
all", although it can be done in O(loc) time.
> The strategy is very simple: look backwards for '{'s. Count them.
> Insert twice that number of spaces at the beginning of the line.
> Unless the line's first character is '}', in which case, insert two
> fewer spaces.
Chongkai