diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2013-07-09 05:17:48 +0400 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2013-07-09 05:17:48 +0400 |
commit | 70c46b281688a5a04097c56e651282a657c38494 (patch) | |
tree | 678e6336af90c833fc99e3b98dee2e32b1e1ce65 /lisp/progmodes | |
parent | c17b81a7a54e9d206a150a978c62918e5380ba8e (diff) | |
download | emacs-70c46b281688a5a04097c56e651282a657c38494.tar.gz |
* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Remove extra
"autoload". Remove "warn lower camel case" section, previously
commented out. Highlight negation char. Do not highlight the
target in singleton method definitions.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r-- | lisp/progmodes/ruby-mode.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 5f92d197a66..b873606286a 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1721,7 +1721,7 @@ See `font-lock-syntax-table'.") (defconst ruby-font-lock-keywords (list ;; functions - '("^\\s *def\\s +\\([^( \t\n]+\\)" + '("^\\s *def\\s +\\(?:[^( \t\n.]*\\.\\)?\\([^( \t\n]+\\)" 1 font-lock-function-name-face) (list (concat "\\(^\\|[^.@$]\\|\\.\\.\\)\\(" @@ -1809,7 +1809,6 @@ See `font-lock-syntax-table'.") "warn" ;; keyword-like private methods on Module "alias_method" - "autoload" "attr" "attr_accessor" "attr_reader" @@ -1855,9 +1854,9 @@ See `font-lock-syntax-table'.") ;; expression expansion '(ruby-match-expression-expansion 2 font-lock-variable-name-face t) - ;; warn lower camel case - ;'("\\<[a-z]+[a-z0-9]*[A-Z][A-Za-z0-9]*\\([!?]?\\|\\>\\)" - ; 0 font-lock-warning-face) + ;; negation char + '("[^[:alnum:]_]\\(!\\)[^=]" + 1 font-lock-negation-char-face) ) "Additional expressions to highlight in Ruby mode.") |