[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16811: 24.3.50; [ruby-mode] Implicit hash indentation bug
From: |
Dmitry Gutov |
Subject: |
bug#16811: 24.3.50; [ruby-mode] Implicit hash indentation bug |
Date: |
Thu, 20 Feb 2014 08:22:08 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Bozhidar Batsov <bozhidar@batsov.com> writes:
> Should be:
>
> method('HashSyntax' => {
> 'EnforcedStyle' => 'ruby19',
> 'SupportedStyles' => %w(ruby19 hash_rockets)
> },
> 'SpaceAroundOperators' => { 'Enabled' => true })
>
> The fact that the hash is implicit (lacking {}) seems to mess with the
> indentation logic.
Not really. The corresponding example with explicit hash would be
{'HashSyntax' => {
'EnforcedStyle' => 'ruby19',
'SupportedStyles' => %w(ruby19 hash_rockets)
},
'SpaceAroundOperators' => {
'Enabled' => true }}
and it has the same problem.
The problem seems to be that (let (smie--parent) (smie-indent--parent))
called between "=>" and "{" doesn't stop at "=>", but goes straight to
the parent "{".
Not sure how to fix that best with the current grammar. Stefan?