Skip to content

Commit

Permalink
Use MELPA for everything and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ns476 committed Sep 27, 2014
1 parent f18e015 commit 15a338e
Show file tree
Hide file tree
Showing 50 changed files with 54 additions and 36,515 deletions.
54 changes: 54 additions & 0 deletions .emacs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)

(defun with-pkg (pkgname args)
(when (not package-archive-contents)
(package-refresh-contents))
(when (not (require pkgname nil t))
(package-install pkgname)
(require pkgname nil t))
(eval args))

(defun add-pkgs ()
(with-pkg 'zenburn-theme
'())
(with-pkg 'yaml-mode
'())
(with-pkg 'haskell-mode
'(progn
(add-to-list 'auto-mode-alist '("\\.hs\\'" . haskell-mode))
(add-hook 'haskell-mode-hook
'haskell-indentation-mode)
(add-hook 'haskell-mode-hook
(lambda ()
(local-set-key "\C-x\C-s"
(lambda ()
(interactive)
(save-buffer)
(haskell-mode-stylish-buffer)
(save-buffer)))))))

(with-pkg 'flymake-hlint
'(add-hook 'haskell-mode-hook 'flymake-hlint-load))
(with-pkg 'ethan-wspace
'(progn
(set-variable 'require-final-newline nil)
(set-variable 'mode-require-final-newline nil)
(global-ethan-wspace-mode))))

(add-hook 'after-init-hook 'add-pkgs)

(setq inhibit-splash-screen t)

(setq require-final-newline t)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(setq-default indent-tabs-mode nil)

(when window-system
(tool-bar-mode 0)
(scroll-bar-mode 0))

(menu-bar-mode 0)

(show-paren-mode 1)
Loading

0 comments on commit 15a338e

Please sign in to comment.