summaryrefslogtreecommitdiff
path: root/misc/ruby-mode.el
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-11-03 11:04:35 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-11-03 11:04:35 +0000
commitaae36756dcc4d5debcaabd03379796bc41360bc4 (patch)
treeff4ed4df6473229d846ff4f658094fcf66c4c744 /misc/ruby-mode.el
parentc960141333a9bc384bafbcfaa49672e48677d6dd (diff)
* object.c (Init_Object): added Object#object_id, new name for
Object#id. [new] * object.c (rb_obj_id_obsolete): give warning for Object#id. * numeric.c (fix_intern): added Fixnum#to_sym. [new] * object.c (sym_to_sym): rename from Symbol#intern * enum.c (enum_zip): added Enumerable#zip. [new] * array.c (rb_ary_zip): added Array#zip. * error.c (init_syserr): remove sys_nerr dependency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc/ruby-mode.el')
-rw-r--r--misc/ruby-mode.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index 411e4af..408b123 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -866,6 +866,10 @@ An end of a defun is found by moving forward from the beginning of one."
(defvar ruby-font-lock-keywords
(list
+ ;; functions
+ '("^\\s *def\\s +\\([^( ]+\\)"
+ 1 font-lock-function-name-face)
+ ;; keywords
(cons (concat
"\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\("
(mapconcat
@@ -925,9 +929,6 @@ An end of a defun is found by moving forward from the beginning of one."
;; constants
'("\\(^\\|[^_]\\)\\b\\([A-Z]+\\(\\w\\|_\\)*\\)"
2 font-lock-type-face)
- ;; functions
- '("^\\s *def\\s +\\([^( ]+\\)"
- 1 font-lock-function-name-face)
;; symbols
'("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|\\[\\]=?\\|\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)"
2 font-lock-reference-face)