From f2351498018d7a17ee6eff0b0f3966cd3949f748 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sun, 22 Dec 2013 08:04:40 +0200 Subject: [PATCH] * lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Return t after `{'. We need it after block openers, and it doesn't seem to hurt after hash openers. --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/ruby-mode.el | 2 +- test/indent/ruby.rb | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f6b51d21a30..51bfe7c1fbf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-12-22 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Return t + after `{'. We need it after block openers, and it doesn't seem + to hurt after hash openers. + 2013-12-22 Dmitry Gutov * progmodes/ruby-mode.el (ruby--at-indentation-p): New function, diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 89c0cfad913..3308651b0e3 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -402,7 +402,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'." (skip-chars-backward " \t") (not (or (bolp) (and (memq (char-before) - '(?\; ?- ?+ ?* ?/ ?: ?. ?, ?\[ ?\( ?\{ ?\\ ?& ?> ?< ?% + '(?\; ?- ?+ ?* ?/ ?: ?. ?, ?\[ ?\( ?\\ ?& ?> ?< ?% ?~ ?^)) ;; Not the end of a regexp or a percent literal. (not (memq (car (syntax-after (1- (point)))) '(7 15)))) diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb index 011b59a195f..0d47bbcf7c0 100644 --- a/test/indent/ruby.rb +++ b/test/indent/ruby.rb @@ -228,6 +228,7 @@ end it("is too!") { bar + .qux } and_this_one(has) { |block, parameters| -- 2.39.2