diff options
| author | Dmitry Gutov | 2015-03-20 06:04:54 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2015-03-20 06:04:54 +0200 |
| commit | f74843a7f1ebc767cc67cda8981247c7e46404fd (patch) | |
| tree | b7f174e84815efd1a3ac56e7fb1c10042dcc22ce | |
| parent | a5d1f94fec6543cbf3c6e29f034c7ed53138c677 (diff) | |
| download | emacs-f74843a7f1ebc767cc67cda8981247c7e46404fd.tar.gz emacs-f74843a7f1ebc767cc67cda8981247c7e46404fd.zip | |
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 e991af9228af77356df1e4ce7e824d5140a3bf8a)
| -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 0b568929b22..eaf7c4653af 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2015-03-20 Dmitry Gutov <dgutov@yandex.ru> | ||
| 2 | |||
| 3 | * progmodes/ruby-mode.el (ruby-font-lock-keywords): Use | ||
| 4 | `font-lock-constant-face' for nil, true and false. Highlight | ||
| 5 | `self' as a keyword. (Bug#17733) | ||
| 6 | |||
| 1 | 2015-03-20 Nobuyoshi Nakada <nobu@ruby-lang.org> | 7 | 2015-03-20 Nobuyoshi Nakada <nobu@ruby-lang.org> |
| 2 | 8 | ||
| 3 | * progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Expect | 9 | * 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 9c311cdbfb6..e15105eb332 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -2013,8 +2013,9 @@ See `font-lock-syntax-table'.") | |||
| 2013 | "rescue" | 2013 | "rescue" |
| 2014 | "retry" | 2014 | "retry" |
| 2015 | "return" | 2015 | "return" |
| 2016 | "then" | 2016 | "self" |
| 2017 | "super" | 2017 | "super" |
| 2018 | "then" | ||
| 2018 | "unless" | 2019 | "unless" |
| 2019 | "undef" | 2020 | "undef" |
| 2020 | "until" | 2021 | "until" |
| @@ -2109,8 +2110,8 @@ See `font-lock-syntax-table'.") | |||
| 2109 | "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$" | 2110 | "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$" |
| 2110 | ;; Variables. | 2111 | ;; Variables. |
| 2111 | (,(concat ruby-font-lock-keyword-beg-re | 2112 | (,(concat ruby-font-lock-keyword-beg-re |
| 2112 | "\\_<\\(nil\\|self\\|true\\|false\\)\\_>") | 2113 | "\\_<\\(nil\\|true\\|false\\)\\_>") |
| 2113 | 1 font-lock-variable-name-face) | 2114 | 1 font-lock-constant-face) |
| 2114 | ;; Keywords that evaluate to certain values. | 2115 | ;; Keywords that evaluate to certain values. |
| 2115 | ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>" | 2116 | ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>" |
| 2116 | (0 font-lock-builtin-face)) | 2117 | (0 font-lock-builtin-face)) |