Subject: bug#17213: closed (Re: bug#17213: Acknowledgement (24.3.50; ruby-mode: misindented continuation method calls inside parens))

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 13 Mar 2016 23:51:02 +0000

Your bug report

#17213: 24.3.50; ruby-mode: misindented continuation method calls inside parens

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
17213: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17213
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#17213: Acknowledgement (24.3.50; ruby-mode: misindented continuation method calls inside parens)
From: Dmitry Gutov <[email-masked]>
To: [email-masked]
Date: Mon, 14 Mar 2016 01:50:21 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Pushed a workaround in 5b705bc97d3928e6550d271c415c54e00e020011 to emacs-25.

Subject: 24.3.50; ruby-mode: misindented continuation method calls inside parens
From: Dmitry Gutov <[email-masked]>
To: [email-masked]
Date: Mon, 07 Apr 2014 05:45:27 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Example:

abc(foo
     .bar,
    tee
     .qux)

The lines with dots should be indented one column more.

Same if I move either dot to the end of the previous line, but keep the
called methods where they are.

I can fix that for the second method call with the patch at the bottom,
but the first one is unaffected. Not sure what would be the best fix for
it.

On a related note, it's worrisome that indentation of the these two
similar pieces of code in fairly similar positions is governed by
different logic.

=== modified file 'lisp/progmodes/ruby-mode.el'
--- lisp/progmodes/ruby-mode.el	2014-03-27 08:21:15 +0000
+++ lisp/progmodes/ruby-mode.el	2014-04-04 03:28:12 +0000
@@ -658,7 +658,7 @@
     (`(:before . ".")
      (if (smie-rule-sibling-p)
          (and ruby-align-chained-calls 0)
-       ruby-indent-level))
+       (smie-rule-parent ruby-indent-level)))
     (`(:before . ,(or `"else" `"then" `"elsif" `"rescue" `"ensure"))
      (smie-rule-parent))
     (`(:before . "when")