aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2013-12-22 08:04:40 +0200
committerDmitry Gutov2013-12-22 08:04:40 +0200
commitf2351498018d7a17ee6eff0b0f3966cd3949f748 (patch)
tree5634e50b8d1cf0e9bb6acd211b77edce7f284e4d
parent57b837ab5f6d61bb52270b2bbc25bcf517d4e345 (diff)
downloademacs-f2351498018d7a17ee6eff0b0f3966cd3949f748.tar.gz
emacs-f2351498018d7a17ee6eff0b0f3966cd3949f748.zip
* 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.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/progmodes/ruby-mode.el2
-rw-r--r--test/indent/ruby.rb1
3 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f6b51d21a30..51bfe7c1fbf 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,11 @@
12013-12-22 Dmitry Gutov <dgutov@yandex.ru> 12013-12-22 Dmitry Gutov <dgutov@yandex.ru>
2 2
3 * progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Return t
4 after `{'. We need it after block openers, and it doesn't seem
5 to hurt after hash openers.
6
72013-12-22 Dmitry Gutov <dgutov@yandex.ru>
8
3 * progmodes/ruby-mode.el (ruby--at-indentation-p): New function, 9 * progmodes/ruby-mode.el (ruby--at-indentation-p): New function,
4 extracted from `ruby-smie-rules'. 10 extracted from `ruby-smie-rules'.
5 (ruby--electric-indent-chars): New variable. 11 (ruby--electric-indent-chars): New variable.
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'."
402 (skip-chars-backward " \t") 402 (skip-chars-backward " \t")
403 (not (or (bolp) 403 (not (or (bolp)
404 (and (memq (char-before) 404 (and (memq (char-before)
405 '(?\; ?- ?+ ?* ?/ ?: ?. ?, ?\[ ?\( ?\{ ?\\ ?& ?> ?< ?% 405 '(?\; ?- ?+ ?* ?/ ?: ?. ?, ?\[ ?\( ?\\ ?& ?> ?< ?%
406 ?~ ?^)) 406 ?~ ?^))
407 ;; Not the end of a regexp or a percent literal. 407 ;; Not the end of a regexp or a percent literal.
408 (not (memq (car (syntax-after (1- (point)))) '(7 15)))) 408 (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
228 228
229it("is too!") { 229it("is too!") {
230 bar 230 bar
231 .qux
231} 232}
232 233
233and_this_one(has) { |block, parameters| 234and_this_one(has) { |block, parameters|