From 18d801db79f92e4bdb1a418f2e2f04fd1294c061 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Mon, 28 Jan 2013 06:07:42 +0400 Subject: [PATCH] * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight nested constants, too. \_< broke that. --- lisp/ChangeLog | 2 ++ lisp/progmodes/ruby-mode.el | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7b37b3d21b3..3e527860c8d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,6 +4,8 @@ checks made superfluous by the \_< operator. * progmodes/ruby-mode.el (ruby-move-to-block): Work with (maybe temporarily) broken indentation. + * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight + nested constants, too. \_< broke that. 2013-01-27 Nobuyoshi Nakada diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 2c8a5ee4a13..19d1ffe0a3b 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1613,7 +1613,7 @@ See `font-lock-syntax-table'.") '("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+" 0 font-lock-variable-name-face) ;; constants - '("\\_<\\([A-Z]+\\(\\w\\|_\\)*\\)" + '("\\(?:\\_<\\|::\\)\\([A-Z]+\\(\\w\\|_\\)*\\)" 1 font-lock-type-face) '("\\(^\\s *\\|[\[\{\(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" 2 font-lock-constant-face) ;; expression expansion -- 2.39.2