diff options
| author | Dmitry Gutov | 2013-11-07 03:58:12 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2013-11-07 03:58:12 +0200 |
| commit | b420ccfc4cbe081b53881a7c9f0dd6b778b99b99 (patch) | |
| tree | c9aa0d449ad8538ef65d9c8aae799f1a9daa3f6a | |
| parent | e2e894cf5c87c3880fe5725ac3ef7e6ab529eaf1 (diff) | |
| download | emacs-b420ccfc4cbe081b53881a7c9f0dd6b778b99b99.tar.gz emacs-b420ccfc4cbe081b53881a7c9f0dd6b778b99b99.zip | |
* lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Lower priority of
"." compared to "do".
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 2 | ||||
| -rw-r--r-- | test/indent/ruby.rb | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index be01a0cdc29..bbd86b51bc6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-11-07 Dmitry Gutov <dgutov@yandex.ru> | ||
| 2 | |||
| 3 | * progmodes/ruby-mode.el (ruby-smie-grammar): Lower priority of | ||
| 4 | "." compared to "do". | ||
| 5 | |||
| 1 | 2013-11-06 Glenn Morris <rgm@gnu.org> | 6 | 2013-11-06 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * Makefile.in (setwins_almost, setwins_for_subdirs): | 8 | * Makefile.in (setwins_almost, setwins_for_subdirs): |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 253a6006052..b5020344872 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -280,7 +280,7 @@ explicitly declared in magic comment." | |||
| 280 | (inst (exp) (inst "iuwu-mod" exp)) | 280 | (inst (exp) (inst "iuwu-mod" exp)) |
| 281 | (exp (exp1) (exp "," exp) (exp "=" exp) | 281 | (exp (exp1) (exp "," exp) (exp "=" exp) |
| 282 | (id " @ " exp) | 282 | (id " @ " exp) |
| 283 | (exp "." exp)) | 283 | (exp "." id)) |
| 284 | (exp1 (exp2) (exp2 "?" exp1 ":" exp1)) | 284 | (exp1 (exp2) (exp2 "?" exp1 ":" exp1)) |
| 285 | (exp2 ("def" insts "end") | 285 | (exp2 ("def" insts "end") |
| 286 | ("begin" insts-rescue-insts "end") | 286 | ("begin" insts-rescue-insts "end") |
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb index 5e3db5afb71..3d881edcba9 100644 --- a/test/indent/ruby.rb +++ b/test/indent/ruby.rb | |||
| @@ -238,12 +238,10 @@ foo :bar do | |||
| 238 | qux | 238 | qux |
| 239 | end | 239 | end |
| 240 | 240 | ||
| 241 | # Examples below still fail with `ruby-use-smie' on: | ||
| 242 | |||
| 243 | foo = [1, 2, 3].map do |i| | 241 | foo = [1, 2, 3].map do |i| |
| 244 | i + 1 | 242 | i + 1 |
| 245 | end | 243 | end |
| 246 | 244 | ||
| 247 | bar.foo do # "." is parent to "do"; it shouldn't be. | 245 | bar.foo do |
| 248 | bar | 246 | bar |
| 249 | end | 247 | end |