* lisp/progmodes/ruby-mode.el (ruby-align-to-stmt-keywords): Tweak the

docstring.
(ruby-smie-rules): Indent plus one level after `=>'.
This commit is contained in:
Dmitry Gutov 2013-12-22 04:31:21 +02:00
parent 2ab18afbea
commit 65a1da00fe
3 changed files with 15 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2013-12-22 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-align-to-stmt-keywords): Tweak the
docstring.
(ruby-smie-rules): Indent plus one level after `=>'.
2013-12-21 Richard Stallman <rms@gnu.org>
* simple.el (newline): Doc fix.

View file

@ -227,7 +227,8 @@ This should only be called after matching against `ruby-here-doc-beg-re'."
:safe 'integerp)
(defcustom ruby-align-to-stmt-keywords nil
"Keywords to align their expression body to statement.
"Keywords after which we align the expression body to statement.
When nil, an expression that begins with one these keywords is
indented to the column of the keyword. Example:
@ -614,6 +615,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
(cons 'column (current-column)))))
(`(:before . "do") (ruby-smie--indent-to-stmt))
(`(:before . ".") ruby-indent-level)
(`(:after . "=>") ruby-indent-level)
(`(:before . ,(or `"else" `"then" `"elsif" `"rescue" `"ensure"))
(smie-rule-parent))
(`(:before . "when")

View file

@ -344,3 +344,9 @@ zoo.keep.bar!(
zoo
.lose(
q, p)
foo(bar:
tee)
foo(:bar =>
tee)