diff options
| author | Dmitry Gutov | 2014-01-31 19:13:49 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2014-01-31 19:13:49 +0200 |
| commit | e2a67bd08ea194da1b338c69c4da6e539782cb14 (patch) | |
| tree | c559f7d7caf622d491520698926e85387dabb4c5 /test/indent/ruby.rb | |
| parent | ec80e689331728b22f34a797ec06354ac4595b4a (diff) | |
| download | emacs-e2a67bd08ea194da1b338c69c4da6e539782cb14.tar.gz emacs-e2a67bd08ea194da1b338c69c4da6e539782cb14.zip | |
Implement user option ruby-align-chained-calls
* lisp/progmodes/ruby-mode.el (ruby-align-chained-calls): New option.
(ruby-smie-grammar): Make "." right-associative. Make its priority
lower than the ternary and all binary operators.
(ruby-smie-rules): Indent "(" relative to the first non-"."
parent, or the first "." parent at indentation. Use
`ruby-align-chained-calls' for indentation of "." tokens.
* test/automated/ruby-mode-tests.el (ruby-align-chained-calls):
New test.
Fixes: debbugs:16593
Diffstat (limited to 'test/indent/ruby.rb')
| -rw-r--r-- | test/indent/ruby.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb index a0116fef18e..49ed92f8fdc 100644 --- a/test/indent/ruby.rb +++ b/test/indent/ruby.rb | |||
| @@ -257,8 +257,8 @@ foo ^ | |||
| 257 | bar | 257 | bar |
| 258 | 258 | ||
| 259 | foo_bar_tee(1, 2, 3) | 259 | foo_bar_tee(1, 2, 3) |
| 260 | .qux | 260 | .qux.bar |
| 261 | .bar | 261 | .tee |
| 262 | 262 | ||
| 263 | foo do | 263 | foo do |
| 264 | bar | 264 | bar |
| @@ -338,7 +338,7 @@ end | |||
| 338 | %^abc^ | 338 | %^abc^ |
| 339 | ddd | 339 | ddd |
| 340 | 340 | ||
| 341 | qux = foo ? | 341 | qux = foo.fee ? |
| 342 | bar : | 342 | bar : |
| 343 | tee | 343 | tee |
| 344 | 344 | ||
| @@ -348,7 +348,7 @@ zoo.keep.bar!( | |||
| 348 | 348 | ||
| 349 | zoo | 349 | zoo |
| 350 | .lose( | 350 | .lose( |
| 351 | q, p) | 351 | q, p) |
| 352 | 352 | ||
| 353 | foo(bar: | 353 | foo(bar: |
| 354 | tee) | 354 | tee) |