diff options
| author | Dmitry Gutov | 2013-12-22 08:04:40 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2013-12-22 08:04:40 +0200 |
| commit | f2351498018d7a17ee6eff0b0f3966cd3949f748 (patch) | |
| tree | 5634e50b8d1cf0e9bb6acd211b77edce7f284e4d | |
| parent | 57b837ab5f6d61bb52270b2bbc25bcf517d4e345 (diff) | |
| download | emacs-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/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 2 | ||||
| -rw-r--r-- | test/indent/ruby.rb | 1 |
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 @@ | |||
| 1 | 2013-12-22 Dmitry Gutov <dgutov@yandex.ru> | 1 | 2013-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 | |||
| 7 | 2013-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 | ||
| 229 | it("is too!") { | 229 | it("is too!") { |
| 230 | bar | 230 | bar |
| 231 | .qux | ||
| 231 | } | 232 | } |
| 232 | 233 | ||
| 233 | and_this_one(has) { |block, parameters| | 234 | and_this_one(has) { |block, parameters| |