From 7c9c33e9add999d2c9a9073de5130936e4124c9c Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 6 Jun 2001 06:42:23 +0000 Subject: * 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 --- misc/ruby-mode.el | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) (limited to 'misc') 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) -- cgit v1.2.3