diff options
| author | Dmitry Gutov | 2013-12-14 08:46:13 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2013-12-14 08:46:13 +0200 |
| commit | 276bc3337b27bcd76aa2735ed96c160c6a1b573a (patch) | |
| tree | 998438a0496b773195c79bd11f9372d06497d96f /test/indent/ruby.rb | |
| parent | dc7909c40a5524af650a7d4233f393a43bf6706c (diff) | |
| download | emacs-276bc3337b27bcd76aa2735ed96c160c6a1b573a.tar.gz emacs-276bc3337b27bcd76aa2735ed96c160c6a1b573a.zip | |
Fix bug#16118
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Return nil before
open-paren tokens when preceded by a open-paren, too.
(ruby-smie-rules): Handle virtual indentation after open-paren
tokens specially. If there is code between it and eol, return the
column where is starts.
* test/indent/ruby.rb: New examples.
Diffstat (limited to 'test/indent/ruby.rb')
| -rw-r--r-- | test/indent/ruby.rb | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb index 3c4d68a97bf..7b85899577c 100644 --- a/test/indent/ruby.rb +++ b/test/indent/ruby.rb | |||
| @@ -45,10 +45,41 @@ foo = { a: b, | |||
| 45 | a1: b1 | 45 | a1: b1 |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | foo({ | 48 | foo({ # bug#16118 |
| 49 | a: b, | 49 | a: b, |
| 50 | c: d | 50 | c: d |
| 51 | }) | 51 | } |
| 52 | ) # bug#16116 | ||
| 53 | |||
| 54 | bar = foo( | ||
| 55 | a, [ | ||
| 56 | 1, | ||
| 57 | ], | ||
| 58 | :qux => [ | ||
| 59 | 3 | ||
| 60 | ] | ||
| 61 | ) | ||
| 62 | |||
| 63 | foo( | ||
| 64 | [ | ||
| 65 | { | ||
| 66 | a: b | ||
| 67 | }, | ||
| 68 | ], | ||
| 69 | { | ||
| 70 | c: d | ||
| 71 | } | ||
| 72 | ) | ||
| 73 | |||
| 74 | foo([{ | ||
| 75 | a: 2 | ||
| 76 | }, | ||
| 77 | { | ||
| 78 | b: 3 | ||
| 79 | }, | ||
| 80 | 4 | ||
| 81 | ] | ||
| 82 | ) | ||
| 52 | 83 | ||
| 53 | foo = [ # ruby-deep-indent-disabled | 84 | foo = [ # ruby-deep-indent-disabled |
| 54 | 1 | 85 | 1 |