Commit f74843a7 authored by Dmitry Gutov's avatar Dmitry Gutov

Backport: ruby-mode: Change faces used for self, true, false and nil

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.

(cherry picked from commit e991af92)
parent a5d1f94f
2015-03-20 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-20 Nobuyoshi Nakada <nobu@ruby-lang.org> 2015-03-20 Nobuyoshi Nakada <nobu@ruby-lang.org>
* progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Expect * progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Expect
......
...@@ -2013,8 +2013,9 @@ See `font-lock-syntax-table'.") ...@@ -2013,8 +2013,9 @@ See `font-lock-syntax-table'.")
"rescue" "rescue"
"retry" "retry"
"return" "return"
"then" "self"
"super" "super"
"then"
"unless" "unless"
"undef" "undef"
"until" "until"
...@@ -2109,8 +2110,8 @@ See `font-lock-syntax-table'.") ...@@ -2109,8 +2110,8 @@ See `font-lock-syntax-table'.")
"\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$" "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$"
;; Variables. ;; Variables.
(,(concat ruby-font-lock-keyword-beg-re (,(concat ruby-font-lock-keyword-beg-re
"\\_<\\(nil\\|self\\|true\\|false\\)\\_>") "\\_<\\(nil\\|true\\|false\\)\\_>")
1 font-lock-variable-name-face) 1 font-lock-constant-face)
;; Keywords that evaluate to certain values. ;; Keywords that evaluate to certain values.
("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>" ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>"
(0 font-lock-builtin-face)) (0 font-lock-builtin-face))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment