emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115677: * lisp/progmodes/ruby-mode.el (ruby-align-t


From: Dmitry Gutov
Subject: [Emacs-diffs] trunk r115677: * lisp/progmodes/ruby-mode.el (ruby-align-to-stmt-keywords): Tweak the
Date: Sun, 22 Dec 2013 02:31:28 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115677
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Gutov <address@hidden>
branch nick: trunk
timestamp: Sun 2013-12-22 04:31:21 +0200
message:
  * lisp/progmodes/ruby-mode.el (ruby-align-to-stmt-keywords): Tweak the
  docstring.
  (ruby-smie-rules): Indent plus one level after `=>'.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/progmodes/ruby-mode.el    
rubymode.el-20091113204419-o5vbwnq5f7feedwu-8804
  test/indent/ruby.rb            ruby.rb-20120424165921-h044139hbrd7snvw-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-12-21 22:55:59 +0000
+++ b/lisp/ChangeLog    2013-12-22 02:31:21 +0000
@@ -1,3 +1,9 @@
+2013-12-22  Dmitry Gutov  <address@hidden>
+
+       * progmodes/ruby-mode.el (ruby-align-to-stmt-keywords): Tweak the
+       docstring.
+       (ruby-smie-rules): Indent plus one level after `=>'.
+
 2013-12-21  Richard Stallman  <address@hidden>
 
        * simple.el (newline): Doc fix.

=== modified file 'lisp/progmodes/ruby-mode.el'
--- a/lisp/progmodes/ruby-mode.el       2013-12-20 05:20:33 +0000
+++ b/lisp/progmodes/ruby-mode.el       2013-12-22 02:31:21 +0000
@@ -227,7 +227,8 @@
   :safe 'integerp)
 
 (defcustom ruby-align-to-stmt-keywords nil
-  "Keywords to align their expression body to statement.
+  "Keywords after which we align the expression body to statement.
+
 When nil, an expression that begins with one these keywords is
 indented to the column of the keyword.  Example:
 
@@ -614,6 +615,7 @@
          (cons 'column (current-column)))))
     (`(:before . "do") (ruby-smie--indent-to-stmt))
     (`(:before . ".") ruby-indent-level)
+    (`(:after . "=>") ruby-indent-level)
     (`(:before . ,(or `"else" `"then" `"elsif" `"rescue" `"ensure"))
      (smie-rule-parent))
     (`(:before . "when")

=== modified file 'test/indent/ruby.rb'
--- a/test/indent/ruby.rb       2013-12-20 05:20:33 +0000
+++ b/test/indent/ruby.rb       2013-12-22 02:31:21 +0000
@@ -344,3 +344,9 @@
 zoo
   .lose(
   q, p)
+
+foo(bar:
+      tee)
+
+foo(:bar =>
+      tee)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]