diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2013-12-20 07:20:33 +0200 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2013-12-20 07:20:33 +0200 |
commit | b520f210b12911b747cd7cd725c310bef4790a48 (patch) | |
tree | 77e79dd61f417764f4e32a0baa2c8a35548b35bc /test/indent | |
parent | 26b75b456e536c1fb2d3979e07e82455b2d9c1ca (diff) | |
download | emacs-b520f210b12911b747cd7cd725c310bef4790a48.tar.gz |
* lisp/progmodes/ruby-mode.el (ruby-align-to-stmt-keywords): New
option.
(ruby-smie--indent-to-stmt-p): Use it.
(ruby-smie-rules): Revert the logic in the handling of `when'.
Expand the `begin' clause to handle `ruby-align-to-stmt-keywords'.
(ruby-deep-arglist, ruby-deep-indent-paren)
(ruby-deep-indent-paren-style): Update docstrings to note that the
vars don't have any effect with SMIE.
* test/automated/ruby-mode-tests.el: Add tests for
`ruby-align-to-stmt-keywords'.
* test/indent/ruby.rb: Update examples to reflect the lack of change in
default indentation of `begin' blocks.
Fixes: debbugs:16182
Diffstat (limited to 'test/indent')
-rw-r--r-- | test/indent/ruby.rb | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb index 1993c29efb3..7a1a225834d 100644 --- a/test/indent/ruby.rb +++ b/test/indent/ruby.rb @@ -114,17 +114,17 @@ def test2 (arg) puts "there" end - case a - when "a" - 6 - # Support for this syntax was removed in Ruby 1.9, so we - # probably don't need to handle it either. - # when "b" : - # 7 - # when "c" : 2 - when "d" then 4 - else 5 - end + b = case a + when "a" + 6 + # Support for this syntax was removed in Ruby 1.9, so we + # probably don't need to handle it either. + # when "b" : + # 7 + # when "c" : 2 + when "d" then 4 + else 5 + end end # Some Cucumber code: @@ -321,18 +321,13 @@ end foo | bar -foo || - begin - bar - end - def qux foo ||= begin - bar - tee - rescue - oomph - end + bar + tee + rescue + oomph + end end %^abc^ |