summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs/custom/my-text.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/emacs/custom/my-text.el b/emacs/custom/my-text.el
index 99961d8..91a7f54 100644
--- a/emacs/custom/my-text.el
+++ b/emacs/custom/my-text.el
@@ -4,6 +4,8 @@
 
 ;;; Code:
 
+(require 'markdown-mode)
+
 (customize-set-variable 'ispell-program-name (executable-find "aspell"))
 (customize-set-variable 'ispell-dictionary "en_US")
 (customize-set-variable 'ispell-extra-args '("--camel-case"))
@@ -14,7 +16,11 @@
 (dolist (hook '(prog-mode-hook conf-mode-hook))
   (add-hook hook 'flyspell-prog-mode))
 
-(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
+(add-to-list 'auto-mode-alist
+             '("\\.\\(md\\|markdown\\)$" . markdown-mode) auto-mode-alist)
+
+;; use GitHub's markdown flavor for README files
+(add-to-list 'auto-mode-alist '("README\\.md\\'" . gfm-mode))
 
 (customize-set-variable 'markdown-fontify-code-block-natively t)
 (when (executable-find "pandoc")