ruby-changes:4773
From: ko1@a...
Date: Fri, 2 May 2008 15:18:07 +0900 (JST)
Subject: [ruby-changes:4773] matz - Ruby:r16267 (ruby_1_8): misc/ruby-mode.el: commit miss.
matz 2008-05-02 15:17:56 +0900 (Fri, 02 May 2008) New Revision: 16267 Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/misc/ruby-mode.el Log: misc/ruby-mode.el: commit miss. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=16267&r2=16266&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/misc/ruby-mode.el?r1=16267&r2=16266&diff_format=u Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 16266) +++ ruby_1_8/ChangeLog (revision 16267) @@ -1,3 +1,8 @@ +Fri May 2 14:52:33 2008 Yukihiro Matsumoto <matz@r...> + + * misc/ruby-mode.el: move fontifying code from hook. a patch from + Phil Hagelberg <phil at hagelb.org> in [ruby-core:16636]. + Fri May 2 13:47:51 2008 Yukihiro Matsumoto <matz@r...> * re.c (match_select): restore previous behavior of MatchData#select. Index: ruby_1_8/misc/ruby-mode.el =================================================================== --- ruby_1_8/misc/ruby-mode.el (revision 16266) +++ ruby_1_8/misc/ruby-mode.el (revision 16267) @@ -255,6 +255,11 @@ (make-local-variable 'add-log-current-defun-function) (setq add-log-current-defun-function 'ruby-add-log-current-method) + (set (make-local-variable 'font-lock-defaults) '((ruby-font-lock-keywords) nil nil)) + (set (make-local-variable 'font-lock-keywords) ruby-font-lock-keywords) + (set (make-local-variable 'font-lock-syntax-table) ruby-font-lock-syntax-table) + (set (make-local-variable 'font-lock-syntactic-keywords) ruby-font-lock-syntactic-keywords) + (run-mode-hooks 'ruby-mode-hook)) (defun ruby-current-indentation () @@ -1020,24 +1025,13 @@ ("^\\(=\\)begin\\(\\s \\|$\\)" 1 (7 . nil)) ("^\\(=\\)end\\(\\s \\|$\\)" 1 (7 . nil)))) - (cond ((featurep 'xemacs) - (put 'ruby-mode 'font-lock-defaults - '((ruby-font-lock-keywords) - nil nil nil - beginning-of-line - (font-lock-syntactic-keywords - . ruby-font-lock-syntactic-keywords)))) - (t - (add-hook 'ruby-mode-hook - '(lambda () - (make-local-variable 'font-lock-defaults) - (make-local-variable 'font-lock-keywords) - (make-local-variable 'font-lock-syntax-table) - (make-local-variable 'font-lock-syntactic-keywords) - (setq font-lock-defaults '((ruby-font-lock-keywords) nil nil)) - (setq font-lock-keywords ruby-font-lock-keywords) - (setq font-lock-syntax-table ruby-font-lock-syntax-table) - (setq font-lock-syntactic-keywords ruby-font-lock-syntactic-keywords))))) + (if (featurep 'xemacs) + (put 'ruby-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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/