aboutsummaryrefslogtreecommitdiffstats
path: root/test/indent/ruby.rb
diff options
context:
space:
mode:
authorDmitry Gutov2014-01-31 19:13:49 +0200
committerDmitry Gutov2014-01-31 19:13:49 +0200
commite2a67bd08ea194da1b338c69c4da6e539782cb14 (patch)
treec559f7d7caf622d491520698926e85387dabb4c5 /test/indent/ruby.rb
parentec80e689331728b22f34a797ec06354ac4595b4a (diff)
downloademacs-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.rb8
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
259foo_bar_tee(1, 2, 3) 259foo_bar_tee(1, 2, 3)
260 .qux 260 .qux.bar
261 .bar 261 .tee
262 262
263foo do 263foo do
264 bar 264 bar
@@ -338,7 +338,7 @@ end
338%^abc^ 338%^abc^
339ddd 339ddd
340 340
341qux = foo ? 341qux = foo.fee ?
342 bar : 342 bar :
343 tee 343 tee
344 344
@@ -348,7 +348,7 @@ zoo.keep.bar!(
348 348
349zoo 349zoo
350 .lose( 350 .lose(
351 q, p) 351 q, p)
352 352
353foo(bar: 353foo(bar:
354 tee) 354 tee)