about summary refs log tree commit diff
path: root/src/rustllvm/ExecutionEngineWrapper.cpp
diff options
context:
space:
mode:
authorMicah Chalmer <micah@micahchalmer.net>2014-02-22 22:24:55 -0500
committerMicah Chalmer <micah@micahchalmer.net>2014-02-22 23:06:46 -0500
commit55b3c1917f6e87e9c0185b9746ca8384b088fbb0 (patch)
tree75e3c9b4661dd251e8360cb91f9e22ebc63b48bd /src/rustllvm/ExecutionEngineWrapper.cpp
parent45008f9b3e455d8d9619238e6a0c1981ffaf2860 (diff)
downloadrust-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/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions