From 70c46b281688a5a04097c56e651282a657c38494 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Tue, 9 Jul 2013 05:17:48 +0400 Subject: [PATCH] * 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. --- lisp/ChangeLog | 7 +++++++ lisp/progmodes/ruby-mode.el | 9 ++++----- 2 files changed, 11 insertions(+), 5 deletions(-) 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.") -- 2.39.2