emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Dmitry Gutov
Subject: [Emacs-diffs] trunk r114655: * lisp/progmodes/ruby-mode.el (ruby-smie--args-separator-p): Handle
Date: Mon, 14 Oct 2013 01:51:30 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114655
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Gutov <address@hidden>
branch nick: trunk
timestamp: Mon 2013-10-14 04:51:20 +0300
message:
  * lisp/progmodes/ruby-mode.el (ruby-smie--args-separator-p): Handle
  methods ending with `?' and `!'.
  
  * test/indent/ruby.rb: More examples for bug#15594, both failing and
  now passing.
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-14 00:23:29 +0000
+++ b/lisp/ChangeLog    2013-10-14 01:51:20 +0000
@@ -1,3 +1,8 @@
+2013-10-14  Dmitry Gutov  <address@hidden>
+
+       * progmodes/ruby-mode.el (ruby-smie--args-separator-p): Handle
+       methods ending with `?' and `!'.
+
 2013-10-14  Akinori MUSHA  <address@hidden>
 
        * progmodes/ruby-mode.el (ruby-encoding-map): Add a mapping from

=== modified file 'lisp/progmodes/ruby-mode.el'
--- a/lisp/progmodes/ruby-mode.el       2013-10-14 00:23:29 +0000
+++ b/lisp/progmodes/ruby-mode.el       2013-10-14 01:51:20 +0000
@@ -327,7 +327,9 @@
 
 (defun ruby-smie--args-separator-p (pos)
   (and
-   (eq ?w (char-syntax (char-before)))
+   (or (eq (char-syntax (preceding-char)) '?w)
+       (and (memq (preceding-char) '(?! ??))
+            (eq (char-syntax (char-before (1- (point)))) '?w)))
    (< pos (point-max))
    (memq (char-syntax (char-after pos)) '(?w ?\"))))
 

=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2013-10-13 00:28:30 +0000
+++ b/test/ChangeLog    2013-10-14 01:51:20 +0000
@@ -1,3 +1,8 @@
+2013-10-14  Dmitry Gutov  <address@hidden>
+
+       * indent/ruby.rb: More examples for bug#15594, both failing and
+       now passing.
+
 2013-10-11  Dmitry Gutov  <address@hidden>
 
        * indent/ruby.rb: Add two more cases.

=== modified file 'test/indent/ruby.rb'
--- a/test/indent/ruby.rb       2013-10-12 20:40:50 +0000
+++ b/test/indent/ruby.rb       2013-10-14 01:51:20 +0000
@@ -155,6 +155,16 @@
   bar
 end
 
+method arg1,                   # bug#15594
+       method2 arg2,
+               arg3
+
+method? arg1,
+        arg2
+
+method! arg1,
+        arg2
+
 # Examples below still fail with `ruby-use-smie' on:
 
 foo +
@@ -171,6 +181,17 @@
     bar
 end
 
-method1 arg1,                   # bug#15594
-        method2 arg2,
-                arg3
+method !arg1,
+        arg2
+
+method [],
+       arg2
+
+method {:a => 1, :b => 2},
+       arg2
+
+method :foo,
+       :bar
+
+method (a + b),
+       c


reply via email to

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