diff options
| author | Dmitry Gutov | 2013-12-22 04:31:21 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2013-12-22 04:31:21 +0200 |
| commit | 65a1da00fe2fd74416678d47616ca3e5a68087d5 (patch) | |
| tree | 61de495b18854efc6dedb63fd48a1bf7f582b4f3 | |
| parent | 2ab18afbea51a7e773a1cb99755c6ebb5a395bfc (diff) | |
| download | emacs-65a1da00fe2fd74416678d47616ca3e5a68087d5.tar.gz emacs-65a1da00fe2fd74416678d47616ca3e5a68087d5.zip | |
* lisp/progmodes/ruby-mode.el (ruby-align-to-stmt-keywords): Tweak the
docstring.
(ruby-smie-rules): Indent plus one level after `=>'.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 4 | ||||
| -rw-r--r-- | test/indent/ruby.rb | 6 |
3 files changed, 15 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ddb632edcf9..36877e3dbbe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-12-22 Dmitry Gutov <dgutov@yandex.ru> | ||
| 2 | |||
| 3 | * progmodes/ruby-mode.el (ruby-align-to-stmt-keywords): Tweak the | ||
| 4 | docstring. | ||
| 5 | (ruby-smie-rules): Indent plus one level after `=>'. | ||
| 6 | |||
| 1 | 2013-12-21 Richard Stallman <rms@gnu.org> | 7 | 2013-12-21 Richard Stallman <rms@gnu.org> |
| 2 | 8 | ||
| 3 | * simple.el (newline): Doc fix. | 9 | * simple.el (newline): Doc fix. |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 12fb8d2bf72..fae7ce1f8e6 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -227,7 +227,8 @@ This should only be called after matching against `ruby-here-doc-beg-re'." | |||
| 227 | :safe 'integerp) | 227 | :safe 'integerp) |
| 228 | 228 | ||
| 229 | (defcustom ruby-align-to-stmt-keywords nil | 229 | (defcustom ruby-align-to-stmt-keywords nil |
| 230 | "Keywords to align their expression body to statement. | 230 | "Keywords after which we align the expression body to statement. |
| 231 | |||
| 231 | When nil, an expression that begins with one these keywords is | 232 | When nil, an expression that begins with one these keywords is |
| 232 | indented to the column of the keyword. Example: | 233 | indented to the column of the keyword. Example: |
| 233 | 234 | ||
| @@ -614,6 +615,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'." | |||
| 614 | (cons 'column (current-column))))) | 615 | (cons 'column (current-column))))) |
| 615 | (`(:before . "do") (ruby-smie--indent-to-stmt)) | 616 | (`(:before . "do") (ruby-smie--indent-to-stmt)) |
| 616 | (`(:before . ".") ruby-indent-level) | 617 | (`(:before . ".") ruby-indent-level) |
| 618 | (`(:after . "=>") ruby-indent-level) | ||
| 617 | (`(:before . ,(or `"else" `"then" `"elsif" `"rescue" `"ensure")) | 619 | (`(:before . ,(or `"else" `"then" `"elsif" `"rescue" `"ensure")) |
| 618 | (smie-rule-parent)) | 620 | (smie-rule-parent)) |
| 619 | (`(:before . "when") | 621 | (`(:before . "when") |
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb index 7a1a225834d..011b59a195f 100644 --- a/test/indent/ruby.rb +++ b/test/indent/ruby.rb | |||
| @@ -344,3 +344,9 @@ zoo.keep.bar!( | |||
| 344 | zoo | 344 | zoo |
| 345 | .lose( | 345 | .lose( |
| 346 | q, p) | 346 | q, p) |
| 347 | |||
| 348 | foo(bar: | ||
| 349 | tee) | ||
| 350 | |||
| 351 | foo(:bar => | ||
| 352 | tee) | ||