]> git.eshelyaron.com Git - emacs.git/commitdiff
ruby-mode: Change faces used for self, true, false and nil
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 8 Mar 2015 20:09:32 +0000 (22:09 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 8 Mar 2015 20:10:45 +0000 (22:10 +0200)
Fixes: debbugs:17733
* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Use
`font-lock-constant-face' for nil, true and false.  Highlight
`self' as a keyword.

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

index 60f5dfcdb7c258458fbabfc73d804b7fc55a3871..5f26239ecdce491788bfe78f13f61917a0589061 100644 (file)
@@ -1,3 +1,9 @@
+2015-03-08  Dmitry Gutov  <dgutov@yandex.ru>
+
+       * progmodes/ruby-mode.el (ruby-font-lock-keywords): Use
+       `font-lock-constant-face' for nil, true and false.  Highlight
+       `self' as a keyword.  (Bug#17733)
+
 2015-03-08  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 
        * progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Expect
index 4307109f65478f45dc33b76990a36ecc11258bf9..4abc413f636d21ac29ee10d0d950933d6cb746bc 100644 (file)
@@ -2053,8 +2053,9 @@ See `font-lock-syntax-table'.")
           "rescue"
           "retry"
           "return"
-          "then"
+          "self"
           "super"
+          "then"
           "unless"
           "undef"
           "until"
@@ -2149,8 +2150,8 @@ See `font-lock-syntax-table'.")
     "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$"
     ;; Variables.
     (,(concat ruby-font-lock-keyword-beg-re
-              "\\_<\\(nil\\|self\\|true\\|false\\)\\_>")
-     1 font-lock-variable-name-face)
+              "\\_<\\(nil\\|true\\|false\\)\\_>")
+     1 font-lock-constant-face)
     ;; Keywords that evaluate to certain values.
     ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>"
      (0 font-lock-builtin-face))