2 ;; y-or-n instead of yes-or-no
3 (defalias 'yes-or-no-p 'y-or-n-p)
5 ;; Don't use messages that you don't rea
6 (setq make-backup-files nil)
7 (setq initial-scratch-message "")
8 (setq inhibit-startup-message t)
11 (column-number-mode 1)
13 ;; Don't let Emacs hurt your ears
16 ;; This is bound to f11 in Emacs 24.4
17 ;; (toggle-frame-fullscreen)
19 '(initial-frame-alist (quote ((fullscreen . maximized)))))
20 ;; Who use the bar to scroll?
21 (when (display-graphic-p)
30 (add-to-list 'package-archives
31 '("melpa" . "http://melpa.milkbox.net/packages/") t)
32 (add-to-list 'package-archives
33 '("marmalade" . "http://marmalade-repo.org/packages/") t)
36 ; fetch the list of packages available
37 (unless package-archive-contents
38 (package-refresh-contents))
40 ;; make sure my list of packages are installed
41 (setq package-list '(go-mode rust-mode haskell-mode clojure-mode ghc restclient tangotango-theme cider))
43 ; install the missing packages
44 (dolist (package package-list)
45 (unless (package-installed-p package)
46 (package-install package)))
49 (load-theme 'tangotango t)
54 ;; (setq tls-program '("openssl s_client -connect %h:%p -no_ssl2 -ign_eof"))
57 (setq erc-autojoin-channels-alist
58 '((".*\\.freenode.net" "#tahoe-lafs" "#inferno" "#cat-v")
59 (".*\\.oftc.net" "#LeastAuthority")))
63 (setq erc-track-exclude-types '("JOIN" "NICK" "PART" "QUIT" "MODE"
65 "324" "329" "332" "333" "353" "477"))
66 ;; don't show any of this
67 (setq erc-hide-list '("JOIN" "PART" "QUIT" "NICK"))
72 (when (y-or-n-p "Do you want to start IRC? ")
73 (erc-tls :server "irc.freenode.net" :port 6697 :nick "rkrishnan" :full-name "Ramakrishnan Muthukrishnan")
74 (erc-tls :server "irc.oftc.net" :port 6697 :nick "rkrishnan" :full-name "Ramakrishnan Muthukrishnan")))
76 ;; switch to ERC with Ctrl+c e
77 (global-set-key (kbd "C-c e") 'start-erc) ;; ERC
80 (setenv "PATH" (concat "~/.cabal/bin:" (getenv "PATH")))
81 (add-to-list 'exec-path "~/.cabal/bin")
82 (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
83 ;; (add-hook 'haskell-mode-hook 'haskell-indent-mode)
84 ;; (add-hook 'haskell-mode-hook 'interactive-haskell-mode)
85 ;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
86 (add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
89 (autoload 'ghc-init "ghc" nil t)
90 (autoload 'ghc-debug "ghc" nil t)
91 (add-hook 'haskell-mode-hook (lambda () (ghc-init)))
93 '(haskell-process-type 'cabal-repl))
96 (setq ido-enable-flex-matching t)
97 (setq ido-everywhere t)
100 ;; disable tabs for indentation
101 (setq-default indent-tabs-mode nil)
103 ;; (require 'whitespace)
104 ;; (setq whitespace-style '(face lines-tail))
105 ;; (setq whitespace-line-column 80)
106 ;; (global-whitespace-mode t)
108 ;; ;; show trailing whitespaces
109 ;; (setq-default show-trailing-whitespace t)
110 ;; (setq-default indicate-empty-lines t)
113 (setq c-default-style "k&r"
117 (add-to-list 'load-path "~/.emacs.d/hs-lint")
119 (defun my-haskell-mode-hook ()
120 (local-set-key "\C-cl" 'hs-lint))
121 (add-hook 'haskell-mode-hook 'my-haskell-mode-hook)
124 (add-hook 'before-save-hook #'gofmt-before-save)