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 fill-column-indicator))
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)
51 (load-theme 'angel-light t)
56 ;; (setq tls-program '("openssl s_client -connect %h:%p -no_ssl2 -ign_eof"))
59 (setq erc-autojoin-channels-alist
60 '((".*\\.freenode.net" "#tahoe-lafs")
61 (".*\\.oftc.net" "#LeastAuthority")))
65 (setq erc-track-exclude-types '("JOIN" "NICK" "PART" "QUIT" "MODE"
67 "324" "329" "332" "333" "353" "477"))
68 ;; don't show any of this
69 (setq erc-hide-list '("JOIN" "PART" "QUIT" "NICK"))
74 (when (y-or-n-p "Do you want to start IRC? ")
75 (erc-tls :server "irc.freenode.net" :port 6697 :nick "rkrishnan" :full-name "Ramakrishnan Muthukrishnan")
76 (erc-tls :server "irc.oftc.net" :port 6697 :nick "rkrishnan" :full-name "Ramakrishnan Muthukrishnan")))
78 ;; switch to ERC with Ctrl+c e
79 (global-set-key (kbd "C-c e") 'start-erc) ;; ERC
82 (setenv "PATH" (concat "~/.cabal/bin:" (getenv "PATH")))
83 (add-to-list 'exec-path "~/.cabal/bin")
84 (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
85 ;; (add-hook 'haskell-mode-hook 'haskell-indent-mode)
86 ;; (add-hook 'haskell-mode-hook 'interactive-haskell-mode)
87 ;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
88 (add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
91 (autoload 'ghc-init "ghc" nil t)
92 (autoload 'ghc-debug "ghc" nil t)
93 (add-hook 'haskell-mode-hook (lambda () (ghc-init)))
95 '(haskell-process-type 'cabal-repl))
98 (setq ido-enable-flex-matching t)
99 (setq ido-everywhere t)
102 ;; disable tabs for indentation
103 (setq-default indent-tabs-mode nil)
105 ;; (require 'whitespace)
106 ;; (setq whitespace-style '(face lines-tail))
107 ;; (setq whitespace-line-column 80)
108 ;; (global-whitespace-mode t)
110 ;; ;; show trailing whitespaces
111 ;; (setq-default show-trailing-whitespace t)
112 ;; (setq-default indicate-empty-lines t)
115 (setq c-default-style "k&r"
119 (add-to-list 'load-path "~/.emacs.d/hs-lint")
121 (defun my-haskell-mode-hook ()
122 (local-set-key "\C-cl" 'hs-lint))
123 (add-hook 'haskell-mode-hook 'my-haskell-mode-hook)
126 (add-hook 'before-save-hook #'gofmt-before-save)
127 (add-hook 'go-mode-hook (lambda ()
128 (local-set-key (kbd "C-c C-r")
129 'go-remove-unused-imports)))
130 (add-hook 'go-mode-hook (lambda ()
131 (local-set-key (kbd "C-c i")
135 (add-to-list 'load-path "~/.emacs.d/asp-mode")
136 (autoload 'asp-mode "asp-mode")
137 (setq auto-mode-alist
138 (cons '("\\.asp\\'" . asp-mode) auto-mode-alist))
141 (global-linum-mode t)
142 (global-hl-line-mode t)
144 ;; fci -- fill-column-indicator
145 (setq fci-rule-column 81)
146 (setq fci-rule-width 1)
147 (setq fci-rule-color "darkblue")