Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emacs: indent relative to enclosing block
This changes the indent to calculate positions relative to the enclosing block (or braced/parenthesized expression), rather than by an absolute nesting level within the whole file. This allows things like this to work: let x = match expr { Pattern => ... } With the old method, only one level of nesting would be added within the match braces, so "Pattern" would have ended up aligned with the match. The other change is that multiple parens/braces on the same line only increase the indent once. This is a very common case for passing closures/procs. The absolute nesting method would do this: spawn(proc() { // Indented out two indent levels... }) whereas the code in this commit does this: spawn(proc() { // Indented out only one level... })
- Loading branch information
1 parent
45008f9
commit 55b3c19
Showing
2 changed files
with
127 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters