summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-17 15:31:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-17 15:31:37 +0000
commit4dd348b2b49a668172fe9cd2e93a1e054682f773 (patch)
tree2ce453e58a6cab1b007cee3b78662a453641a670 /misc
parent21d0c3b815b16713b31522c14ebb52e815224ec3 (diff)
* misc/ruby-mode.el (ruby-font-lock-keywords): fontify
instance/class/global variables start with '_'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc')
-rw-r--r--misc/ruby-mode.el6
1 files changed, 3 insertions, 3 deletions
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."))