]> git.eshelyaron.com Git - emacs.git/commitdiff
* progmodes/ruby-mode.el (ruby-move-to-block): Work with (maybe
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 28 Jan 2013 01:20:42 +0000 (05:20 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 28 Jan 2013 01:20:42 +0000 (05:20 +0400)
  temporarily) broken indentation.
* automated/ruby-mode-tests.el (ruby-block-test-example):
  Break indentation of the do block opener and add a line inside it.
* automated/ruby-mode-tests.el (works-on-do, ok-with-three):
  Adjust line numbers.

lisp/ChangeLog
lisp/progmodes/ruby-mode.el
test/ChangeLog
test/automated/ruby-mode-tests.el

index cc30dc82341e5e26cf64ef8ba2fec8e34e59c421..7b37b3d21b3dddf2a95850f2f3b70df6d3188547 100644 (file)
@@ -2,6 +2,8 @@
 
        * progmodes/ruby-mode.el (ruby-font-lock-keywords): Remove some
        checks made superfluous by the \_< operator.
+       * progmodes/ruby-mode.el (ruby-move-to-block): Work with (maybe
+       temporarily) broken indentation.
 
 2013-01-27  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 
index 989c00365a0037349b9a07f6995a85109be6f94f..2c8a5ee4a13d8f4b66707e8a403300ac0d99493e 100644 (file)
@@ -905,7 +905,7 @@ current block, a sibling block, or an outer block.  Do that (abs N) times."
          ((and backward (looking-at "^=end\\>"))
           (re-search-backward "^=begin\\>"))
          (t
-          (setq pos (current-indentation))
+          (setq pos (ruby-calculate-indent))
           (cond
            ;; Deeper indentation, we found a block.
            ;; FIXME: We can't recognize empty blocks this way.
index 505ac398e2fe98e280d912adf1594ad6aa53fa59..7e893ba676837745a1cd56802958c45481f36ab0 100644 (file)
@@ -2,6 +2,10 @@
 
        * automated/ruby-mode-tests.el
        (ruby-indent-spread-args-in-parens): New test.
+       * automated/ruby-mode-tests.el (ruby-block-test-example):
+       Break indentation of the do block opener and add a line inside it.
+       * automated/ruby-mode-tests.el (works-on-do, ok-with-three):
+       Adjust line numbers.
 
 2013-01-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 
index 42c59a1f3f0629e736c090547aece0de28d728b3..2028c6fad00af3629d54f9667d05e80e5260742b 100644 (file)
@@ -408,7 +408,8 @@ VALUES-PLIST is a list with alternating index and value elements."
    |  end
    |
    |  def baz
-   |    some do
+   |some do
+   |3
    |    end
    |  end
    |end"))
@@ -425,7 +426,7 @@ VALUES-PLIST is a list with alternating index and value elements."
 (ruby-deftest-move-to-block works-on-do
   (goto-line 11)
   (ruby-end-of-block)
-  (should (= 12 (line-number-at-pos)))
+  (should (= 13 (line-number-at-pos)))
   (ruby-beginning-of-block)
   (should (= 11 (line-number-at-pos))))
 
@@ -437,7 +438,7 @@ VALUES-PLIST is a list with alternating index and value elements."
 (ruby-deftest-move-to-block ok-with-three
   (goto-line 2)
   (ruby-move-to-block 3)
-  (should (= 13 (line-number-at-pos))))
+  (should (= 14 (line-number-at-pos))))
 
 (ruby-deftest-move-to-block ok-with-minus-two
   (goto-line 10)