   (define-key haskell-mode-map (kbd "C-c C-?") 'haskell-process-do-info))
 
 ;; ruby ;;
+;; replace normal ruby mode
+(defalias 'ruby-mode 'enh-ruby-mode)
 ;; enhanced ruby mode
-(setup "enh-ruby-mode"
+(setup-lazy '(ruby-mode enh-ruby-mode) "enh-ruby-mode"
   (setq enh-ruby-program "~/.rbenv/shims/ruby")
   (add-to-list 'interpreter-mode-alist '("ruby" . enh-ruby-mode))
   ;; replace normal ruby mode

    ))

;; markdown
(setup "markdown-mode"
  (setq markdown-command "pandoc --smart -f markdown -t html")
  (add-to-list 'auto-mode-alist '("\\.pdc$" . markdown-mode))
  (add-to-list 'auto-mode-alist '("\\.mkd$" . markdown-mode))
  (add-to-list 'auto-mode-alist '("\\.md$" . markdown-mode))
  (add-to-list 'auto-mode-alist '("\\.markdown$" . markdown-mode))
  (add-to-list 'auto-mode-alist '("\\bREADME$" . markdown-mode))
  (add-to-list 'auto-mode-alist '("\\.page$" . markdown-mode))
  ;; add pandoc hook
  (add-hook 'markdown-mode-hook 'turn-on-pandoc)
  (add-hook 'markdown-mode-hook
            (lambda()
              (add-to-list 'ac-sources 'ac-source-math-latex))))

;; yaml
(setup "yaml-mode"
  (add-to-list 'auto-mode-alist '("\\.yaml$" . yaml-mode))
  (add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode)))

;; org-mode
(setq load-path (cons "~/.emacs.d/site-lisp/org-mode/lisp" load-path))
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
;; loaded so that we can diminish it later
(setup "org-indent"
  ;; proper indentation / folding
  (setq org-startup-indented t)
  (setq org-hide-leading-stars t)

    (define-key enh-ruby-mode-map (kbd "C-c ?") 'yari)) 
  (setup "ruby-block" ; show what block an end belongs to
    (ruby-block-mode t)
    (setq ruby-block-highlight-toggle t))
  ;; erb
  (setup-lazy '(rhtml-mode)"rhtml-mode")
  (add-to-list 'auto-mode-alist '("\\.erb$" . rhtml-mode)))

;; Sometimes you have to
(setup-lazy '(php-mode) "php-mode")
(add-to-list 'auto-mode-alist '("\\.php$" . php-mode))

;; javascript
(setup-lazy '(js2-mode) "js2-mode")
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))

;; lua
(setup-lazy '(lua-mode) "lua-mode"
  (setq lua-indent-level 2))

;; (s)css
(setup-lazy '(scss-mode) "scss-mode"
  (setq scss-compile-at-save nil))
(setup-lazy '(css-mode) "css-mode"
  (setq css-indent-level 2))

;; eldoc, ie function signatures in the minibuffer
(setup-lazy '(turn-on-eldoc-mode) "eldoc"
