diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2013-10-22 02:25:59 +0400 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2013-10-22 02:25:59 +0400 |
commit | 18cacc392d076dfd78b58e842116c0c578aaf3c7 (patch) | |
tree | 49c2ef2ee1f7d002025ecc5ed9364ac1271a0c44 /test/indent | |
parent | 1257317a7c3d4052a6c43f2774cd0a6c6057d420 (diff) | |
download | emacs-18cacc392d076dfd78b58e842116c0c578aaf3c7.tar.gz |
* lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Remove outdated
TODO. Add "." after " @ ".
(ruby-smie--at-dot-call): New function. Checks if point at method
call with explicit target.
(ruby-smie--forward-token, ruby-smie--backward-token): Prepend "."
to the method name tokens when it precedes them.
(ruby-smie--backward-id, ruby-smie--forward-id): Remove.
(ruby-smie-rules): Add rule for indentation before and after "."
token.
Diffstat (limited to 'test/indent')
-rw-r--r-- | test/indent/ruby.rb | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb index c9ec8bd3723..5c47eea0baf 100644 --- a/test/indent/ruby.rb +++ b/test/indent/ruby.rb @@ -189,15 +189,16 @@ end foo + bar +foo_bar_tee(1, 2, 3) + .qux + .bar + # Examples below still fail with `ruby-use-smie' on: foo = [1, 2, 3].map do |i| i + 1 end -foo_bar_tee(1, 2, 3) - .qux - method !arg1, arg2 @@ -209,3 +210,13 @@ method :foo, method (a + b), c + +foo do + bar + .tee +end + +def bar + foo + .baz +end |