Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
rails.el (auto-mode-alist): added Rakefile to auto-mode-alist
Browse files Browse the repository at this point in the history
rails-ui.el (rails-minor-mode-test-current-method-key): created
rails-*-test-minor-mode (rails-unit-test-minor-mode rails-functional-test-minor-mode): 
	changed hotkey "C-c ." to "C-c C-c ,", the old conflicted with ECB
rails-ruby.el (flymake-ruby-load): apply flymake-mode only if
	buffer-file-name matched flymake-allowed-file-name-masks


git-svn-id: svn+ssh://rubyforge.org/var/svn/emacs-rails/trunk@166 cc5033d0-740f-0410-afc7-949910e492f2
  • Loading branch information
dimaexe committed Apr 5, 2007
1 parent 89f805f commit 171e3a3
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 14 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
@@ -1,3 +1,15 @@
2007-04-05 Dmitry Galinsky <dima.exe@gmail.com>

* rails.el (auto-mode-alist): added Rakefile to auto-mode-alist

* rails-ui.el (rails-minor-mode-test-current-method-key): created

* rails-*-test-minor-mode (rails-unit-test-minor-mode rails-functional-test-minor-mode):
changed hotkey "C-c ." to "C-c C-c ,", the old conflicted with ECB

* rails-ruby.el (flymake-ruby-load): apply flymake-mode only if
buffer-file-name matched flymake-allowed-file-name-masks

2007-04-04 Dmitry Galinsky <dima.exe@gmail.com> 2007-04-04 Dmitry Galinsky <dima.exe@gmail.com>


* rails-ruby.el (flymake-ruby-load): updated * rails-ruby.el (flymake-ruby-load): updated
Expand Down
2 changes: 2 additions & 0 deletions History
@@ -1,4 +1,6 @@
SVN SVN
* Fixed #9880: the hotkey "C-c ." conflicted with ECB, changed to "C-c C-c ,"

* New hotkeys, to easy switch without a popup menu between a * New hotkeys, to easy switch without a popup menu between a
controller or a model related files controller or a model related files
In model layout: In model layout:
Expand Down
2 changes: 1 addition & 1 deletion rails-functional-test-minor-mode.el
Expand Up @@ -30,7 +30,7 @@
"Minor mode for RubyOnRails functional tests." "Minor mode for RubyOnRails functional tests."
:lighter " FTest" :lighter " FTest"
:keymap (let ((map (rails-controller-layout:keymap :functional-test))) :keymap (let ((map (rails-controller-layout:keymap :functional-test)))
(define-key map (kbd "\C-c .") 'rails-test:run-current-method) (define-key map rails-minor-mode-test-current-method-key 'rails-test:run-current-method)
(define-key map [menu-bar rails-controller-layout run] '("Test current method" . rails-test:run-current-method)) (define-key map [menu-bar rails-controller-layout run] '("Test current method" . rails-test:run-current-method))
map) map)
(setq rails-primary-switch-func 'rails-controller-layout:switch-to-controller) (setq rails-primary-switch-func 'rails-controller-layout:switch-to-controller)
Expand Down
6 changes: 4 additions & 2 deletions rails-ruby.el
Expand Up @@ -82,8 +82,10 @@ See the variable `align-rules-list' for more details.")
"\\|" "\\|"
(mapcar 'car flymake-allowed-ruby-file-name-masks))) (mapcar 'car flymake-allowed-ruby-file-name-masks)))
(buffer-file-name))) (buffer-file-name)))
(setq flymake-allowed-file-name-masks (append flymake-allowed-file-name-masks flymake-allowed-ruby-file-name-masks)) (setq flymake-allowed-file-name-masks
(setq flymake-err-line-patterns (cons flymake-ruby-error-line-pattern-regexp flymake-err-line-patterns)) (append flymake-allowed-file-name-masks flymake-allowed-ruby-file-name-masks))
(setq flymake-err-line-patterns
(cons flymake-ruby-error-line-pattern-regexp flymake-err-line-patterns))
(flymake-mode t) (flymake-mode t)
(local-set-key (kbd "\C-c d") 'flymake-display-err-menu-for-current-line))) (local-set-key (kbd "\C-c d") 'flymake-display-err-menu-for-current-line)))


Expand Down
2 changes: 2 additions & 0 deletions rails-ui.el
Expand Up @@ -194,6 +194,8 @@
([rails ws default] '(menu-item "Start/Stop Web Server (With Default Environment)" rails-ws:toggle-start-stop)) ([rails ws default] '(menu-item "Start/Stop Web Server (With Default Environment)" rails-ws:toggle-start-stop))
) )


(defconst rails-minor-mode-test-current-method-key (kbd "\C-c \C-c ,"))

(defvar rails-minor-mode-map (make-sparse-keymap)) (defvar rails-minor-mode-map (make-sparse-keymap))


(define-keys rails-minor-mode-map (define-keys rails-minor-mode-map
Expand Down
2 changes: 1 addition & 1 deletion rails-unit-test-minor-mode.el
Expand Up @@ -30,7 +30,7 @@
"Minor mode for RubyOnRails unit tests." "Minor mode for RubyOnRails unit tests."
:lighter " UTest" :lighter " UTest"
:keymap (let ((map (rails-model-layout:keymap :unit-test))) :keymap (let ((map (rails-model-layout:keymap :unit-test)))
(define-key map (kbd "\C-c .") 'rails-test:run-current-method) (define-key map rails-minor-mode-test-current-method-key 'rails-test:run-current-method)
(define-key map [menu-bar rails-model-layout run] '("Test current method" . rails-test:run-current-method)) (define-key map [menu-bar rails-model-layout run] '("Test current method" . rails-test:run-current-method))
map) map)
(setq rails-primary-switch-func (lambda() (setq rails-primary-switch-func (lambda()
Expand Down
21 changes: 11 additions & 10 deletions rails.el
Expand Up @@ -428,19 +428,20 @@ necessary."
(if (rails-project:root) (if (rails-project:root)
(rails-minor-mode t)))) (rails-minor-mode t))))


;; helpers


(autoload 'haml-mode "haml-mode" "" t) (autoload 'haml-mode "haml-mode" "" t)


(setq auto-mode-alist (cons '("\\.rb$" . ruby-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.rb$" . ruby-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.rake$" . ruby-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.rake$" . ruby-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.haml$" . haml-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("Rakefile$" . ruby-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.rjs$" . ruby-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.haml$" . haml-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.rxml$" . ruby-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.rjs$" . ruby-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.rhtml$" . html-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.rxml$" . ruby-mode) auto-mode-alist))

(setq auto-mode-alist (cons '("\\.rhtml$" . html-mode) auto-mode-alist))
(modify-coding-system-alist 'file "\\.rb$" 'utf-8)
(modify-coding-system-alist 'file "\\.rake$" 'utf-8) (modify-coding-system-alist 'file "\\.rb$" 'utf-8)
(modify-coding-system-alist 'file "\\.rake$" 'utf-8)
(modify-coding-system-alist 'file "Rakefile$" 'utf-8)
(modify-coding-system-alist 'file (rails-core:regex-for-match-view) 'utf-8) (modify-coding-system-alist 'file (rails-core:regex-for-match-view) 'utf-8)


(provide 'rails) (provide 'rails)

0 comments on commit 171e3a3

Please sign in to comment.