Implement user option ruby-align-chained-calls
commite2a67bd08ea194da1b338c69c4da6e539782cb14
authorDmitry Gutov <dgutov@yandex.ru>
Fri, 31 Jan 2014 17:13:49 +0000 (31 19:13 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Fri, 31 Jan 2014 17:13:49 +0000 (31 19:13 +0200)
treec559f7d7caf622d491520698926e85387dabb4c5
parentec80e689331728b22f34a797ec06354ac4595b4a
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
lisp/ChangeLog
lisp/progmodes/ruby-mode.el
test/ChangeLog
test/automated/ruby-mode-tests.el
test/indent/ruby.rb