Commit 369bbf71 authored by Dmitry Gutov's avatar Dmitry Gutov
Browse files

* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Fix the "curly block

with parameters" example.  Simplify the "is it block or is it
hash" check, but also make it more thorough.

* test/indent/ruby.rb: Fix syntax error in the latest example.
parent 98434155
2013-10-24 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-smie-rules): Fix the "curly block
with parameters" example. Simplify the "is it block or is it
hash" check, but also make it more thorough.
2013-10-23 Masashi Fujimoto <masfj.dev@gmail.com> (tiny change)
* battery.el (battery-pmset): Handle OS X Mavericks. (Bug#15694)
......
......@@ -449,7 +449,7 @@ explicitly declared in magic comment."
((smie-rule-parent-p "def" "begin" "do" "class" "module" "for"
"while" "until" "unless"
"if" "then" "elsif" "else" "when"
"rescue" "ensure")
"rescue" "ensure" "{")
(smie-rule-parent ruby-indent-level))
;; For (invalid) code between switch and case.
;; (if (smie-parent-p "switch") 4)
......@@ -457,9 +457,7 @@ explicitly declared in magic comment."
(`(:before . ,(or `"(" `"[" `"{"))
(cond
((and (equal token "{")
(not (smie-rule-prev-p "(" "{" "[" "," "=>"))
(or (smie-rule-hanging-p)
(smie-rule-next-p "opening-|")))
(not (smie-rule-prev-p "(" "{" "[" "," "=>" "=" "return" ";")))
;; Curly block opener.
(smie-rule-parent))
((smie-rule-hanging-p)
......
2013-10-24 Dmitry Gutov <dgutov@yandex.ru>
* indent/ruby.rb: Fix syntax error in the latest example.
2013-10-23 Glenn Morris <rgm@gnu.org>
* automated/Makefile.in (abs_top_srcdir, top_builddir):
......
......@@ -40,7 +40,7 @@
a: b
}
foo = { a: b
foo = { a: b,
a1: b1
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment