1 (setq load-path (cons "~/.emacs.d/emacs" load-path))
4 (add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
5 ;(load-theme 'zenburn t)
8 (add-to-list 'package-archives
10 "http://marmalade-repo.org/packages/"))
14 (load "my-generic-stuff.el")
17 ;; (load "my-org-mode.el")
18 ;; (load "my-slime.el")
19 ;; (load "my-twitter.el")
20 ;; (load "my-python.el")
21 ;; (load "my-haskell.el")
22 ;; (load "my-swank-js.el")
24 (defun match-paren (arg)
25 "Go to the matching paren if on a paren; otherwise insert %."
27 (cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
28 ((looking-at "\\s\)") (forward-char 1) (backward-list 1))
29 (t (self-insert-command (or arg 1)))))
31 ;; highlight parentheses mode
32 (require 'highlight-parentheses)
36 (autoload 'paredit-mode "paredit"
37 "Minor mode for pseudo-structurally editing Lisp code." t)
39 (dolist (hook '(emacs-lisp-mode-hook
41 lisp-interaction-mode-hook
44 (add-hook hook #'(lambda ()
45 (highlight-parentheses-mode t)
49 (autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
51 ;; handle trailing whitespaces
52 ;(add-hook 'before-save-hook 'delete-trailing-whitespace)
54 ;; update copyright years before saving.
55 ;(add-hook 'before-save-hook 'copyright-update)
58 (setq message-send-mail-function 'message-send-mail-with-sendmail
59 mail-specify-envelope-from t ; Settings to work with msmtp
60 message-sendmail-f-is-evil nil
61 mail-envelope-from 'header
62 message-sendmail-envelope-from 'header
63 sendmail-program "/usr/bin/msmtp"
64 user-full-name "Ramakrishnan Muthukrishnan")
66 (setq message-kill-buffer-on-exit t) ; kill buffer after sending mail)
69 (setq gnus-inhibit-images nil)
70 (add-to-list 'load-path "~/.emacs.d/emacs/notmuch")
71 (setq notmuch-command "~/bin/remote-notmuch.sh")
73 (when (memq window-system '(mac ns))
74 (exec-path-from-shell-initialize)
75 (setq starttls-use-gnutls t)
76 (setq starttls-gnutls-program "gnutls-cli")
77 (setq starttls-extra-arguments nil)
79 (setq smtpmail-starttls-credentials '(("rkrishnan.org" 587 nil nil))
80 smtpmail-auth-credentials (expand-file-name "~/.authinfo")
81 smtpmail-default-smtp-server "rkrishnan.org"
82 smtpmail-smtp-server "rkrishnan.org"
83 smtpmail-smtp-service 587)
85 (setq notmuch-fcc-dirs nil)
86 (add-hook 'message-header-setup-hook
87 (lambda () (insert (format "Bcc: %s <%s>\n"
89 (notmuch-user-primary-email)))))
92 (require 'notmuch-address)
93 (setq notmuch-address-command "~/bin/addrlookup")
94 (notmuch-address-message-insinuate)
97 (setq message-send-mail-function 'smtpmail-send-it)
101 (add-hook 'message-setup-hook 'mml-secure-message-sign-pgp)
103 (set-default-font "Inconsolata-11")
106 (setq ispell-program-name "aspell"
107 ispell-extra-args '("--sug-mode=ultra"))
109 (setq ispell-list-command "--list")
111 (dolist (hook '(text-mode-hook))
112 (add-hook hook (lambda () (flyspell-mode 1))))
113 (dolist (hook '(change-log-mode-hook log-edit-mode-hook))
114 (add-hook hook (lambda () (flyspell-mode -1))))
116 ;; new wonderful theme monokai
117 (load-theme 'monokai t)