aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2013-11-07 03:58:12 +0200
committerDmitry Gutov2013-11-07 03:58:12 +0200
commitb420ccfc4cbe081b53881a7c9f0dd6b778b99b99 (patch)
treec9aa0d449ad8538ef65d9c8aae799f1a9daa3f6a
parente2e894cf5c87c3880fe5725ac3ef7e6ab529eaf1 (diff)
downloademacs-b420ccfc4cbe081b53881a7c9f0dd6b778b99b99.tar.gz
emacs-b420ccfc4cbe081b53881a7c9f0dd6b778b99b99.zip
* lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Lower priority of
"." compared to "do".
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/ruby-mode.el2
-rw-r--r--test/indent/ruby.rb4
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 @@
12013-11-07 Dmitry Gutov <dgutov@yandex.ru>
2
3 * progmodes/ruby-mode.el (ruby-smie-grammar): Lower priority of
4 "." compared to "do".
5
12013-11-06 Glenn Morris <rgm@gnu.org> 62013-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
239end 239end
240 240
241# Examples below still fail with `ruby-use-smie' on:
242
243foo = [1, 2, 3].map do |i| 241foo = [1, 2, 3].map do |i|
244 i + 1 242 i + 1
245end 243end
246 244
247bar.foo do # "." is parent to "do"; it shouldn't be. 245bar.foo do
248 bar 246 bar
249end 247end