diff --git a/ChangeLog b/ChangeLog index 9cb4c7fc95..54e36477d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,11 @@ Sun Feb 17 18:10:09 2002 Nobuyoshi Nakada * class.c (rb_define_class_under): ditto. +Thu Feb 16 02:11:08 2002 Nobuyoshi Nakada + + * misc/ruby-mode.el (ruby-font-lock-keywords): fontify + instance/class/global variables start with '_'. + Fri Feb 15 14:40:38 2002 Yukihiro Matsumoto * eval.c (rb_eval): replace rb_cvar_declare() by rb_cvar_set(). diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index 38d2ee2487..956674e7d9 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -26,7 +26,7 @@ ) (defconst ruby-modifier-re - "if\\|unless\\|while\\|until" + "if\\|unless\\|while\\|until\\|rescue" ) (defconst ruby-block-mid-re @@ -856,7 +856,7 @@ An end of a defun is found by moving forward from the beginning of one." ;; variables '("\\(\\$\\([^a-zA-Z0-9 \n]\\|[0-9]\\)\\)\\W" 1 font-lock-variable-name-face) - '("\\(\\$\\|@\\|@@\\)\\(\\w\\(\\w\\|_\\)*\\|#{\\)" + '("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+" 0 font-lock-variable-name-face) ;; embedded document '(ruby-font-lock-docs @@ -873,7 +873,7 @@ An end of a defun is found by moving forward from the beginning of one." '("\\(^\\|[^:]\\)\\(:\\([-+/%&|^~`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|\\[\\]\\|\\(\\w\\|_\\)+\\([!?=]\\|\\b\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" 2 font-lock-reference-face) ;; expression expansion - '("#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}" + '("#\\({[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\|\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+\\)" 0 font-lock-variable-name-face t)) "*Additional expressions to highlight in ruby mode."))