;; color themes
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
-(load-theme 'zenburn t)
+;(load-theme 'zenburn t)
(require 'package)
(package-initialize)
+(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
(load "my-c-mode.el")
(load "my-generic-stuff.el")
(load "my-slime.el")
(load "my-twitter.el")
(load "my-python.el")
+(load "my-haskell.el")
+(load "my-swank-js.el")
;; setup font
(if (>= emacs-major-version 23)
- (setq default-frame-alist '((font . "Inconsolata-12")))
+ (setq default-frame-alist '((font . "Inconsolata-14")))
(set-default-font
"-Misc-Fixed-Medium-R-Normal--15-140-75-75-C-90-ISO8859-1"))
(require 'gist)
;; browse url
-(setq browse-url-browser-function 'browse-url-generic
- browse-url-generic-program "/usr/bin/iceweasel"
+(setq browse-url-browser-function 'browse-url-firefox
+; browse-url-generic-program "/usr/bin/iceweasel"
browse-url-new-window-flag t
browse-url-firefox-new-window-is-tab t)
(define-key global-map "\C-co" 'browse-url-at-point)
;;; displays "\" at the end of lines that wrap
(setq longlines-show-hard-newlines t)
-;;; haskell mode
-(setq auto-mode-alist
- (append auto-mode-alist
- '(("\\.[hg]s$" . haskell-mode)
- ("\\.hic?$" . haskell-mode)
- ("\\.hsc$" . haskell-mode)
- ("\\.chs$" . haskell-mode)
- ("\\.l[hg]s$" . literate-haskell-mode))))
-(autoload 'haskell-mode "haskell-mode"
- "Major mode for editing Haskell scripts." t)
-(autoload 'literate-haskell-mode "haskell-mode"
- "Major mode for editing literate Haskell scripts." t)
-
-;adding the following lines according to which modules you want to use:
-(require 'inf-haskell)
-
-(add-hook 'haskell-mode-hook 'turn-on-font-lock)
-(add-hook 'haskell-mode-hook 'turn-on-haskell-ghci)
-(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
-(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
-(set-variable 'haskell-program-name "ghci")
-
;; javascript mode
(autoload 'js2-mode "js2-mode" nil t)
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
-;; swank-js
-(add-to-list 'load-path "~/src/swank-js/")
-(require 'slime-js)
-
;; geiser for Scheme programming
;(load-file "~/src/geiser/elisp/geiser.el")
(autoload 'sml-mode "sml-mode" "Major mode for editing SML." t)
(autoload 'run-sml "sml-proc" "Run an inferior SML process." t)
-;; notmuch for email/searching
-(require 'notmuch)
(require 'gnus-art)
;; sending email
(setq message-kill-buffer-on-exit t) ; kill buffer after sending mail)
-(setq notmuch-fcc-dirs "Gmail/Sent") ; stores sent mail to the specified directory
-(setq message-directory "Gmail/Drafts") ; stores postponed messages to the specified directory
+;; cursor
+(setq-default cursor-type '(bar . 2))
+(set-cursor-color "#ff0000")
+
+;; color theme
+
+;; wombat color theme
+;(set-background-color "Black")
+(set-background-color "#242424")
+;(set-foreground-color "White")
+(set-foreground-color "#f6f3e8")
+(set-cursor-color "Red")
+;(set-cursor-color "#656565")
+(set-mouse-color "LightSkyBlue")
+(setq font-lock-maximum-decoration t)
+(set-face-foreground 'font-lock-comment-face "#99968b")
+(set-face-italic-p 'font-lock-comment-face t)
+(set-face-foreground 'font-lock-doc-face "#99968b")
+(set-face-italic-p 'font-lock-doc-face t)
+(set-face-foreground 'font-lock-constant-face "#e5786d")
+(set-face-foreground 'font-lock-string-face "#95e454")
+(set-face-italic-p 'font-lock-string-face t)
+(set-face-foreground 'font-lock-variable-name-face "#cae682")
+(set-face-foreground 'font-lock-function-name-face "#cae682")
+(set-face-foreground 'font-lock-type-face "#cae682")
+(set-face-foreground 'font-lock-builtin-face "#8ac6f2")
+(set-face-foreground 'font-lock-keyword-face "#8ac6f2")
+(set-face-foreground 'font-lock-preprocessor-face "#e5786d")
+(set-face-foreground 'font-lock-negation-char-face "#e7f6da")
+(set-face-foreground 'link "#8ac6f2")
+(set-face-bold-p 'link t)
+(set-face-underline-p 'link t)
+(show-paren-mode t)
+(set-face-foreground 'show-paren-match-face "#f6f3e8")
+(set-face-background 'show-paren-match-face "#857b6f")
+(set-face-bold-p 'show-paren-match t)
+(set-face-foreground 'region "#f6f3e8")
+(set-face-background 'region "#444444")
+(set-face-foreground 'lazy-highlight "black")
+(set-face-background 'lazy-highlight "yellow")
+
+;; color theme from Lau Jenson
+(defun color-theme-dark-bliss ()
+ ""
+ (interactive)
+ (color-theme-install
+ '(color-theme-dark-bliss
+ ((foreground-color . "#eeeeee")
+ (background-color . "#001122")
+ (background-mode . dark)
+ (cursor-color . "#ccffcc"))
+ (bold ((t (:bold t))))
+ (bold-italic ((t (:italic t :bold t))))
+ (default ((t (nil))))
+
+ (font-lock-builtin-face ((t (:foreground "#f0f0aa"))))
+ (font-lock-comment-face ((t (:italic t :foreground "#aaccaa"))))
+ (font-lock-delimiter-face ((t (:foreground "#aaccaa"))))
+ (font-lock-constant-face ((t (:bold t :foreground "#ffaa88"))))
+ (font-lock-doc-string-face ((t (:foreground "#eeccaa"))))
+ (font-lock-doc-face ((t (:foreground "#eeccaa"))))
+ (font-lock-reference-face ((t (:foreground "#aa99cc"))))
+ (font-lock-function-name-face ((t (:foreground "#ffbb66"))))
+ (font-lock-keyword-face ((t (:foreground "#ccffaa"))))
+ (font-lock-preprocessor-face ((t (:foreground "#aaffee"))))
+ (font-lock-string-face ((t (:foreground "#bbbbff")))))))
+
+;; (color-theme-dark-bliss)
+
+;; notmuch
+(setq gnus-inhibit-images nil)
+(add-to-list 'load-path "~/.emacs.d/emacs/notmuch")
+(setq notmuch-command "~/bin/remote-notmuch.sh")
+(require 'notmuch)
+(when (memq window-system '(mac ns))
+ (exec-path-from-shell-initialize)
+ (setq starttls-use-gnutls t)
+ (setq starttls-gnutls-program "gnutls-cli")
+ (setq starttls-extra-arguments nil)
+ )
+(setq smtpmail-starttls-credentials '(("rkrishnan.org" 587 nil nil))
+ smtpmail-auth-credentials (expand-file-name "~/.authinfo")
+ smtpmail-default-smtp-server "rkrishnan.org"
+ smtpmail-smtp-server "rkrishnan.org"
+ smtpmail-smtp-service 587)
+
+(setq notmuch-fcc-dirs nil)
+(add-hook 'message-header-setup-hook
+ (lambda () (insert (format "Bcc: %s <%s>\n"
+ (notmuch-user-name)
+ (notmuch-user-primary-email)))))
+
+;; addressbook
+(require 'notmuch-address)
+(setq notmuch-address-command "~/bin/addrlookup")
+(notmuch-address-message-insinuate)
+
+(require 'smtpmail)
+(setq message-send-mail-function 'smtpmail-send-it)
+(require 'starttls)
+
+;; sign all emails
+(add-hook 'message-setup-hook 'mml-secure-message-sign-pgp)
+
+(set-default-font "Inconsolata-11")
+
+;; spell check
+(setq ispell-program-name "aspell"
+ ispell-extra-args '("--sug-mode=ultra"))
+
+(setq ispell-list-command "--list")
+
+(dolist (hook '(text-mode-hook))
+ (add-hook hook (lambda () (flyspell-mode 1))))
+(dolist (hook '(change-log-mode-hook log-edit-mode-hook))
+ (add-hook hook (lambda () (flyspell-mode -1))))