Fix bug#17097
authorDmitry Gutov <dgutov@yandex.ru>
Thu, 27 Mar 2014 06:53:13 +0000 (08:53 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Thu, 27 Mar 2014 06:53:13 +0000 (08:53 +0200)
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function):
Don't propertize `?' or `!' as symbol constituent when after
colon.

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

index cb25674..ff76cad 100644 (file)
@@ -1,3 +1,9 @@
+2014-03-27  Dmitry Gutov  <dgutov@yandex.ru>
+
+       * progmodes/ruby-mode.el (ruby-syntax-propertize-function):
+       Don't propertize `?' or `!' as symbol constituent when after
+       colon.  (Bug#17097)
+
 2014-03-27  Juanma Barranquero  <lekktu@gmail.com>
 
        * frameset.el (frameset--restore-frame): Remove workaround for bug#14795
index 2b8f2fa..7219221 100644 (file)
@@ -1812,6 +1812,7 @@ It will be properly highlighted even when the call omits parens.")
       ("[!?]"
        (0 (unless (save-excursion
                     (or (nth 8 (syntax-ppss (match-beginning 0)))
+                        (eq (char-before) ?:)
                         (let (parse-sexp-lookup-properties)
                           (zerop (skip-syntax-backward "w_")))
                         (memq (preceding-char) '(?@ ?$))))
index 9948243..fb341ee 100644 (file)
@@ -148,6 +148,11 @@ if something == :==
   )
 end
 
+# Bug#17097
+if x == :!=
+  something
+end
+
 # Example from http://www.ruby-doc.org/docs/ProgrammingRuby/html/language.html
 d = 4 + 5 +      # no '\' needed
     6 + 7