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

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

bug#60186: 29.0.60; ruby-mode indentation of multi-line expressions


From: Aaron Jensen
Subject: bug#60186: 29.0.60; ruby-mode indentation of multi-line expressions
Date: Wed, 21 Dec 2022 21:31:14 -0500

On Wed, Dec 21, 2022 at 5:48 PM Dmitry Gutov <dgutov@yandex.ru> wrote:
> See this new patch instead.
>
> The code is messier than I'd like it to be, but it seems to handle all
> of the cases mentioned so far and more (including the
> dots-at-indentation style, thanks).

Looks good, for the things I mentioned. I found one more case:

x.foo do
  foo
end.bar do
    bar
  end

Should be:

x.foo do
  foo
end.bar do
  bar
end


I can't vouch for writing in this style, but it should only get one
indentation increase in this instance, rather than, I believe.

Interestingly enough, I found a bug with enh-ruby-mode that ruby-mode
now indents correctly:

x =
  bar(
    y
  ).map do |i|
  i
  end

Thanks,

Aaron





reply via email to

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