GNU bug report logs -
#16811
24.3.50; [ruby-mode] Implicit hash indentation bug
Previous Next
Reported by: Bozhidar Batsov <bozhidar <at> batsov.com>
Date: Wed, 19 Feb 2014 17:46:01 UTC
Severity: minor
Found in version 24.3.50
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> The problem seems to be that (let (smie--parent) (smie-indent--parent))
Which does little more than (smie-backward-sexp 'halfsexp) in this case.
> called between "=>" and "{" doesn't stop at "=>", but goes straight to
> the parent "{".
Which seems correct.
> Not sure how to fix that best with the current grammar. Stefan?
I haven't followed the ruby-smie code lately, so I'm a bit lost. But on
the surface I'd say you might want to use (smie-rule-prev-p "=>")?
This said, I don't understand why
{
'HashSyntax' => {
'EnforcedStyle' => 'ruby19',
'SupportedStyles' => %w(ruby19 hash_rockets)
},
'SpaceAroundOperators' => { 'Enabled' => true }
}
is indented differently from
{'HashSyntax' => {
'EnforcedStyle' => 'ruby19',
'SupportedStyles' => %w(ruby19 hash_rockets)
},
'SpaceAroundOperators' => {
'Enabled' => true }}
It seems like "it jumps back to { instead of =>" is not the full explanation.
Stefan
This bug report was last modified 11 years and 88 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.