aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@debian.org>2013-02-19 14:29:25 -0500
committerRyan Kavanagh <rak@debian.org>2013-02-19 14:29:25 -0500
commit5c03eae23fa9efb59ae7d56fe264838376d21211 (patch)
tree6aaa27a30966d2c40b43105e34e7220802a42c86
parentAdded makefile for building emacsen (diff)
Added .emacs and glue to make it compile packages on every system
-rw-r--r--.emacs80
-rwxr-xr-xMakefile10
-rw-r--r--emacsen/Makefile12
3 files changed, 94 insertions, 8 deletions
diff --git a/.emacs b/.emacs
new file mode 100644
index 0000000..9b67fe3
--- /dev/null
+++ b/.emacs
@@ -0,0 +1,80 @@
+(add-to-list 'load-path "~/.emacs.d/auto-indent-mode")
+(add-to-list 'load-path "~/.emacs.d/auto-complete")
+(add-to-list 'load-path "~/.emacs.d/magit")
+(add-to-list 'load-path "/usr/share/emacs/site-lisp/proofgeneral/coq/")
+(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/vm")
+(add-to-list 'load-path "~/.emacs.d/ProofGeneral/")
+
+(load-file "~/.emacs.d/ProofGeneral/generic/proof-site.el")
+
+;;;; AUTO COMPLETE
+(require 'auto-complete-config)
+(ac-config-default)
+(ac-set-trigger-key "TAB")
+(add-to-list 'ac-dictionary-directories "~/.emacs.d/auto-complete/ac-dict")
+(add-to-list 'ac-modes 'Coq-mode)
+
+;;;; AUTO INDENT
+(require 'auto-indent-mode)
+(auto-indent-global-mode)
+
+;;;; MAGIT
+(require 'magit)
+
+;;;; VC-GIT
+(setq load-path (cons (expand-file-name "/usr/share/doc/git-core/contrib/emacs") load-path))
+(require 'vc-git)
+(when (featurep 'vc-git) (add-to-list 'vc-handled-backends 'git))
+(require 'git)
+(autoload 'git-blame-mode "git-blame"
+ "Minor mode for incremental blame for Git." t)
+
+;;;; VM
+(require 'vm-autoloads)
+
+(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.
+ '(auto-indent-next-pair-timer-interval (quote ((css-mode 1.5) (haskell-mode 1.5) (python-mode 1.5) (latex-mode 1.5) (coq-mode 1.5) (default 0.0005))))
+ '(column-number-mode t)
+ '(default-input-method "TeX")
+ '(proof-disappearing-proofs t)
+ '(proof-electric-terminator-enable t)
+ '(scroll-bar-mode nil)
+ '(tool-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.
+ '(default ((t (:family "Inconsolata" :foundry "unknown" :slant normal :weight normal :height 83 :width normal))))
+ '(proof-locked-face ((t (:weight bold)))))
+
+;;;; TeX
+(setq TeX-PDF-mode t)
+
+;;;; Others
+;(require 'color-theme)
+;(color-theme-initialize)
+
+(setq mew-proto "%")
+(setq mew-imap-user "ryan")
+(setq mew-imap-server "localhost")
+
+;; Emacs24: Cycle through tab-completions with tab if there are less than 5
+(setq completion-cycle-threshold 5)
+;; Emacs24: Also match for substrings in tab completion
+(add-to-list 'completion-styles 'substring)
+
+;; Replace yes or no prompts with y or n.
+(fset 'yes-or-no-p 'y-or-n-p)
+
+(set-background-color "black")
+(set-face-background 'default "black")
+(set-face-background 'region "black")
+(set-face-foreground 'default "white")
+(set-face-foreground 'region "gray60")
+(set-foreground-color "white")
+(set-cursor-color "red")
diff --git a/Makefile b/Makefile
index f8a797c..9d30d2e 100755
--- a/Makefile
+++ b/Makefile
@@ -42,6 +42,7 @@ GLOBAL_FILES = \
.cmus/ \
.dput.cf \
.dzen/ \
+ .emacs \
.fonts.conf \
.gitconfig \
.imapfilter/ \
@@ -108,7 +109,7 @@ all: clean build
# build/LOCAL_FILES targets overwrite what was copied in GLOBAL_FILES.
BUILD = $(patsubst %,build/%,$(GLOBAL_FILES) $(LOCAL_FILES) $(GPG_FILES))
-build: $(BUILD)
+build: $(BUILD) emacsen
# We must force these with a phony target, otherwise, make will see that they're
# already there (for example, from installing the rest of .mutt or .zsh) and
@@ -126,6 +127,10 @@ $(GPG_FILES):
touch $@ && chmod 600 $@
[ "$(GPG_DISABLED)" = "True" ] || $(GPG_BINARY) --decrypt gpg/$@.gpg > $@
+emacsen:
+ $(MAKE) -C $@
+ $(MAKE) -C $@ install
+
build/%: % $(SUBSTS_FILE)
[ -d $(dir $@) ] || mkdir -p $(dir $@)
( [ -d $< ] && rsync -a $</* $@/ ) || rsync -a $< $@
@@ -211,7 +216,8 @@ udh:
clean:
rm -fr build
+ $(MAKE) -C emacsen clean
clobber: clean
rm -f $(GPG_FILES)
-.PHONY: build install clean verify merge udh
+.PHONY: build install clean verify merge udh emacsen
diff --git a/emacsen/Makefile b/emacsen/Makefile
index ebed80b..9f8b299 100644
--- a/emacsen/Makefile
+++ b/emacsen/Makefile
@@ -1,6 +1,6 @@
ROOT=$(shell pwd)/..
export ROOT
-EMACSD=$(ROOT)/.emacs.d/
+EMACSD=$(ROOT)/build/.emacs.d/
export ELISPDIR
SUBDIRS = auto-complete \
@@ -19,7 +19,7 @@ $(SUBDIRS):
install: $(INSTALLDIRS)
$(INSTALLDIRS):
- -mkdir $(EMACSD)/$(@:install-%=%)
+ -mkdir -p $(EMACSD)/$(@:install-%=%)
$(MAKE) -C $(@:install-%=%) install DIR=$(EMACSD)/$(@:install-%=%)
clean: $(CLEANDIRS)
@@ -31,19 +31,19 @@ auto-indent-mode clean-auto-indent-mode:
echo $@
install-auto-complete:
- -mkdir $(EMACSD)/$(@:install-%=%)
+ -mkdir -p $(EMACSD)/$(@:install-%=%)
$(MAKE) -C $(@:install-%=%) -e DIR=$(EMACSD)/$(@:install-%=%) install
install-auto-indent-mode:
- -mkdir $(EMACSD)/$(@:install-%=%)
+ -mkdir -p $(EMACSD)/$(@:install-%=%)
cp $(@:install-%=%)/auto-indent-mode.el $(EMACSD)/$(@:install-%=%)
install-color-theme-6.6.0:
- -mkdir $(EMACSD)/$(@:install-%=%)
+ -mkdir -p $(EMACSD)/$(@:install-%=%)
$(MAKE) -C $(@:install-%=%) -e ELISPDIR=$(EMACSD)/$(@:install-%=%) install
install-magit:
- -mkdir $(EMACSD)/$(@:install-%=%)
+ -mkdir -p $(EMACSD)/$(@:install-%=%)
$(MAKE) -C $(@:install-%=%) -e PREFIX="" -e DESTDIR=$(shell pwd)/$(@:install-%=%) \
-e SYSCONFDIR="" -e ELISP_INSTALL_DIR=$(EMACSD)/$(@:install-%=%) install