From 154f696c1dc0685f86a757dbde32e30902034145 Mon Sep 17 00:00:00 2001 From: dimaexe Date: Tue, 14 Aug 2007 16:16:58 +0000 Subject: [PATCH] rails-compat.el (try-complete-abbrev): fixed rails-core.el (rails-core:configuration-file, :rails-core:configuration-files): created functions rails-speedbar-feature.el (rails-speedbar:roots): added migrations and configuration files to speedbar git-svn-id: svn+ssh://rubyforge.org/var/svn/emacs-rails/trunk@206 cc5033d0-740f-0410-afc7-949910e492f2 --- ChangeLog | 12 ++++++++++++ History | 14 +++++++++----- rails-compat.el | 5 ++--- rails-core.el | 9 +++++++++ rails-speedbar-feature.el | 4 +++- 5 files changed, 35 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 08b0f71..80ccfe7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,17 @@ +2007-08-11 Dmitry Galinsky + + * rails-compat.el (try-complete-abbrev): fixed + + * rails-core.el (rails-core:configuration-file, :rails-core:configuration-files): created functions + + * rails-speedbar-feature.el (rails-speedbar:roots): added + migrations and configuration files to speedbar + 2007-08-05 Dmitry Galinsky + * rails-test.el, rails-ui.el: apply patch #11998, created additional key + shortcuts (thanks Tom Ten Thij) + * rails-compat.el: apply patch #12743, replace `indent-or-complete` to `indent-and-complete` (thanks Peter Williams) diff --git a/History b/History index 9dbe2a8..67a0615 100644 --- a/History +++ b/History @@ -1,11 +1,15 @@ +SVN +* Added migrations and configuration files to speedbar. +* More shortcuts for tests. + 0.5.99.5 -* Improved `align` support in `ruby-mode` -* Fixed bug [#10613]: Wrong comparison of emacs-major-version -* Apply patch [#10532]: allows '-' to occur in the errror filepath (thanks Peter Williams) +* Improved `align` support in `ruby-mode`. +* Fixed bug [#10613]: Wrong comparison of emacs-major-version. +* Apply patch [#10532]: allows '-' to occur in the errror filepath (thanks Peter Williams). * Fixed bug [#10417]: ruby-flymake had applying only if flymake is available. -* Raise a error if emacs-rails run on old version of Emacs (less 22) -* Updated view mode of "views" +* Raise a error if emacs-rails run on old version of Emacs (less 22). +* Updated view mode of "views". * Fixed bug [#10357]: code expansion shouldn't occur in comment lines. 0.5.99.4 diff --git a/rails-compat.el b/rails-compat.el index f730fb7..58cb8f6 100644 --- a/rails-compat.el +++ b/rails-compat.el @@ -70,9 +70,8 @@ (defun try-complete-abbrev (old) (if (abbrev-expansion-point-p) - (progn - (expand-abbrev) - t) + (if (expand-abbrev) + t nil) nil)) (defun abbrev-expansion-point-p () diff --git a/rails-core.el b/rails-core.el index 24bd02e..98863a9 100644 --- a/rails-core.el +++ b/rails-core.el @@ -181,6 +181,11 @@ it does not exist, ask to create it using QUESTION as a prompt." (rails-core:model-exist-p model-name)) model-name)))) +(defun rails-core:configuration-file (file) + "Return the path to the configuration FILE." + (when file + (concat "config/" file))) + (defun rails-core:plugin-file (plugin file) "Return the path to the FILE in Rails PLUGIN." (concat "vendor/plugins/" plugin "/" file)) @@ -410,6 +415,10 @@ of migration." (replace-regexp-in-string "\\.[^.]+$" "" l)) (find-recursive-files "\\.yml$" (rails-core:file "test/fixtures/")))) +(defun rails-core:configuration-files () + "Return a files of files from config folder." + (find-recursive-files nil (rails-core:file "config/"))) + (defun rails-core:regex-for-match-view () "Return a regex to match Rails view templates. The file extensions used for views are defined in `rails-templates-list'." diff --git a/rails-speedbar-feature.el b/rails-speedbar-feature.el index 94fc0d8..af29320 100644 --- a/rails-speedbar-feature.el +++ b/rails-speedbar-feature.el @@ -4,9 +4,11 @@ ("Models" rails-core:models rails-core:model-file) ("Observers" rails-core:observers rails-core:observer-file) ("Mailers" rails-core:mailers rails-core:mailer-file) + ("Migrations" rails-core:migrations rails-core:migration-file) ("Functional Tests" rails-core:functional-tests rails-core:functional-test-file) ("Unit Tests" rails-core:unit-tests rails-core:unit-test-file) - ("Fixtures" rails-core:fixtures rails-core:fixture-file))) + ("Fixtures" rails-core:fixtures rails-core:fixture-file) + ("Configuration" rails-core:configuration-files rails-core:configuration-file))) (defvar rails-speedbar:menu-items nil) (defvar rails-speedbar:key-map