From: Dmitry Gutov Date: Tue, 9 Jul 2013 01:17:48 +0000 (+0400) Subject: * lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Remove extra X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1880 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=70c46b281688a5a04097c56e651282a657c38494;p=emacs.git * 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c113aeac11b..03b4e4e6519 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2013-07-09 Dmitry Gutov + + * 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 * faces.el (tty-setup-hook): Declare the hook. 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.")