 
 ;; nginx mode.
 (defun my-setup-nginx ()
-  (mi-use-package-url "nginx-mode.el" "https://raw.github.com/ajc/nginx-mode/master/nginx-mode.el")
+  (elpa-require 'nginx-mode)
   (require 'nginx-mode)
   (setq nginx-indent-level 4)
   (nginx-mode)


;; yaml.
(defun my-setup-yaml ()
  (mi-use-package-url "yaml-mode.el" "https://raw.github.com/yoshiki/yaml-mode/master/yaml-mode.el")
  (yaml-mode)
  )
(add-to-list 'auto-mode-alist '("\\.ya?ml$" . my-setup-yaml))

;; lua.
(defun my-setup-lua ()
  (mi-use-package-url "lua-mode.el" "https://raw.github.com/immerrr/lua-mode/master/lua-mode.el")
  (lua-mode)
  )
(add-to-list 'auto-mode-alist '("\\.lua$" . my-setup-lua))


;; protobuf
(defun my-setup-pb ()
  (elpa-require 'protobuf-mode)
  (protobuf-mode)
  )
(add-to-list 'auto-mode-alist '("\\.proto\\'" . my-setup-pb))

;; erlang
(defun my-erlang ()
  (elpa-require 'erlang)
  (flycheck-mode)
  (add-to-list 'ac-modes 'erlang-mode)
  (add-to-list 'load-path "~/.emacs.d/lisps/distel/elisp")
