diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2016-03-19 00:37:09 +0200 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2016-03-19 00:37:54 +0200 |
commit | 26f9c5075ff273013418a66b70fae477301d41d5 (patch) | |
tree | a6b4882e27ccafcdcef77ba1d0258ebe87041d26 /lisp | |
parent | 413e73b5dbce8dc89f2c3b9f4f1441fdf931c77d (diff) | |
download | emacs-26f9c5075ff273013418a66b70fae477301d41d5.tar.gz |
Fixup the "normal" matcher; highlight global var symbols, too
* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight
operator name symbols with the "normal" matcher (it actually
needed updating). Highlight global variable symbols, too.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/progmodes/ruby-mode.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 2389f742937..972bf99145e 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -2173,7 +2173,7 @@ See `font-lock-syntax-table'.") 'font-lock-string-face))) ;; Perl-ish keywords. "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$" - ;; Variables. + ;; Singleton objects. (,(concat ruby-font-lock-keyword-beg-re "\\_<\\(nil\\|true\\|false\\)\\_>") 1 font-lock-constant-face) @@ -2181,7 +2181,7 @@ See `font-lock-syntax-table'.") ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>" (0 font-lock-builtin-face)) ;; Symbols. - ("\\(^\\|[^:]\\)\\(:@?\\(?:\\w\\|_\\)+\\)\\([!?=]\\)?" + ("\\(^\\|[^:]\\)\\(:@\\{0,2\\}\\(?:\\sw\\|\\s_\\)+\\)" (2 font-lock-constant-face) (3 (unless (and (eq (char-before (match-end 3)) ?=) (eq (char-after (match-end 3)) ?>)) |