3 ;; y-or-n instead of yes-or-no
4 (defalias 'yes-or-no-p 'y-or-n-p)
6 ;; Don't use messages that you don't rea
7 (setq make-backup-files nil)
8 (setq initial-scratch-message "")
9 (setq inhibit-startup-message t)
12 (setq-default cursor-type '(bar . 2))
15 (column-number-mode 1)
18 ;; (set-default-font "Inconsolata-12")
20 ;; Don't let Emacs hurt your ears
23 ;; This is bound to f11 in Emacs 24.4
24 ;; (toggle-frame-fullscreen)
26 ;; custom-set-variables was added by Custom.
27 ;; If you edit it by hand, you could mess it up, so be careful.
28 ;; Your init file should contain only one such instance.
29 ;; If there is more than one, they won't work right.
30 '(initial-frame-alist (quote ((fullscreen . maximized))))
31 '(send-mail-function (quote smtpmail-send-it)))
33 ;; Who use the bar to scroll?
34 (when (display-graphic-p)
42 ;; (load-theme 'tangotango t)
43 ;; (load-theme 'railscasts t)
44 ;; (load-theme 'leuven t)
49 ;; (setq tls-program '("openssl s_client -connect %h:%p -no_ssl2 -ign_eof"))
52 (setq erc-autojoin-channels-alist
53 '((".*\\.freenode.net" "#tahoe-lafs") ;; "#plan9chan" "#cat-v")
54 (".*\\.oftc.net" "#LeastAuthority" "#debian-in")))
58 (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-tls :server "irc.mozilla.org" :port 6697 :nick "rkrishnan" :full-name "Ramakrishnan Muthukrishnan")
68 (erc-tls :server "irc.freenode.net" :port 6697 :nick "rkrishnan" :full-name "Ramakrishnan Muthukrishnan")
69 (erc-tls :server "irc.oftc.net" :port 6697 :nick "rkrishnan" :full-name "Ramakrishnan Muthukrishnan")))
71 ;; switch to ERC with Ctrl+c e
72 (global-set-key (kbd "C-c e") 'start-erc) ;; ERC
75 (setenv "PATH" (concat "~/.cabal/bin:" (getenv "PATH")))
76 (add-to-list 'exec-path "~/.cabal/bin")
77 (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
80 (require 'haskell-process)
81 (require 'haskell-interactive-mode)
82 (add-hook 'haskell-mode-hook 'interactive-haskell-mode)
85 '(haskell-process-suggest-remove-import-lines t)
86 '(haskell-process-auto-import-loaded-modules t)
87 '(haskell-process-log t)
88 '(haskell-process-type 'stack-ghci))
90 (define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-or-reload)
91 (define-key haskell-mode-map (kbd "C-`") 'haskell-interactive-bring)
92 (define-key haskell-mode-map (kbd "C-c C-t") 'haskell-process-do-type)
93 (define-key haskell-mode-map (kbd "C-c C-i") 'haskell-process-do-info)
94 (define-key haskell-mode-map (kbd "C-c C-c") 'haskell-process-cabal-build)
95 (define-key haskell-mode-map (kbd "C-c C-k") 'haskell-interactive-mode-clear)
96 (define-key haskell-mode-map (kbd "C-c c") 'haskell-process-cabal)
97 (define-key haskell-mode-map (kbd "SPC") 'haskell-mode-contextual-space)
100 (autoload 'ghc-init "ghc" nil t)
101 (autoload 'ghc-debug "ghc" nil t)
103 (add-hook 'haskell-mode-hook (lambda () (ghc-init)))
106 (setq ido-enable-flex-matching t)
107 (setq ido-everywhere t)
110 ;; disable tabs for indentation
111 (setq-default indent-tabs-mode nil)
113 ;; (require 'whitespace)
114 ;; (setq whitespace-style '(face lines-tail))
115 ;; (setq whitespace-line-column 80)
116 ;; (global-whitespace-mode t)
118 ;; ;; show trailing whitespaces
119 ;; (setq-default show-trailing-whitespace t)
120 ;; (setq-default indicate-empty-lines t)
123 (setq c-default-style "k&r"
127 (add-to-list 'load-path "~/.emacs.d/hs-lint")
129 (defun my-haskell-mode-hook ()
130 (local-set-key "\C-cl" 'hs-lint))
131 (add-hook 'haskell-mode-hook 'my-haskell-mode-hook)
134 (add-hook 'before-save-hook #'gofmt-before-save)
135 (add-hook 'go-mode-hook (lambda ()
136 (local-set-key (kbd "C-c C-r")
137 'go-remove-unused-imports)))
138 (add-hook 'go-mode-hook (lambda ()
139 (local-set-key (kbd "C-c i")
143 (add-to-list 'load-path "~/.emacs.d/asp-mode")
144 (autoload 'asp-mode "asp-mode")
145 (setq auto-mode-alist
146 (cons '("\\.asp\\'" . asp-mode) auto-mode-alist))
149 (global-linum-mode t)
150 (global-hl-line-mode 0)
152 ;; fci -- fill-column-indicator
153 (setq fci-rule-column 81)
154 (setq fci-rule-width 1)
155 (setq fci-rule-color "darkblue")
157 ;; turn off electric-indent-mode
158 (when (fboundp 'electric-indent-mode) (electric-indent-mode -1))
161 (setq mail-user-agent 'message-user-agent)
162 (setq user-mail-address "ram@rkrishnan.org"
163 user-full-name "Ramakrishnan Muthukrishnan")
166 (setq smtpmail-stream-type 'ssl
167 smtpmail-smtp-server "mail.messagingengine.com"
168 smtpmail-smtp-service 465)
171 (require 'notmuch-address)
172 (setq notmuch-address-command "/usr/bin/notmuch-addrlookup")
173 ;;(notmuch-address-message-insinuate)
176 (setq message-send-mail-function 'smtpmail-send-it)
180 (add-hook 'message-setup-hook 'mml-secure-message-sign-pgp)
183 ;; custom-set-faces was added by Custom.
184 ;; If you edit it by hand, you could mess it up, so be careful.
185 ;; Your init file should contain only one such instance.
186 ;; If there is more than one, they won't work right.
189 ;; company mode for auto completion
190 (add-hook 'after-init-hook 'global-company-mode)
193 ;; (add-hook 'prog-mode-hook 'highlight-todos)
196 (setq ledger-binary-path "~/.cabal/bin/hledger")
199 (setq exec-path (cons "/usr/local/go/bin" exec-path))
200 (add-to-list 'exec-path (concat (getenv "GOPATH") "/bin"))
202 (defun go-mode-setup ()
204 (setq gofmt-command "goimports")
205 (add-hook 'before-save-hook 'gofmt-before-save))
207 (add-hook 'go-mode-hook 'go-mode-setup)
209 ;; alias man to w.o.man
210 (defalias 'man 'woman)
213 (defun eshell/emacs (&rest args)
214 "open a file in emacs"
217 (mapc #'find-file (mapcar #'expand-file-name (eshell-flatten-list (reverse args))))))
219 ;(desktop-save-mode 1)
223 (add-to-list 'which-func-modes '(c-mode c++-mode rust-mode haskell-mode))
226 (add-hook 'after-init-hook #'global-flycheck-mode)
229 (load-file "~/.emacs.d/ProofGeneral/generic/proof-site.el")