summaryrefslogtreecommitdiff
path: root/init/km-modes.el
diff options
context:
space:
mode:
Diffstat (limited to 'init/km-modes.el')
-rw-r--r--init/km-modes.el18
1 files changed, 18 insertions, 0 deletions
diff --git a/init/km-modes.el b/init/km-modes.el
new file mode 100644
index 0000000..071ae56
--- /dev/null
+++ b/init/km-modes.el
@@ -0,0 +1,18 @@
+;; these could be kept alongside related topics, but for whatever reason
+;; I prefer having them together
+
+(defvar km/modes '(
+ ("\\.md$" . markdown-mode)
+ ("\\.markdown$" . markdown-mode)
+ ("\\.zsh$" . shell-script-mode)
+ ("\\.*rc$" . conf-unix-mode)
+ ("\\.org.txt$" . org-mode)
+ ("/mutt" . mail-mode)
+ )
+ "Auto mode mappings")
+
+(defun km/add-mode (mode)
+ (setq auto-mode-alist
+ (cons mode auto-mode-alist)))
+
+(mapcar 'km/add-mode km/modes)