aboutsummaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs/Makefile28
-rw-r--r--emacs/init-go-mode.el3
-rw-r--r--emacs/init-haskell-mode.el7
-rw-r--r--emacs/init.el46
4 files changed, 84 insertions, 0 deletions
diff --git a/emacs/Makefile b/emacs/Makefile
new file mode 100644
index 0000000..3a5a47d
--- /dev/null
+++ b/emacs/Makefile
@@ -0,0 +1,28 @@
+.POSIX:
+
+install:
+ mkdir -p -- ~/.config
+ if test -d ~/.emacs.d; then \
+ test ! -e ~/.config/emacs && \
+ mv -- ~/.emacs.d ~/.config/emacs; \
+ else \
+ mkdir -p -- ~/.config/emacs; \
+ fi
+ ln -sf -- .config/emacs ~/.emacs.d
+ printf '; %s\n\n' 'This file is generated by ~/.dotfiles/emacs/Makefile' > ~/.config/emacs/init.el
+ cat -- init.el >> ~/.config/emacs/init.el
+ if pacman -Qq emacs-go-mode </dev/null >/dev/null 2>/dev/null; then\
+ printf '\n' >> ~/.config/emacs/init.el && \
+ cat -- init-go-mode.el >> ~/.config/emacs/init.el; \
+ fi
+ if pacman -Qq emacs-haskell-mode </dev/null >/dev/null 2>/dev/null; then\
+ printf '\n' >> ~/.config/emacs/init.el && \
+ cat -- init-haskell-mode.el >> ~/.config/emacs/init.el; \
+ fi
+
+uninstall:
+ -unlink -- ~/.config/emacs/init.el
+ -unlink -- ~/.emacs.d
+ -rmdir -- ~/.config/emacs
+
+.PHONY: install uninstall
diff --git a/emacs/init-go-mode.el b/emacs/init-go-mode.el
new file mode 100644
index 0000000..56e3c16
--- /dev/null
+++ b/emacs/init-go-mode.el
@@ -0,0 +1,3 @@
+(add-to-list 'load-path "/usr/share/emacs/site-lisp/go-mode/")
+(autoload 'go-mode "go-mode" nil t)
+(add-to-list 'auto-mode-alist '("\\.go\\'" . go-mode))
diff --git a/emacs/init-haskell-mode.el b/emacs/init-haskell-mode.el
new file mode 100644
index 0000000..6fe75c2
--- /dev/null
+++ b/emacs/init-haskell-mode.el
@@ -0,0 +1,7 @@
+(add-to-list 'load-path "/usr/share/emacs/site-lisp/haskell-mode/")
+(require 'haskell-mode-autoloads)
+(add-to-list 'Info-default-directory-list "/usr/share/emacs/site-lisp/haskell-mode/")
+(add-hook 'haskell-mode-hook
+ (lambda ()
+ (turn-on-haskell-doc)
+ (turn-on-haskell-simple-indent)))
diff --git a/emacs/init.el b/emacs/init.el
new file mode 100644
index 0000000..1a98a14
--- /dev/null
+++ b/emacs/init.el
@@ -0,0 +1,46 @@
+;; Added by Package.el. This must come before configurations of
+;; installed packages. Don't delete this line. If you don't want it,
+;; just comment it out by adding a semicolon to the start of the line.
+;; You may delete these explanatory comments.
+(package-initialize)
+
+(put 'upcase-region 'disabled nil)
+(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.
+ '(inhibit-startup-screen t))
+
+(setq display-time-string-forms
+ '((propertize (concat " " 24-hours ":" minutes " ")
+ )))
+
+(column-number-mode)
+(display-time-mode)
+
+; (set-default-font "-misc-fixed-medium-r-normal--13-*-75-75-c-70-iso8859-1")
+;; TODO set-default-font stopped working
+
+; (blink-cursor-mode 0)
+; (setq visible-bell t)
+; (scroll-bar-mode 0)
+; (tool-bar-mode 0)
+; (menu-bar-mode 0)
+
+;(custom-set-faces
+; '(default ((t (:background "#101064" :foreground "#FFFFFF"))))
+; '(fringe ((t (:background "#101064")))))
+
+(add-hook 'after-change-major-mode-hook (lambda() (electric-indent-mode -1)))
+(add-hook 'c-mode-hook (lambda () (electric-indent-local-mode)))
+
+(defvaralias 'c-basic-offset 'tab-width)
+(global-set-key (kbd "DEL") 'backward-delete-char)
+(setq c-backspace-function 'backward-delete-char)
+
+(setq vc-follow-symlinks nil)
+(setq vc-handled-backends nil)
+
+(add-to-list 'auto-mode-alist '("/PKGBUILD$" . shell-script-mode))
+(add-to-list 'auto-mode-alist '("/APKBUILD$" . shell-script-mode))