emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r111613: * progmodes/ruby-mode.el (ru


From: Dmitry Gutov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111613: * progmodes/ruby-mode.el (ruby-move-to-block): Work with (maybe
Date: Mon, 28 Jan 2013 05:20:42 +0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111613
committer: Dmitry Gutov <address@hidden>
branch nick: trunk
timestamp: Mon 2013-01-28 05:20:42 +0400
message:
  * progmodes/ruby-mode.el (ruby-move-to-block): Work with (maybe
    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.
modified:
  lisp/ChangeLog
  lisp/progmodes/ruby-mode.el
  test/ChangeLog
  test/automated/ruby-mode-tests.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-01-27 22:32:11 +0000
+++ b/lisp/ChangeLog    2013-01-28 01:20:42 +0000
@@ -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  <address@hidden>
 

=== modified file 'lisp/progmodes/ruby-mode.el'
--- a/lisp/progmodes/ruby-mode.el       2013-01-27 22:32:11 +0000
+++ b/lisp/progmodes/ruby-mode.el       2013-01-28 01:20:42 +0000
@@ -905,7 +905,7 @@
          ((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.

=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2013-01-27 22:46:41 +0000
+++ b/test/ChangeLog    2013-01-28 01:20:42 +0000
@@ -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  <address@hidden>
 

=== modified file 'test/automated/ruby-mode-tests.el'
--- a/test/automated/ruby-mode-tests.el 2013-01-27 22:47:34 +0000
+++ b/test/automated/ruby-mode-tests.el 2013-01-28 01:20:42 +0000
@@ -408,7 +408,8 @@
    |  end
    |
    |  def baz
-   |    some do
+   |some do
+   |3
    |    end
    |  end
    |end"))
@@ -425,7 +426,7 @@
 (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 @@
 (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)


reply via email to

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