-
-
 ;;; EMACS --- jdw's emacs config file
 ;;;
 ;;; This is my emacs config. Hack away at it to your liking! I've copied

    flymake-easy
    flymake-jshint
    flymake-jslint
    flymake-php
    flymake-ruby
    go-mode
    js2-mode

    yasnippet)
  "A list of packages to ensure are installed at launch.")

; activate all the packages (in particular autoloads)
(package-initialize)

; fetch the list of packages available 
(unless package-archive-contents
  (package-refresh-contents))

; install the missing packages
(dolist (package default-packages)
  (unless (package-installed-p package)
    (package-install package)))

(package-install 'intero)

(add-hook 'haskell-mode-hook 'intero-mode)

;; (defun default-packages-installed-p ()
;;   (cl-loop for p in (default-packages)
;;         when (not (package-installed-p p)) do (return nil)
;;         finally (return t)))

;; (unless (default-packages-installed-p)
;;   ;; check for new packages (package versions)
;;   (message "%s" "Emacs is now refreshing its package database...")
;;   (package-refresh-contents)
;;   (message "%s" " done.")
;;   ;; install the missing packages
;;   (dolist (p default-packages)
;;     (when (not (package-installed-p p))
;;       (package-install p))))


;;;;;;;;;;;;;;;;;;;
