diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2015-03-08 22:09:32 +0200 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2015-03-08 22:10:45 +0200 |
commit | e991af9228af77356df1e4ce7e824d5140a3bf8a (patch) | |
tree | 84e999ea62e5f95a95db25131a41aaaca4fbb57f | |
parent | d15317cc1750b116467fb5178250be27fd752bd0 (diff) | |
download | emacs-e991af9228af77356df1e4ce7e824d5140a3bf8a.tar.gz |
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.
-rw-r--r-- | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/progmodes/ruby-mode.el | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 60f5dfcdb7c..5f26239ecdc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 4307109f654..4abc413f636 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -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)) |