From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 16811@debbugs.gnu.org, Bozhidar Batsov <bozhidar@batsov.com>
Subject: bug#16811: 24.3.50; [ruby-mode] Implicit hash indentation bug
Date: Thu, 20 Feb 2014 09:11:10 -0500 [thread overview]
Message-ID: <jwvk3cpnakx.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <87fvnes3qn.fsf@yandex.ru> (Dmitry Gutov's message of "Thu, 20 Feb 2014 08:22:08 +0200")
> 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
next prev parent reply other threads:[~2014-02-20 14:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-19 17:44 bug#16811: 24.3.50; [ruby-mode] Implicit hash indentation bug Bozhidar Batsov
2014-02-20 6:22 ` Dmitry Gutov
2014-02-20 14:11 ` Stefan Monnier [this message]
2014-02-23 5:55 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvk3cpnakx.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=16811@debbugs.gnu.org \
--cc=bozhidar@batsov.com \
--cc=dgutov@yandex.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.