diff options
| author | Micah Chalmer <micah@micahchalmer.net> | 2014-02-22 22:24:55 -0500 |
|---|---|---|
| committer | Micah Chalmer <micah@micahchalmer.net> | 2014-02-22 23:06:46 -0500 |
| commit | 55b3c1917f6e87e9c0185b9746ca8384b088fbb0 (patch) | |
| tree | 75e3c9b4661dd251e8360cb91f9e22ebc63b48bd /src/rustllvm | |
| parent | 45008f9b3e455d8d9619238e6a0c1981ffaf2860 (diff) | |
| download | rust-55b3c1917f6e87e9c0185b9746ca8384b088fbb0.tar.gz rust-55b3c1917f6e87e9c0185b9746ca8384b088fbb0.zip | |
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...
})
Diffstat (limited to 'src/rustllvm')
0 files changed, 0 insertions, 0 deletions
