* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Remove extra
authorDmitry Gutov <dgutov@yandex.ru>
Tue, 9 Jul 2013 01:17:48 +0000 (05:17 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Tue, 9 Jul 2013 01:17:48 +0000 (05:17 +0400)
"autoload".  Remove "warn lower camel case" section, previously
commented out.  Highlight negation char.  Do not highlight the
target in singleton method definitions.

lisp/ChangeLog
lisp/progmodes/ruby-mode.el

index c113aea..03b4e4e 100644 (file)
@@ -1,3 +1,10 @@
+2013-07-09  Dmitry Gutov  <dgutov@yandex.ru>
+
+       * progmodes/ruby-mode.el (ruby-font-lock-keywords): Remove extra
+       "autoload".  Remove "warn lower camel case" section, previously
+       commented out.  Highlight negation char.  Do not highlight the
+       target in singleton method definitions.
+
 2013-07-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * faces.el (tty-setup-hook): Declare the hook.
index 5f92d19..b873606 100644 (file)
@@ -1721,7 +1721,7 @@ See `font-lock-syntax-table'.")
 (defconst ruby-font-lock-keywords
   (list
    ;; functions
-   '("^\\s *def\\s +\\([^( \t\n]+\\)"
+   '("^\\s *def\\s +\\(?:[^( \t\n.]*\\.\\)?\\([^( \t\n]+\\)"
      1 font-lock-function-name-face)
    (list (concat
           "\\(^\\|[^.@$]\\|\\.\\.\\)\\("
@@ -1809,7 +1809,6 @@ See `font-lock-syntax-table'.")
              "warn"
              ;; keyword-like private methods on Module
              "alias_method"
-             "autoload"
              "attr"
              "attr_accessor"
              "attr_reader"
@@ -1855,9 +1854,9 @@ See `font-lock-syntax-table'.")
    ;; expression expansion
    '(ruby-match-expression-expansion
      2 font-lock-variable-name-face t)
-   ;; warn lower camel case
-                                        ;'("\\<[a-z]+[a-z0-9]*[A-Z][A-Za-z0-9]*\\([!?]?\\|\\>\\)"
-                                        ;  0 font-lock-warning-face)
+   ;; negation char
+   '("[^[:alnum:]_]\\(!\\)[^=]"
+     1 font-lock-negation-char-face)
    )
   "Additional expressions to highlight in Ruby mode.")