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

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

bug#60186: closed (29.0.60; ruby-mode indentation of multi-line expressi


From: GNU bug Tracking System
Subject: bug#60186: closed (29.0.60; ruby-mode indentation of multi-line expressions)
Date: Fri, 30 Dec 2022 22:08:02 +0000

Your message dated Sat, 31 Dec 2022 00:07:16 +0200
with message-id <f7676313-2ee0-0aec-c836-e2b153a465b0@yandex.ru>
and subject line Re: bug#60186: 29.0.60; ruby-mode indentation of multi-line 
expressions
has caused the debbugs.gnu.org bug report #60186,
regarding 29.0.60; ruby-mode indentation of multi-line expressions
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
60186: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60186
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 29.0.60; ruby-mode indentation of multi-line expressions Date: Sun, 18 Dec 2022 21:54:18 -0500
Follow-up to bug#60110

I prefer rather simplictic indentation for Ruby (and this appears to be
pretty common from codebases I've seen). Essentially, the rule is: If an
expression continues on another line, indent it once. 

Current:

some_variable = some_object.
                  some_method

Desired:

some_variable = some_object.
  some_method

Current:

some_variable = some_number + some_other_number *
                              some_third_number + some_fourth_number -
                some_fifth_number

Desired:

some_variable = some_number + some_other_number *
  some_third_number + some_fourth_number -
  some_fifth_number


I don't know if this last one is related or not, but it follows the same
rule plus the rule about blocks. Everything about the continuation of
the expression is indented once. The contents of the block are indented
once more. The end should line up with the line that opened the block.

Current:

some_variable = some_array.
                  map do |x|
  x + 1
end

Desired:

some_variable = some_array.
  map do |x|
    x + 1
  end




--- End Message ---
--- Begin Message --- Subject: Re: bug#60186: 29.0.60; ruby-mode indentation of multi-line expressions Date: Sat, 31 Dec 2022 00:07:16 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2
Version: 29.1

On 30/12/2022 20:16, Aaron Jensen wrote:
I can't reproduce this anymore, I think it had to do w/ dtrt-indent
doing something odd. I had things in a state where some buffers did it
and not others and I restarted Emacs before checking the settings. In
any case, I think it's fine. I don't have any concerns with the patch
as-is.

Thanks for testing, this is now in the release branch.


--- End Message ---

reply via email to

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