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?
19 (when (display-graphic-p)
28 (add-to-list 'package-archives
29 '("melpa" . "http://melpa.milkbox.net/packages/") t)
30 (add-to-list 'package-archives
31 '("marmalade" . "http://marmalade-repo.org/packages/") t)
34 ; fetch the list of packages available
35 (unless package-archive-contents
36 (package-refresh-contents))
38 ;; make sure my list of packages are installed
39 (setq package-list '(rust-mode haskell-mode go-mode monokai-theme ghc))
41 ; install the missing packages
42 (dolist (package package-list)
43 (unless (package-installed-p package)
44 (package-install package)))
47 (load-theme 'monokai t)
53 (setq erc-autojoin-channels-alist
54 '((".*\\.freenode.net" "#tahoe-lafs")
55 (".*\\.oftc.net" "#LeastAuthority")))
59 (setq erc-track-exclude-types '("JOIN" "NICK" "PART" "QUIT" "MODE"
61 "324" "329" "332" "333" "353" "477"))
62 ;; don't show any of this
63 (setq erc-hide-list '("JOIN" "PART" "QUIT" "NICK"))
68 (when (y-or-n-p "Do you want to start IRC? ")
69 (erc :server "irc.freenode.net" :port 6667 :nick "rkrishnan" :full-name "Ramakrishnan Muthukrishnan")
70 (erc :server "irc.oftc.net" :port 6667 :nick "rkrishnan" :full-name "Ramakrishnan Muthukrishnan")))
72 ;; switch to ERC with Ctrl+c e
73 (global-set-key (kbd "C-c e") 'start-erc) ;; ERC
76 (setenv "PATH" (concat "~/.cabal/bin:" (getenv "PATH")))
77 (add-to-list 'exec-path "~/.cabal/bin")
78 (add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
81 (add-hook 'tuareg-mode-hook 'tuareg-imenu-set-imenu)
83 (append '(("\\.ml[ily]?$" . tuareg-mode)
84 ("\\.topml$" . tuareg-mode))
86 (autoload 'utop-setup-ocaml-buffer "utop" "Toplevel for OCaml" t)
87 (add-hook 'tuareg-mode-hook 'utop-setup-ocaml-buffer)
88 (add-hook 'tuareg-mode-hook 'merlin-mode)
89 ;; Start merlin on ocaml files
90 (add-hook 'caml-mode-hook 'merlin-mode t)
91 ;; Enable auto-complete
92 (setq merlin-use-auto-complete-mode 'easy)
93 ;; Use opam switch to lookup ocamlmerlin binary
94 (setq merlin-command 'opam)
95 (setq merlin-error-after-save nil)
98 ;; (add-to-list 'load-path "/Users/ramakrishnanm/.opam/4.02.1/share/emacs/site-lisp")
99 ;; (require 'ocp-indent)
102 (autoload 'ghc-init "ghc" nil t)
103 (autoload 'ghc-debug "ghc" nil t)
104 (add-hook 'haskell-mode-hook (lambda () (ghc-init)))