emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r114766: * lisp/progmodes/ruby-mode.el (ruby-smie-ru


From: Dmitry Gutov
Subject: [Emacs-diffs] trunk r114766: * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Fix the "curly block
Date: Thu, 24 Oct 2013 00:47:35 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114766
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Gutov <address@hidden>
branch nick: trunk
timestamp: Thu 2013-10-24 04:47:28 +0400
message:
  * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Fix the "curly block
  with parameters" example.  Simplify the "is it block or is it
  hash" check, but also make it more thorough.
  
  * test/indent/ruby.rb: Fix syntax error in the latest example.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/progmodes/ruby-mode.el    
rubymode.el-20091113204419-o5vbwnq5f7feedwu-8804
  test/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-8588
  test/indent/ruby.rb            ruby.rb-20120424165921-h044139hbrd7snvw-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-10-23 19:44:28 +0000
+++ b/lisp/ChangeLog    2013-10-24 00:47:28 +0000
@@ -1,3 +1,9 @@
+2013-10-24  Dmitry Gutov  <address@hidden>
+
+       * progmodes/ruby-mode.el (ruby-smie-rules): Fix the "curly block
+       with parameters" example.  Simplify the "is it block or is it
+       hash" check, but also make it more thorough.
+
 2013-10-23  Masashi Fujimoto  <address@hidden>  (tiny change)
 
        * battery.el (battery-pmset): Handle OS X Mavericks.  (Bug#15694)

=== modified file 'lisp/progmodes/ruby-mode.el'
--- a/lisp/progmodes/ruby-mode.el       2013-10-23 17:55:53 +0000
+++ b/lisp/progmodes/ruby-mode.el       2013-10-24 00:47:28 +0000
@@ -449,7 +449,7 @@
       ((smie-rule-parent-p "def" "begin" "do" "class" "module" "for"
                            "while" "until" "unless"
                            "if" "then" "elsif" "else" "when"
-                           "rescue" "ensure")
+                           "rescue" "ensure" "{")
        (smie-rule-parent ruby-indent-level))
       ;; For (invalid) code between switch and case.
       ;; (if (smie-parent-p "switch") 4)
@@ -457,9 +457,7 @@
     (`(:before . ,(or `"(" `"[" `"{"))
      (cond
       ((and (equal token "{")
-            (not (smie-rule-prev-p "(" "{" "[" "," "=>"))
-           (or (smie-rule-hanging-p)
-               (smie-rule-next-p "opening-|")))
+            (not (smie-rule-prev-p "(" "{" "[" "," "=>" "=" "return" ";")))
        ;; Curly block opener.
        (smie-rule-parent))
       ((smie-rule-hanging-p)

=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2013-10-23 06:22:54 +0000
+++ b/test/ChangeLog    2013-10-24 00:47:28 +0000
@@ -1,3 +1,7 @@
+2013-10-24  Dmitry Gutov  <address@hidden>
+
+       * indent/ruby.rb: Fix syntax error in the latest example.
+
 2013-10-23  Glenn Morris  <address@hidden>
 
        * automated/Makefile.in (abs_top_srcdir, top_builddir):

=== modified file 'test/indent/ruby.rb'
--- a/test/indent/ruby.rb       2013-10-23 17:55:53 +0000
+++ b/test/indent/ruby.rb       2013-10-24 00:47:28 +0000
@@ -40,7 +40,7 @@
   a: b
 }
 
-foo = { a: b
+foo = { a: b,
         a1: b1
       }
 


reply via email to

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