+2013-07-09 Dmitry Gutov <dgutov@yandex.ru>
+
+ * 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.
+
2013-07-08 Stefan Monnier <monnier@iro.umontreal.ca>
* faces.el (tty-setup-hook): Declare the hook.
(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
"\\(^\\|[^.@$]\\|\\.\\.\\)\\("
"warn"
;; keyword-like private methods on Module
"alias_method"
- "autoload"
"attr"
"attr_accessor"
"attr_reader"
;; 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.")