emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r111078: * lisp/progmodes/ruby-mod


From: Dmitry Gutov
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r111078: * lisp/progmodes/ruby-mode.el (ruby-indent-beg-re): Only allow "class",
Date: Wed, 26 Dec 2012 20:45:19 +0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111078
committer: Dmitry Gutov <address@hidden>
branch nick: emacs-24
timestamp: Wed 2012-12-26 20:45:19 +0400
message:
  * lisp/progmodes/ruby-mode.el (ruby-indent-beg-re): Only allow "class",
    "module" and "def" to have indentation before them.  Regression
    from 109911 (see the new test).
  
  * test/automated/ruby-mode-tests.el
    (ruby-indent-after-block-in-continued-expression): New test.
modified:
  lisp/ChangeLog
  lisp/progmodes/ruby-mode.el
  test/ChangeLog
  test/automated/ruby-mode-tests.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-12-24 07:14:49 +0000
+++ b/lisp/ChangeLog    2012-12-26 16:45:19 +0000
@@ -1,3 +1,9 @@
+2012-12-26  Dmitry Gutov  <address@hidden>
+
+       * progmodes/ruby-mode.el (ruby-indent-beg-re): Only allow "class",
+       "module" and "def" to have indentation before them.  Regression
+       from 109911 (see the new test).
+
 2012-12-24  Dmitry Gutov  <address@hidden>
 
        * progmodes/ruby-mode.el: Bump the version to 1.2 (Bug#13200).

=== modified file 'lisp/progmodes/ruby-mode.el'
--- a/lisp/progmodes/ruby-mode.el       2012-12-24 07:14:49 +0000
+++ b/lisp/progmodes/ruby-mode.el       2012-12-26 16:45:19 +0000
@@ -64,8 +64,9 @@
   "Regexp to match keywords that nest without blocks.")
 
 (defconst ruby-indent-beg-re
-  (concat "^\\s *" (regexp-opt '("class" "module" "def" "if" "unless" "case"
-                                 "while" "until" "for" "begin")) "\\_>")
+  (concat "^\\(\\s *" (regexp-opt '("class" "module" "def")) "\\|"
+          (regexp-opt '("if" "unless" "case" "while" "until" "for" "begin"))
+          "\\)\\_>")
   "Regexp to match where the indentation gets deeper.")
 
 (defconst ruby-modifier-beg-keywords

=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2012-10-14 07:40:05 +0000
+++ b/test/ChangeLog    2012-12-26 16:45:19 +0000
@@ -1,3 +1,8 @@
+2012-12-26  Dmitry Gutov  <address@hidden>
+
+       * automated/ruby-mode-tests.el
+       (ruby-indent-after-block-in-continued-expression): New test.
+
 2012-10-14  Eli Zaretskii  <address@hidden>
 
        * automated/compile-tests.el (compile-tests--test-regexps-data):

=== modified file 'test/automated/ruby-mode-tests.el'
--- a/test/automated/ruby-mode-tests.el 2012-11-12 01:11:06 +0000
+++ b/test/automated/ruby-mode-tests.el 2012-12-26 16:45:19 +0000
@@ -202,6 +202,19 @@
    |  end
    |"))
 
+(ert-deftest ruby-indent-after-block-in-continued-expression ()
+  (ruby-should-indent-buffer
+   "var =
+   |  begin
+   |    val
+   |  end
+   |statement"
+   "var =
+   |begin
+   |val
+   |end
+   |statement"))
+
 (ert-deftest ruby-move-to-block-stops-at-indentation ()
   (with-temp-buffer
     (insert "def f\nend")


reply via email to

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