bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of mul


From: Dmitry Gutov
Subject: bug#16182: Acknowledgement (24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens)
Date: Fri, 20 Dec 2013 07:21:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 19.12.2013 22:33, Bozhidar Batsov wrote:
Part of the reason people are not using a particular style from time to
time is simply lack of tool support. :-) I guess more people would have
used that style if their editor supported it.

Maybe so. I'll have to return to the "do" block later, since this kind of special handling requires finding the beginning of the method chain (in the general case) that the block is passed to. Other keywords are simpler.

Well, even though I develop Rails apps for a living I wouldn’t say the
style used in the Rails codebase should be considered some gold standard
- after all they are outdenting “private/protected” there :-)

Yuck indeed. :)

> That said
- before I started using programming Ruby in Emacs I aligned to the
beginning of the statement, but I stopped because this wasn’t supported
in ruby-mode. After using the alignment to keyword style for several
years I’ve grown to like it a lot (and it seems others are enjoying it
as well
http://stackoverflow.com/questions/2925028/how-do-you-assign-a-variable-with-the-result-of-a-if-else-block).
I’m perfectly fine with alignment to statement becoming the default
(although the change of this default would be fairly visible/disruptive,
since as it stands keyword alignment is the only supported style and I
guess most Rubyists using Emacs employ it).

Well, since there's not much support for changing the defaults, I've reverted the special handling of "begin" that already made its way in, and added a user option that would control all applicable keywords: `ruby-align-to-stmt-keywords', in revision 115624.

Everyone, please try how it works for you, maybe comment on the name, etc.

The feature freeze is in a couple of days, so we have to get the basics right.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]