From: Dmitry Gutov Date: Thu, 7 Nov 2013 01:58:12 +0000 (+0200) Subject: * lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Lower priority of X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~921 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b420ccfc4cbe081b53881a7c9f0dd6b778b99b99;p=emacs.git * lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Lower priority of "." compared to "do". --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index be01a0cdc29..bbd86b51bc6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-11-07 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-smie-grammar): Lower priority of + "." compared to "do". + 2013-11-06 Glenn Morris * 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." (inst (exp) (inst "iuwu-mod" exp)) (exp (exp1) (exp "," exp) (exp "=" exp) (id " @ " exp) - (exp "." exp)) + (exp "." id)) (exp1 (exp2) (exp2 "?" exp1 ":" exp1)) (exp2 ("def" insts "end") ("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 qux end -# Examples below still fail with `ruby-use-smie' on: - foo = [1, 2, 3].map do |i| i + 1 end -bar.foo do # "." is parent to "do"; it shouldn't be. +bar.foo do bar end