[前][次][番号順一覧][スレッド一覧]

ruby-changes:26591

From: knu <ko1@a...>
Date: Fri, 28 Dec 2012 17:10:12 +0900 (JST)
Subject: [ruby-changes:26591] knu:r38642 (trunk): ruby-electric.el (ruby-electric-curlies): Automatically indent "}".

knu	2012-12-28 17:10:01 +0900 (Fri, 28 Dec 2012)

  New Revision: 38642

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38642

  Log:
    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.

  Modified files:
    trunk/ChangeLog
    trunk/misc/ruby-electric.el

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38641)
+++ ChangeLog	(revision 38642)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Dec 28 17:06:17 2012  Akinori MUSHA  <knu@i...>
+
+	* 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@r...>
 
 	* vm_insnhelper.c (vm_yield_setup_block_args): pass single argument to
Index: misc/ruby-electric.el
===================================================================
--- misc/ruby-electric.el	(revision 38641)
+++ misc/ruby-electric.el	(revision 38642)
@@ -168,8 +168,11 @@ strings. Note that you must have Font Lo https://github.com/ruby/ruby/blob/trunk/misc/ruby-electric.el#L168
              (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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]