0
"Path to your TAGS file inside of your rails project. See `tags-file-name'.")
0
+(defvar rinari-minor-mode-hook nil
0
+ "*Hook for customising Rinari.")
0
(defadvice find-file-in-project (around find-file-in-rinari-project activate)
0
"Wrap `find-file-in-project' to use `rinari-root' as the base of
0
@@ -264,28 +267,31 @@ With optional prefix argument just run `rgrep'."
0
rinari-minor-mode-keybindings)
0
(defun rinari-launch ()
0
- "Run `rinari-minor-mode' if inside of a rails proj
cect,
0
+ "Run `rinari-minor-mode' if inside of a rails proj
ecct,
0
otherwise turn `rinari-minor-mode' off if it is on."
0
(let* ((root (rinari-root)) (r-tags-path (concat root rinari-tags-file-name)))
0
- ;; customize toggle.el for rinari
0
- 'toggle-mapping-styles
0
- '(rinari . (("app/controllers/\\1.rb#\\2" . "test/functional/\\1_test.rb#test_\\2")
0
- ("app/controllers/\\1.rb" . "test/functional/\\1_test.rb")
0
- ("app/models/\\1.rb#\\2" . "test/unit/\\1_test.rb#test_\\2")
0
- ("app/models/\\1.rb" . "test/unit/\\1_test.rb")
0
- ("lib/\\1.rb#\\2" . "test/unit/test_\\1.rb#test_\\2")
0
- ("lib/\\1.rb" . "test/unit/test_\\1.rb"))))
0
- (setq toggle-mapping-style 'rinari)
0
- (setq toggle-mappings (toggle-style toggle-mapping-style))
0
- (setq toggle-which-function-command 'ruby-add-log-current-method)
0
- (setq toggle-method-format "def %s")
0
- (if (file-exists-p r-tags-path) (setq tags-file-name r-tags-path))
0
- (unless rinari-minor-mode (rinari-minor-mode t)))
0
- (if rinari-minor-mode (rinari-minor-mode)))))
0
+ ;; customize toggle.el for rinari
0
+ 'toggle-mapping-styles
0
+ '(rinari . (("app/controllers/\\1.rb#\\2" . "test/functional/\\1_test.rb#test_\\2")
0
+ ("app/controllers/\\1.rb" . "test/functional/\\1_test.rb")
0
+ ("app/models/\\1.rb#\\2" . "test/unit/\\1_test.rb#test_\\2")
0
+ ("app/models/\\1.rb" . "test/unit/\\1_test.rb")
0
+ ("lib/\\1.rb#\\2" . "test/unit/test_\\1.rb#test_\\2")
0
+ ("lib/\\1.rb" . "test/unit/test_\\1.rb"))))
0
+ (set (make-local-variable 'toggle-mapping-style) 'rinari)
0
+ (set (make-local-variable 'toggle-which-function-command)
0
+ 'ruby-add-log-current-method)
0
+ (set (make-local-variable 'toggle-mappings)
0
+ (toggle-style toggle-mapping-style))
0
+ (set (make-local-variable 'toggle-method-format) "def %s")
0
+ (set (make-local-variable 'tags-file-name)
0
+ (and (file-exists-p r-tags-path) r-tags-path))
0
+ (run-hooks 'rinari-minor-mode-hook)
0
+ ;; TODO: Why is there mode-toggling logic here? define-minor-mode handles that for us.
0
+ (unless rinari-minor-mode (rinari-minor-mode t)))))
0
(defvar rinari-major-modes
0
'('ruby-mode-hook 'yaml-mode-hook 'mumamo-after-change-major-mode-hook 'css-mode-hook
Comments
No one has commented yet.