diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-06-06 06:42:23 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-06-06 06:42:23 +0000 |
commit | 7c9c33e9add999d2c9a9073de5130936e4124c9c (patch) | |
tree | 4d6d07f71d54190e66f7025d11310c82e84c736e /misc/ruby-mode.el | |
parent | dd9074111245b4c57f071a11275df34ae67192dc (diff) | |
download | ruby-7c9c33e9add999d2c9a9073de5130936e4124c9c.tar.gz |
* parse.y (aref_args): "*arg" should always be expanded by REXPAND.
* variable.c (fc_i): removed vast string allocation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc/ruby-mode.el')
-rw-r--r-- | misc/ruby-mode.el | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index fcf3d535c0..102de81b5a 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -660,24 +660,21 @@ An end of a defun is found by moving forward from the beginning of one." (cond ((featurep 'font-lock) - (or (boundp 'font-lock-variable-name-face) - (setq font-lock-variable-name-face font-lock-type-face)) - - - (add-hook 'ruby-mode-hook - '(lambda () - (make-local-variable 'font-lock-syntactic-keywords) - (setq font-lock-syntactic-keywords - '(("\\$\\([#\"'`$\\]\\)" 1 (1 . nil)) - ("\\(#\\)[{$@]" 1 (1 . nil)) - ("\\(/\\)\\([^/\n]\\|\\/\\)*\\(/\\)" - (1 (7 . ?')) - (3 (7 . ?'))) - ("^\\(=\\)begin\\(\\s \\|$\\)" 1 (7 . nil)) - ("^\\(=\\)end\\(\\s \\|$\\)" 1 (7 . nil)))) - (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults '((ruby-font-lock-keywords) nil nil)) - (setq font-lock-keywords ruby-font-lock-keywords))) + + (setq ruby-font-lock-syntactic-keywords + '(("\\$\\([#\"'`$\\]\\)" 1 (1 . nil)) + ("\\(#\\)[{$@]" 1 (1 . nil)) + ("\\(/\\)\\([^/\n]\\|\\/\\)*\\(/\\)" + (1 (7 . ?')) + (3 (7 . ?'))) + ("^\\(=\\)begin\\(\\s \\|$\\)" 1 (7 . nil)) + ("^\\(=\\)end\\(\\s \\|$\\)" 1 (7 . nil)))) + (put major-mode 'font-lock-defaults + '((ruby-font-lock-keywords) + nil nil nil + beginning-of-line + (font-lock-syntactic-keywords + . ruby-font-lock-syntactic-keywords))) (defun ruby-font-lock-docs (limit) (if (re-search-forward "^=begin\\(\\s \\|$\\)" limit t) |