1 ;; Prevent the cursor from blinking
4 ;; y-or-n instead of yes-or-no
5 (defalias 'yes-or-no-p 'y-or-n-p)
7 ;; Don't use messages that you don't rea
8 (setq make-backup-files nil)
9 (setq initial-scratch-message "")
10 (setq inhibit-startup-message t)
11 ;; Don't let Emacs hurt your ears
14 ;; This is bound to f11 in Emacs 24.4
15 ;; (toggle-frame-fullscreen)
17 '(initial-frame-alist (quote ((fullscreen . maximized)))))
18 ;; Who use the bar to scroll?
26 (add-to-list 'package-archives
27 '("melpa" . "http://melpa.milkbox.net/packages/") t)
28 (add-to-list 'package-archives
29 '("marmalade" . "http://marmalade-repo.org/packages/") t)
32 ; fetch the list of packages available
33 (unless package-archive-contents
34 (package-refresh-contents))
36 ;; make sure my list of packages are installed
37 (setq package-list '(rust-mode haskell-mode monokai-theme racket-mode clojure-mode cider paredit go-mode))
39 ; install the missing packages
40 (dolist (package package-list)
41 (unless (package-installed-p package)
42 (package-install package)))
45 (load-theme 'monokai t)
51 (setq erc-autojoin-channels-alist
52 '((".*\\.freenode.net" "#tahoe-lafs")
53 (".*\\.oftc.net" "#LeastAuthority")))
57 (setq erc-track-exclude-types '("JOIN" "NICK" "PART" "QUIT" "MODE"
59 "324" "329" "332" "333" "353" "477"))
60 ;; don't show any of this
61 (setq erc-hide-list '("JOIN" "PART" "QUIT" "NICK"))
66 (when (y-or-n-p "Do you want to start IRC? ")
67 (erc :server "irc.freenode.net" :port 6667 :nick "rkrishnan" :full-name "Ramakrishnan Muthukrishnan")
68 (erc :server "irc.oftc.net" :port 6667 :nick "rkrishnan" :full-name "Ramakrishnan Muthukrishnan")))
70 ;; switch to ERC with Ctrl+c e
71 (global-set-key (kbd "C-c e") 'start-erc) ;; ERC
74 (add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
77 (add-hook 'tuareg-mode-hook 'tuareg-imenu-set-imenu)
79 (append '(("\\.ml[ily]?$" . tuareg-mode)
80 ("\\.topml$" . tuareg-mode))
82 (autoload 'utop-setup-ocaml-buffer "utop" "Toplevel for OCaml" t)
83 (add-hook 'tuareg-mode-hook 'utop-setup-ocaml-buffer)
84 (add-hook 'tuareg-mode-hook 'merlin-mode)
85 ;; Start merlin on ocaml files
86 (add-hook 'caml-mode-hook 'merlin-mode t)
87 ;; Enable auto-complete
88 (setq merlin-use-auto-complete-mode 'easy)
89 ;; Use opam switch to lookup ocamlmerlin binary
90 (setq merlin-command 'opam)
91 (setq merlin-error-after-save nil)