 ;;          :delimiter-mode nil)))
 ;;      (mmm-add-mode-ext-class 'ruby-mode "\\.rb\\'" 'ruby-heredoc-sql)))
 
+;(add-to-list 'mmm-set-file-name-for-modes 'ruby-mode)
 
-;;----------------------------------------------------------------------------
-;; Ruby - compilation
-;;----------------------------------------------------------------------------
-
-; run the current buffer using Shift-F7
-(add-hook 'ruby-mode-hook (lambda () (local-set-key [S-f7] 'ruby-compilation-this-buffer)))
-; run the current test function using F8 key
-(add-hook 'ruby-mode-hook (lambda () (local-set-key [f7] 'ruby-compilation-this-test)))
-
-(add-hook 'ruby-mode-hook (lambda () (local-set-key [f6] 'recompile)))
-
-
--
-
-;; Stupidly the non-bundled ruby-mode isn't a derived mode of
-;; prog-mode: we run the latter's hooks anyway in that case.
-(add-hook 'ruby-mode-hook
-          (lambda ()
-            (unless (derived-mode-p 'prog-mode)
-              (run-hooks 'prog-mode-hook))))
 
 
 (provide 'init-ruby-mode)

     (define-key ruby-mode-map (kbd "RET") 'reindent-then-newline-and-indent)
     (define-key ruby-mode-map (kbd "TAB") 'indent-for-tab-command)))


;;----------------------------------------------------------------------------
;; Ruby - flymake
;;----------------------------------------------------------------------------
(add-hook 'ruby-mode-hook 'flymake-ruby-load)


;;----------------------------------------------------------------------------
;; Ruby - robe
;;----------------------------------------------------------------------------
(add-hook 'ruby-mode-hook 'robe-mode)
(add-hook 'robe-mode-hook
          (lambda ()

            (set-auto-complete-as-completion-at-point-function)))



;;; ri support
(require-package 'yari)
(defalias 'ri 'yari)



;;; YAML

(require-package 'yaml-mode)
(require-package 'flymake-yaml)
(add-hook 'yaml-mode-hook 'flymake-yaml-load)



;;; Rails
(require-package 'rinari)
(eval-after-load 'rinari
  '(diminish 'rinari-minor-mode "Rin"))
(require-package 'haml-mode)



;;; ERB
(require-package 'mmm-mode)
(defun sanityinc/ensure-mmm-erb-loaded ()
  (require 'mmm-erb))

