summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-10-14 17:42:41 -0700
committerFranck Cuny <franck@fcuny.net>2022-10-14 17:42:41 -0700
commitdae4b42da919f56eee7ade68f0dd45bbc7a65f61 (patch)
tree1e37a618a92f2a6286a53d320e93cc0862c34fb5
parentref: don't coerce eldoc's buffer to a small window (diff)
downloademacs.d-dae4b42da919f56eee7ade68f0dd45bbc7a65f61.tar.gz
ref(text): use gfm-mode for README.md files
Change-Id: I590cff96b935202c6d8b2bd9c0d3fe56e0699cc8
-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")