mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
7c7a3c4d96
commit
7bc4cfe479
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Fri Dec 28 17:06:17 2012 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
|
* misc/ruby-electric.el (ruby-electric-curlies): Automatically
|
||||||
|
indent closing curly brackets when
|
||||||
|
ruby-electric-newline-before-closing-bracket is true.
|
||||||
|
|
||||||
Fri Dec 28 11:50:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Fri Dec 28 11:50:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* vm_insnhelper.c (vm_yield_setup_block_args): pass single argument to
|
* vm_insnhelper.c (vm_yield_setup_block_args): pass single argument to
|
||||||
|
|
|
@ -168,8 +168,11 @@ strings. Note that you must have Font Lock enabled."
|
||||||
(insert " ")
|
(insert " ")
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(if ruby-electric-newline-before-closing-bracket
|
(if ruby-electric-newline-before-closing-bracket
|
||||||
(newline))
|
(progn
|
||||||
(insert "}")))
|
(newline)
|
||||||
|
(insert "}")
|
||||||
|
(ruby-indent-line t))
|
||||||
|
(insert "}"))))
|
||||||
((ruby-electric-string-at-point-p)
|
((ruby-electric-string-at-point-p)
|
||||||
(if (eq last-command-event ?{)
|
(if (eq last-command-event ?{)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
|
|
Loading…
Add table
Reference in a new issue