summaryrefslogtreecommitdiff
path: root/.config/emacs/init.el
diff options
context:
space:
mode:
Diffstat (limited to '.config/emacs/init.el')
-rw-r--r--.config/emacs/init.el51
1 files changed, 38 insertions, 13 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index f8f19e0..e14d0f5 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -1,4 +1,5 @@
;; This config requires Emacs 24.4(+?)
+;; Hey, Emacs: -*- Indent-tabs-mode: nil -*-
;; Without (advice-add) it should work in older versions of Emacs 24.
;;;; Use XDG-ish locations ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq xdg-cache-home (file-name-as-directory (or (getenv "XDG_CACHE_HOME") "~/.cache")))
@@ -88,13 +89,16 @@
(:name dtrt-indent :type elpa ;; Detect indent style for existing files
:after (dtrt-indent-mode 1))
(:name page-break-lines :type elpa ;; Display form-feeds pretty
- :before (advice-add 'page-break-lines-mode-maybe :override #'page-break-lines-mode)
+ :before (advice-add 'page-break-lines-mode-maybe
+ :override #'page-break-lines-mode)
:after (global-page-break-lines-mode 1))
(:name smart-tabs-mode :type elpa ;; Indent with tabs, align with spaces
:after (progn
(smart-tabs-mode 1)
- (apply 'smart-tabs-insinuate (mapcar 'car smart-tabs-insinuate-alist))))
+ (apply 'smart-tabs-insinuate
+ (mapcar 'car smart-tabs-insinuate-alist))))
;; Major modes
+ (:name bison-mode :type elpa)
(:name coffee-mode :type elpa
:after (add-hook 'coffee-mode-hook
'(lambda ()
@@ -102,6 +106,7 @@
(set (make-local-variable 'indent-tabs-mode) nil)
)))
(:name graphviz-dot-mode :type elpa)
+ (:name haml-mode :type elpa)
(:name markdown-mode :type elpa
:after (add-to-list 'auto-mode-alist '("\\.ronn\\'" . markdown-mode)))
(:name nginx-mode :type elpa
@@ -110,19 +115,28 @@
))
;; What packages el-get should install, both from above, and it's
;; internal list of sources.
-(el-get 'sync '(el-get
+(el-get 'sync (append
+ '(el-get)
;; Minor modes
- dtrt-indent
- smart-tabs-mode
- page-break-lines
+ '(dtrt-indent
+ page-break-lines
+ smart-tabs-mode
+ )
;; Major modes
- ;;apel flim semi wanderlust
- graphviz-dot-mode
- markdown-mode
- nginx-mode
- ;;nxhtml ; nxhtml is invasive, only enable if actively using
- php-mode-improved
- ))
+ (if (file-exists-p "~/Maildir") ; wanderlust is huge, only use on emailing boxes
+ '(apel flim semi wanderlust)
+ '())
+ '(
+ ;;nxhtml ; nxhtml is invasive, only enable if actively using
+ bison-mode
+ coffee-mode
+ graphviz-dot-mode
+ haml-mode
+ markdown-mode
+ nginx-mode
+ php-mode-improved
+ scss-mode
+ )))
;; Misc. crap
@@ -223,6 +237,16 @@ sh-script.el is broken."
(smerge-mode 1))))
(add-hook 'find-file-hook 'try-smerge-mode t)
+;; http://www.emacswiki.org/emacs/XModMapMode
+(when (not (fboundp 'xmodmap-mode))
+ (define-generic-mode 'xmodmap-mode
+ '(?!)
+ '("add" "clear" "keycode" "keysym" "pointer" "remove")
+ nil
+ '("[xX]modmap\\(rc\\)?\\'")
+ nil
+ "Simple mode for xmodmap files."))
+
;; All my weird mode-specific settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -273,3 +297,4 @@ sh-script.el is broken."
(add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode))
(add-to-list 'auto-mode-alist '("SRCBUILD" . sh-mode))
+(add-to-list 'auto-mode-alist '("\\.jad\\'" . java-mode))