diff options
| author | Dmitry Gutov | 2014-02-23 07:53:53 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2014-02-23 07:53:53 +0200 |
| commit | 62f9502226a8b910df0abe62b9f9fc7104647c62 (patch) | |
| tree | fbbb1886e8997e97cf4704cc0282687467670ab1 | |
| parent | 16f4c9f1481fa3fa6ce067595acce7340281d503 (diff) | |
| download | emacs-62f9502226a8b910df0abe62b9f9fc7104647c62.tar.gz emacs-62f9502226a8b910df0abe62b9f9fc7104647c62.zip | |
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Don't indent specially
after `=>'.
Fixes: debbugs:16811
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 1 | ||||
| -rw-r--r-- | test/indent/ruby.rb | 8 |
3 files changed, 12 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2dad756b618..bcb09e177c6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-02-23 Dmitry Gutov <dgutov@yandex.ru> | ||
| 2 | |||
| 3 | * progmodes/ruby-mode.el (ruby-smie-rules): Don't indent specially | ||
| 4 | after `=>' (bug#16811). | ||
| 5 | |||
| 1 | 2014-02-23 Juanma Barranquero <lekktu@gmail.com> | 6 | 2014-02-23 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * elec-pair.el (electric-pair-text-syntax-table) | 8 | * elec-pair.el (electric-pair-text-syntax-table) |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index e2175fcc80b..709bc67451d 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -653,7 +653,6 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'." | |||
| 653 | (if (smie-rule-sibling-p) | 653 | (if (smie-rule-sibling-p) |
| 654 | (and ruby-align-chained-calls 0) | 654 | (and ruby-align-chained-calls 0) |
| 655 | ruby-indent-level)) | 655 | ruby-indent-level)) |
| 656 | (`(:after . "=>") ruby-indent-level) | ||
| 657 | (`(:before . ,(or `"else" `"then" `"elsif" `"rescue" `"ensure")) | 656 | (`(:before . ,(or `"else" `"then" `"elsif" `"rescue" `"ensure")) |
| 658 | (smie-rule-parent)) | 657 | (smie-rule-parent)) |
| 659 | (`(:before . "when") | 658 | (`(:before . "when") |
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb index cf6bcba8c39..5fd59bfb186 100644 --- a/test/indent/ruby.rb +++ b/test/indent/ruby.rb | |||
| @@ -361,4 +361,10 @@ foo(bar: | |||
| 361 | tee) | 361 | tee) |
| 362 | 362 | ||
| 363 | foo(:bar => | 363 | foo(:bar => |
| 364 | tee) | 364 | tee) |
| 365 | |||
| 366 | {'a' => { | ||
| 367 | 'b' => 'c', | ||
| 368 | 'd' => %w(e f) | ||
| 369 | } | ||
| 370 | } | ||