GNU bug report logs - #16182
24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Wed, 18 Dec 2013 03:56:02 UTC

Severity: minor

Found in version 24.3.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Adam Doppelt <amd <at> gurge.com>
To: 16182 <at> debbugs.gnu.org
Subject: bug#16182: 
Date: Thu, 19 Dec 2013 10:39:43 -0800
Coincidentally, I mailed Dmitry about this very issue today! He
encouraged me to chime in on the bug.

In my neck of the woods it's common to indent to the beginning of the statement:

x = if y
  y + 1
end

x = list.each do |i|
  i
end

x = case y
when 1 then 2
end

@x ||= begin
  expensive_operation
  ...
end

CONSTANT = begin
  expensive_operation
  ...
end

I patched my personal ruby-mode to default to this indenting.
Incidentally, as the resident emacs enthusiast my dotfiles are used by
many emacs rubyists here in Seattle.

I'd love to see this supported in the new ruby-mode. Just my two cents.




This bug report was last modified 11 years and 247 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.