summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-01-27 20:46:34 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-01-27 20:46:34 -0500
commit03af22ed8fcb4ef6b381a94cd18372487a28b49b (patch)
treedc7279170673cdcf2b9dd918a19f8efb30695a64 /.config
parent8ddc324abff0f72160be11d62e79818d30e3251f (diff)
mv .emacs.d .config/emacs; ln -s .config/emacs/ .emacs.dback2
Diffstat (limited to '.config')
-rw-r--r--.config/emacs/.gitignore9
-rw-r--r--.config/emacs/custom.el21
-rw-r--r--.config/emacs/emacsutils.el13
-rw-r--r--.config/emacs/init.el180
4 files changed, 223 insertions, 0 deletions
diff --git a/.config/emacs/.gitignore b/.config/emacs/.gitignore
new file mode 100644
index 0000000..ef4ec20
--- /dev/null
+++ b/.config/emacs/.gitignore
@@ -0,0 +1,9 @@
+auto-save-list/*
+el-get/*
+elmo/*
+elpa/*
+image-dired/*
+server/*
+session.*
+tramp
+url/*
diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el
new file mode 100644
index 0000000..5a3e67f
--- /dev/null
+++ b/.config/emacs/custom.el
@@ -0,0 +1,21 @@
+(custom-set-variables
+ ;; custom-set-variables was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ '(custom-enabled-themes (quote (wombat)))
+ '(custom-safe-themes (quote ("71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default)))
+ '(erc-nick "lukeshu")
+ '(explicit-shell-file-name "/bin/bash")
+ '(inhibit-startup-screen t)
+ '(mdmua-maildir "~/Maildir")
+ '(minibuffer-prompt-properties (quote (read-only t point-entered minibuffer-avoid-prompt face minibuffer-prompt)))
+ '(ruby-deep-arglist nil)
+ '(ruby-deep-indent-paren nil)
+ '(scroll-bar-mode nil))
+(custom-set-faces
+ ;; custom-set-faces was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ )
diff --git a/.config/emacs/emacsutils.el b/.config/emacs/emacsutils.el
new file mode 100644
index 0000000..966d16e
--- /dev/null
+++ b/.config/emacs/emacsutils.el
@@ -0,0 +1,13 @@
+(defun mailto-compose-mail (mailto-url)
+ (if (and (stringp mailto-url)
+ (string-match "\\`mailto:" mailto-url))
+ (progn
+ (require 'rfc2368)
+ (let* ((headers (mapcar (lambda (h) (cons (intern (car h)) (cdr h)))
+ (rfc2368-parse-mailto-url mailto-url)))
+ (good-headers (remove-if (lambda (h) (member (car h) '(Body))) headers))
+ (body (cdr (assoc 'Body headers))))
+ (wl-draft good-headers nil nil body)))))
+
+(defun emacs-terminal-emulator (program)
+ (ansi-term program)) \ No newline at end of file
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
new file mode 100644
index 0000000..3cd2ea3
--- /dev/null
+++ b/.config/emacs/init.el
@@ -0,0 +1,180 @@
+;; Preliminary settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(set-face-attribute 'default nil :height 80)
+(setq notify-method 'notify-via-libnotify)
+(add-to-list 'load-path "~/.emacs.d/")
+(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
+(setq custom-file "~/.emacs.d/custom.el")
+
+; derived from ELPA installation
+; http://tromey.com/elpa/install.html
+(defun eval-url (url)
+ (let ((buffer (url-retrieve-synchronously url)))
+ (save-excursion
+ (set-buffer buffer)
+ (goto-char (point-min))
+ (re-search-forward "^$" nil 'move)
+ (eval-region (point) (point-max))
+ (kill-buffer (current-buffer)))))
+
+ ;; ELPA stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(unless (require 'package nil t)
+ (eval-url "http://tromey.com/elpa/package-install.el"))
+
+(setq package-archives '(("ELPA" . "http://tromey.com/elpa/")
+ ("marmalade" . "http://marmalade-repo.org/packages/")
+ ("gnu" . "http://elpa.gnu.org/packages/")))
+
+;; el-get stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(setq el-get-install-branch "master") ;; live life on the edge
+(unless (require 'el-get nil t)
+ (eval-url "https://github.com/dimitri/el-get/raw/master/el-get-install.el"))
+
+(setq el-get-sources '(
+ (:name nxhtml
+ :type http
+ :url "http://ourcomments.org/Emacs/DL/elisp/nxhtml/zip/nxhtml-2.08-100425.zip"
+ :build ("unzip nxhtml-2.08-100425.zip")
+ :load "nxhtml/autostart.el")
+ ))
+
+(setq my-el-get-packages
+ '(el-get
+; nxhtml
+ apel flim semi wanderlust
+ smarttabs
+ ))
+
+;; Now load all of that ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; ELPA
+(package-initialize)
+;; el-get
+(when (require 'el-get nil t) (el-get 'sync my-el-get-packages))
+;; custom
+(load custom-file 'noerror)
+
+;; General settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;(load "mdmua")
+(load "emacsutils")
+
+(tool-bar-mode -1)
+(ido-mode t)
+(show-paren-mode 1)
+(setq org-hide-leading-stars t)
+(setq org-log-done 'time)
+;(xclip-mode 1)
+
+(load "whitespace")
+(setq whitespace-style '(
+ tab-mark
+ space-mark
+ newline-mark
+ empty
+))
+
+
+;; These are my preferred settings; we let dtrt-indent detect when we play with other's files
+(setq-default tab-width 8)
+(setq-default c-basic-offset 8)
+(setq-default indent-tabs-mode t)
+
+
+(setq
+ backup-by-copying t ;; don't clobber symlinks
+ backup-directory-alist '(("." . "~/.emacs.d/saves")) ;; don't litter my fs tree
+ delete-old-versions t
+ kept-new-versions 6
+ kept-old-versions 2
+ version-control t ;; use versioned backups
+)
+
+(setq column-number-mode t
+ inhibit-startup-screen t
+ line-number-mode t
+ server-use-tcp t
+ server-mode t
+ show-paren-mode t)
+
+(setq browse-url-generic-program (executable-find "v-www-browser")
+ browse-url-browser-function 'browse-url-generic)
+
+
+(defun toggle-fullscreen (&optional f)
+ (interactive)
+ (let ((current-value (frame-parameter nil 'fullscreen)))
+ (set-frame-parameter nil 'fullscreen
+ (if (equal 'fullboth current-value)
+ (if (boundp 'old-fullscreen) old-fullscreen nil)
+ (progn (setq old-fullscreen current-value)
+ 'fullboth)))))
+
+;; Custom keybindings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(global-set-key [f11] 'toggle-fullscreen)
+(global-set-key "\C-cw" 'global-whitespace-mode)
+
+;; mode-hooks ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(add-hook 'text-mode-hook 'turn-on-auto-fill)
+
+; for term-mode
+;; (add-hook 'after-make-frame-functions
+;; (lambda (frame)
+;; (set-variable 'term-default-fg-color
+;; (face-foreground 'default))
+;; (set-variable 'term-default-bg-color
+;; (face-background 'default)))
+;; t)
+
+(add-hook 'lisp-mode-hook
+ '(lambda ()
+ (set (make-local-variable 'indent-tabs-mode) nil)
+ ))
+
+(add-hook 'emacs-lisp-mode-hook
+ '(lambda ()
+ (set (make-local-variable 'indent-tabs-mode) nil)
+ ))
+
+(add-hook 'coffee-mode-hook
+ '(lambda ()
+ (set (make-local-variable 'tab-width) 2)
+ ))
+
+(add-hook 'term-mode-hook
+ '(lambda ()
+ (setq term-prompt-regexp "^[^#$%>\n]*[#$%>] *")
+ (make-local-variable 'mouse-yank-at-point)
+ ;(make-local-variable 'transient-mark-mode)
+ (setq mouse-yank-at-point t)
+ ;(setq transient-mark-mode nil)
+ (auto-fill-mode -1)
+ (setq tab-width 8 )
+ (setq autopair-dont-activate t) ;; Don't let autopair break ansi-term
+ ))
+
+(add-hook 'ruby-mode-hook
+ '(lambda ()
+ (set (make-local-variable 'indent-tabs-mode) t)
+ (set (make-local-variable 'ruby-indent-level) 4)
+ (set (make-local-variable 'tab-width) 4)
+ ))
+
+(add-hook 'coffee-mode-hook
+ '(lambda ()
+ (set (make-local-variable 'indent-tabs-mode) nil)
+ ))
+
+(add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode))
+
+;(require 'flymake)
+;(add-hook 'php-mode-hook (lambda() (flymake-mode 1)))
+;(define-key php-mode-map '[M-S-up] 'flymake-goto-prev-error)
+;(define-key php-mode-map '[M-S-down] 'flymake-goto-next-error)
+
+;(setq tramp-debug-buffer t)
+;(setq tramp-verbose 10)