[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114565: * lisp/progmodes/ruby-mode.el (ruby-smie--i
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] trunk r114565: * lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Handle the |
Date: |
Mon, 07 Oct 2013 23:01:28 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114565
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Gutov <address@hidden>
branch nick: trunk
timestamp: Tue 2013-10-08 02:01:23 +0300
message:
* lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Handle the
case of the dot in a chained method call being on the following
line.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/ruby-mode.el
rubymode.el-20091113204419-o5vbwnq5f7feedwu-8804
test/indent/ruby.rb ruby.rb-20120424165921-h044139hbrd7snvw-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-10-07 18:51:26 +0000
+++ b/lisp/ChangeLog 2013-10-07 23:01:23 +0000
@@ -1,3 +1,9 @@
+2013-10-07 Dmitry Gutov <address@hidden>
+
+ * progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Handle the
+ case of the dot in a chained method call being on the following
+ line.
+
2013-10-07 Stefan Monnier <address@hidden>
* electric.el (electric-indent-inhibit): New var.
=== modified file 'lisp/progmodes/ruby-mode.el'
--- a/lisp/progmodes/ruby-mode.el 2013-10-07 16:56:51 +0000
+++ b/lisp/progmodes/ruby-mode.el 2013-10-07 23:01:23 +0000
@@ -295,7 +295,10 @@
(and (memq (char-before) '(?\? ?=))
(let ((tok (ruby-smie--backward-token)))
(or (equal tok "?")
- (string-match "\\`\\s." tok))))))))
+ (string-match "\\`\\s." tok))))
+ (save-excursion
+ (forward-comment 1)
+ (eq (char-after) ?.))))))
(defun ruby-smie--redundant-do-p (&optional skip)
(save-excursion
=== modified file 'test/indent/ruby.rb'
--- a/test/indent/ruby.rb 2013-10-07 13:27:29 +0000
+++ b/test/indent/ruby.rb 2013-10-07 23:01:23 +0000
@@ -137,8 +137,6 @@
foo.
bar
-# Examples below still fail with `ruby-use-smie' on:
-
#
https://github.com/rails/rails/blob/17f5d8e062909f1fcae25351834d8e89967b645e/activesupport/lib/active_support/time_with_zone.rb#L206
foo
.bar
@@ -150,6 +148,8 @@
}
}
+# Examples below still fail with `ruby-use-smie' on:
+
foo +
bar
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114565: * lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Handle the,
Dmitry Gutov <=