From 3322ccc0602cf97ec70ac8f8088266b3f7b4b3ae Mon Sep 17 00:00:00 2001 From: Muir Manders Date: Tue, 30 Oct 2012 09:52:25 -0700 Subject: [PATCH] Fix indenting with two openers on one line. Still doesn't work if the second opener is "do". --- example.rb | 8 +++++++- ruby-mode.el | 3 +-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/example.rb b/example.rb index dcec5de..55ee7d3 100755 --- a/example.rb +++ b/example.rb @@ -96,6 +96,12 @@ def method_with_nested_hash_args ) end - def end_method #this should be spaced correctly + def end_method # this should be spaced correctly + end + + def double_open_parens + assert_equal( 123, Some::Thing.foo( + + ) ) end end diff --git a/ruby-mode.el b/ruby-mode.el index 1c344ad..5f7348c 100644 --- a/ruby-mode.el +++ b/ruby-mode.el @@ -602,8 +602,7 @@ and `\\' when preceded by `?'." (setq nest (cons (list (char-after (point)) pnt depth) nest)) ;; same line as previous open [{(, don't indent again (if (and previous-nest - (ruby-open-list-p previous-nest) - (and (not (eq (car previous-nest) (caar nest))))) + (ruby-open-list-p previous-nest)) nil ;; no-op (setq depth (1+ depth))))) (goto-char pnt)