* lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Return t
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 9 Dec 2013 04:19:16 +0000 (06:19 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 9 Dec 2013 04:19:16 +0000 (06:19 +0200)
after the end of a percent literal.

lisp/ChangeLog
lisp/progmodes/ruby-mode.el
test/indent/ruby.rb

index 6e26318..ae0dcc3 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-09  Dmitry Gutov  <dgutov@yandex.ru>
+
+       * progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Return t
+       after the end of a percent literal.
+
 2013-12-09  Cameron Desautels  <camdez@gmail.com>  (tiny change)
 
        * progmodes/ruby-mode.el (ruby-forward-string): Document.  Handle
index fe36e72..af7a4d8 100644 (file)
@@ -362,8 +362,8 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
              (and (memq (char-before)
                         '(?\; ?- ?+ ?* ?/ ?: ?. ?, ?\[ ?\( ?\{ ?\\ ?& ?> ?< ?%
                           ?~ ?^))
-                  ;; Make sure it's not the end of a regexp.
-                  (not (eq (car (syntax-after (1- (point)))) 7)))
+                  ;; Not the end of a regexp or a percent literal.
+                  (not (memq (car (syntax-after (1- (point)))) '(7 15))))
              (and (eq (char-before) ?\?)
                   (equal (save-excursion (ruby-smie--backward-token)) "?"))
              (and (eq (char-before) ?=)
index a3ab73b..3c4d68a 100644 (file)
@@ -299,3 +299,6 @@ def qux
     tee
   end
 end
+
+%^abc^
+ddd