diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-24 02:41:57 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-24 02:41:57 +0000 |
commit | 11f5073edf137f83e907a2b3311d36131fac291c (patch) | |
tree | 667f1ddf744b9b1e76a543fed9e6bdf905801a2b /misc | |
parent | b475fa0d61643a671d5f388c91cc207ab9ec0840 (diff) | |
download | ruby-11f5073edf137f83e907a2b3311d36131fac291c.tar.gz ruby-11f5073edf137f83e907a2b3311d36131fac291c.tar.xz ruby-11f5073edf137f83e907a2b3311d36131fac291c.zip |
* misc/ruby-style.el: It is too late to set c-file-style in
c-mode-hook (at least on Emacs 23). Call c-set-style instead.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc')
-rw-r--r-- | misc/ruby-style.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/misc/ruby-style.el b/misc/ruby-style.el index 0fe4a8308..6dc444273 100644 --- a/misc/ruby-style.el +++ b/misc/ruby-style.el @@ -7,14 +7,15 @@ ;;; $Author$ ;;; created at: Thu Apr 26 13:54:01 JST 2007 ;;; -;;; sets ruby style if it seems like a source of ruby. +;;; To switch to the "ruby" style automatically if it looks like a +;;; source file of ruby, add ruby-style-c-mode to c-mode-hook: ;;; ;;; (require 'ruby-style) ;;; (add-hook 'c-mode-hook 'ruby-style-c-mode) ;;; (add-hook 'c++-mode-hook 'ruby-style-c-mode) ;;; -;;; uses ruby style always. -;;; (setq-default c-file-style "ruby") +;;; Customize the c-default-style variable to set the default style +;;; for each CC major mode. (defconst ruby-style-revision "$Revision$" "Ruby style revision string.") @@ -71,6 +72,6 @@ (case-fold-search nil)) (goto-char (point-min)) (re-search-forward "Copyright (C) .* Yukihiro Matsumoto" head t)))) - (setq c-file-style "ruby"))) + (c-set-style "ruby"))) (provide 'ruby-style) |