]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/ruby-mode.el (ruby-align-to-stmt-keywords): Tweak the
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 22 Dec 2013 02:31:21 +0000 (04:31 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 22 Dec 2013 02:31:21 +0000 (04:31 +0200)
docstring.
(ruby-smie-rules): Indent plus one level after `=>'.

lisp/ChangeLog
lisp/progmodes/ruby-mode.el
test/indent/ruby.rb

index ddb632edcf994bc46e3d4646a6cc9123dbadd7c0..36877e3dbbec135193bc2b861988574e0c9335f3 100644 (file)
@@ -1,3 +1,9 @@
+2013-12-22  Dmitry Gutov  <dgutov@yandex.ru>
+
+       * 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  <rms@gnu.org>
 
        * simple.el (newline): Doc fix.
index 12fb8d2bf72dd30d7589b3b6c43215ef9b75e1d5..fae7ce1f8e61e5d771f88eb8da2a7f4e36cfab40 100644 (file)
@@ -227,7 +227,8 @@ This should only be called after matching against `ruby-here-doc-beg-re'."
   :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 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
          (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")
index 7a1a225834d0a1c04987624c8ace9ed790ead0d2..011b59a195ff92c8a664d2c5f1795e0be2da4d87 100644 (file)
@@ -344,3 +344,9 @@ zoo.keep.bar!(
 zoo
   .lose(
   q, p)
+
+foo(bar:
+      tee)
+
+foo(:bar =>
+      tee)