| 1 |
;;; rails-features.el ---
|
| 2 |
|
| 3 |
;; Copyright (C) 2006 Dmitry Galinsky <dima dot exe at gmail dot com>
|
| 4 |
|
| 5 |
;; Authors: Dmitry Galinsky <dima dot exe at gmail dot com>
|
| 6 |
|
| 7 |
;; Keywords: ruby rails languages oop
|
| 8 |
;; $URL: svn+ssh://rubyforge/var/svn/emacs-rails/trunk/rails-ruby.el $
|
| 9 |
;; $Id: rails-ruby.el 166 2007-04-05 17:44:57Z dimaexe $
|
| 10 |
|
| 11 |
;;; License
|
| 12 |
|
| 13 |
;; This program is free software; you can redistribute it and/or
|
| 14 |
;; modify it under the terms of the GNU General Public License
|
| 15 |
;; as published by the Free Software Foundation; either version 2
|
| 16 |
;; of the License, or (at your option) any later version.
|
| 17 |
|
| 18 |
;; This program is distributed in the hope that it will be useful,
|
| 19 |
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 20 |
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 21 |
;; GNU General Public License for more details.
|
| 22 |
|
| 23 |
;; You should have received a copy of the GNU General Public License
|
| 24 |
;; along with this program; if not, write to the Free Software
|
| 25 |
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
| 26 |
|
| 27 |
;;; Code:
|
| 28 |
|
| 29 |
(defcustom rails-features-enabled
|
| 30 |
'(rails-snippets-feature
|
| 31 |
rails-speedbar-feature)
|
| 32 |
"List of enabled features. NOTE: restart emacs to make changes take effect."
|
| 33 |
:group 'rails
|
| 34 |
:type '(repeat symbol))
|
| 35 |
|
| 36 |
(defvar rails-features:installed-p nil)
|
| 37 |
|
| 38 |
(defun rails-features:install ()
|
| 39 |
(unless rails-features:installed-p
|
| 40 |
(dolist (feature rails-features-enabled)
|
| 41 |
(if (require feature nil t)
|
| 42 |
(apply
|
| 43 |
(intern (concat (symbol-name feature) ":install"))
|
| 44 |
(list))
|
| 45 |
(message "unable to load feature `%s'" feature)))
|
| 46 |
(setq rails-features:installed-p t)))
|
| 47 |
|
| 48 |
(provide 'rails-features) |