[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16182: 24.3.50; ruby-mode: Indentation style of multiline literals w
From: |
Dmitry Gutov |
Subject: |
bug#16182: 24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens |
Date: |
Thu, 19 Dec 2013 06:57:29 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>> Status.create!({
>> user: current_user,
>> text: params[:status]
>> })
>
> This looks fine.
This is not hard to support (add some `skip-syntax-forward' before the
relevant `smie-indent--hanging-p' call), but does it make sense to
indent this call one way, and when the first argument does not start
with a hanging paren (like `self', in the example below), do it
differently?
>> methods.each do |method|
>> route_set.add_route(self, {
>> path_info: route.route_compiled,
>> request_method: method,
>> }, route_info: route)
>> end
> But this looks confusing to me. If (as a coder) I wanted to keep the
> code "not too deeply indented", I'd use something like:
>
> methods.each do |method|
> route_set.add_route(
> self,
> { path_info: route.route_compiled,
> request_method: method, },
> route_info: route)
> end
I agree it makes sense, but this change could be not entirely obvious to
users not familiar with Emacs indentation engines.
> But that's just me (and I haven't checked to see if the current
> indenter would get this right).
It does now.
- bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens), (continued)
- bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens), Dmitry Gutov, 2013/12/20
- bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens), Bozhidar Batsov, 2013/12/20
- bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens), Dmitry Gutov, 2013/12/21
- bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens), Steve Purcell, 2013/12/21
- bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens), Dmitry Gutov, 2013/12/21
- bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens), Steve Purcell, 2013/12/21
- bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens), Adam Doppelt, 2013/12/21
- bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens), Dmitry Gutov, 2013/12/21
- bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens), Dmitry Gutov, 2013/12/19
bug#16182: 24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens, Stefan Monnier, 2013/12/18
- bug#16182: 24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens,
Dmitry Gutov <=
bug#16182:, Adam Sokolnicki, 2013/12/18
bug#16182:, Adam Doppelt, 2013/12/19
bug#16182:, Adam Sokolnicki, 2013/12/20