diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-28 08:10:01 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-28 08:10:01 +0000 |
commit | 7bc4cfe47950afd6660be17b1b3d48a490291d81 (patch) | |
tree | 785fb748e86ebeb03e14c2f1b929dc1eceed85de /misc | |
parent | 7c7a3c4d96de3b28fc7987750f7f681dab22f073 (diff) |
ruby-electric.el (ruby-electric-curlies): Automatically indent "}".
* misc/ruby-electric.el (ruby-electric-curlies): Automatically
indent closing curly brackets when
ruby-electric-newline-before-closing-bracket is true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc')
-rw-r--r-- | misc/ruby-electric.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/misc/ruby-electric.el b/misc/ruby-electric.el index 0a55681a6e..bbdfbb7c60 100644 --- a/misc/ruby-electric.el +++ b/misc/ruby-electric.el @@ -168,8 +168,11 @@ strings. Note that you must have Font Lock enabled." (insert " ") (save-excursion (if ruby-electric-newline-before-closing-bracket - (newline)) - (insert "}"))) + (progn + (newline) + (insert "}") + (ruby-indent-line t)) + (insert "}")))) ((ruby-electric-string-at-point-p) (if (eq last-command-event ?{) (save-excursion |