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 (setq-default cursor-type '(bar . 2))
14 (column-number-mode 1)
16 ;; Don't let Emacs hurt your ears
19 ;; This is bound to f11 in Emacs 24.4
20 ;; (toggle-frame-fullscreen)
22 '(initial-frame-alist (quote ((fullscreen . maximized)))))
23 ;; Who use the bar to scroll?
24 (when (display-graphic-p)
33 (add-to-list 'package-archives
34 '("melpa" . "http://melpa.milkbox.net/packages/") t)
35 (add-to-list 'package-archives
36 '("marmalade" . "http://marmalade-repo.org/packages/") t)
39 ; fetch the list of packages available
40 (unless package-archive-contents
41 (package-refresh-contents))
43 ;; make sure my list of packages are installed
44 (setq package-list '(go-mode
56 ; install the missing packages
57 (dolist (package package-list)
58 (unless (package-installed-p package)
59 (package-install package)))
62 ;; (load-theme 'tangotango t)
63 ;; (load-theme 'leuven t)
68 ;; (setq tls-program '("openssl s_client -connect %h:%p -no_ssl2 -ign_eof"))
71 (setq erc-autojoin-channels-alist
72 '((".*\\.freenode.net" "#tahoe-lafs")
73 (".*\\.oftc.net" "#LeastAuthority")))
77 (setq erc-track-exclude-types '("JOIN" "NICK" "PART" "QUIT" "MODE"
79 "324" "329" "332" "333" "353" "477"))
80 ;; don't show any of this
81 (setq erc-hide-list '("JOIN" "PART" "QUIT" "NICK"))
86 (when (y-or-n-p "Do you want to start IRC? ")
87 (erc-tls :server "irc.freenode.net" :port 6697 :nick "rkrishnan" :full-name "Ramakrishnan Muthukrishnan")
88 (erc-tls :server "irc.oftc.net" :port 6697 :nick "rkrishnan" :full-name "Ramakrishnan Muthukrishnan")))
90 ;; switch to ERC with Ctrl+c e
91 (global-set-key (kbd "C-c e") 'start-erc) ;; ERC
94 (setenv "PATH" (concat "~/.cabal/bin:" (getenv "PATH")))
95 (add-to-list 'exec-path "~/.cabal/bin")
96 (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
97 ;; (add-hook 'haskell-mode-hook 'haskell-indent-mode)
98 ;; (add-hook 'haskell-mode-hook 'interactive-haskell-mode)
99 ;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
100 (add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
103 (require 'haskell-interactive-mode)
104 (require 'haskell-process)
105 (add-hook 'haskell-mode-hook 'interactive-haskell-mode)
107 (custom-set-variables
108 '(haskell-process-suggest-remove-import-lines t)
109 '(haskell-process-auto-import-loaded-modules t)
110 '(haskell-process-log t))
112 (eval-after-load "haskell-mode"
114 (define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-or-reload)
115 (define-key haskell-mode-map (kbd "C-`") 'haskell-interactive-bring)
116 (define-key haskell-mode-map (kbd "C-c C-t") 'haskell-process-do-type)
117 (define-key haskell-mode-map (kbd "C-c C-i") 'haskell-process-do-info)
118 (define-key haskell-mode-map (kbd "C-c C-c") 'haskell-process-cabal-build)
119 (define-key haskell-mode-map (kbd "C-c C-k") 'haskell-interactive-mode-clear)
120 (define-key haskell-mode-map (kbd "C-c c") 'haskell-process-cabal)
121 (define-key haskell-mode-map (kbd "SPC") 'haskell-mode-contextual-space)
123 (define-key haskell-cabal-mode-map (kbd "C-`") 'haskell-interactive-bring)
124 (define-key haskell-cabal-mode-map (kbd "C-c C-k") 'haskell-interactive-mode-clear)
125 (define-key haskell-cabal-mode-map (kbd "C-c C-c") 'haskell-process-cabal-build)
126 (define-key haskell-cabal-mode-map (kbd "C-c c") 'haskell-process-cabal)))
129 (autoload 'ghc-init "ghc" nil t)
130 (autoload 'ghc-debug "ghc" nil t)
131 (add-hook 'haskell-mode-hook (lambda () (ghc-init)))
132 (custom-set-variables
133 '(haskell-process-type 'cabal-repl))
136 (setq ido-enable-flex-matching t)
137 (setq ido-everywhere t)
140 ;; disable tabs for indentation
141 (setq-default indent-tabs-mode nil)
143 ;; (require 'whitespace)
144 ;; (setq whitespace-style '(face lines-tail))
145 ;; (setq whitespace-line-column 80)
146 ;; (global-whitespace-mode t)
148 ;; ;; show trailing whitespaces
149 ;; (setq-default show-trailing-whitespace t)
150 ;; (setq-default indicate-empty-lines t)
153 (setq c-default-style "k&r"
157 (add-to-list 'load-path "~/.emacs.d/hs-lint")
159 (defun my-haskell-mode-hook ()
160 (local-set-key "\C-cl" 'hs-lint))
161 (add-hook 'haskell-mode-hook 'my-haskell-mode-hook)
164 (add-hook 'before-save-hook #'gofmt-before-save)
165 (add-hook 'go-mode-hook (lambda ()
166 (local-set-key (kbd "C-c C-r")
167 'go-remove-unused-imports)))
168 (add-hook 'go-mode-hook (lambda ()
169 (local-set-key (kbd "C-c i")
173 (add-to-list 'load-path "~/.emacs.d/asp-mode")
174 (autoload 'asp-mode "asp-mode")
175 (setq auto-mode-alist
176 (cons '("\\.asp\\'" . asp-mode) auto-mode-alist))
179 (global-linum-mode t)
180 (global-hl-line-mode t)
182 ;; fci -- fill-column-indicator
183 (setq fci-rule-column 81)
184 (setq fci-rule-width 1)
185 (setq fci-rule-color "darkblue")