From dae4b42da919f56eee7ade68f0dd45bbc7a65f61 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 14 Oct 2022 17:42:41 -0700 Subject: ref(text): use gfm-mode for README.md files Change-Id: I590cff96b935202c6d8b2bd9c0d3fe56e0699cc8 --- emacs/custom/my-text.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'emacs/custom') 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") -- cgit 1.4.1