aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/init-markdown.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/init-markdown.el')
-rw-r--r--lisp/init-markdown.el24
1 files changed, 11 insertions, 13 deletions
diff --git a/lisp/init-markdown.el b/lisp/init-markdown.el
index b777470..0e86560 100644
--- a/lisp/init-markdown.el
+++ b/lisp/init-markdown.el
@@ -1,20 +1,18 @@
;;----------------------------------------------------------------------------
;; Markdown mode
;;----------------------------------------------------------------------------
-(use-package markdown-mode)
+(use-package markdown-mode
+ :mode (("\\.markdown\\'" . markdown-mode)
+ ("\\.md\\'" . markdown-mode))
-(autoload 'markdown-mode "markdown-mode"
- "Major mode for editing Markdown files" t)
-(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
-(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
+ :config
+ ;;----------------------------------------------------------------------------
+ ;; Generated HTML 5 and UTF-8 with Markdown
+ ;;----------------------------------------------------------------------------
+ (eval-after-load "markdown-mode"
+ '(defalias 'markdown-add-xhtml-header-and-footer 'as/markdown-add-xhtml-header-and-footer))
-;;----------------------------------------------------------------------------
-;; Generated HTML 5 and UTF-8 with Markdown
-;;----------------------------------------------------------------------------
-(eval-after-load "markdown-mode"
- '(defalias 'markdown-add-xhtml-header-and-footer 'as/markdown-add-xhtml-header-and-footer))
-
-(defun as/markdown-add-xhtml-header-and-footer (title)
+ (defun as/markdown-add-xhtml-header-and-footer (title)
"Wrap XHTML header and footer with given TITLE around current buffer."
(goto-char (point-min))
(insert "<!DOCTYPE html>\n"
@@ -30,6 +28,6 @@
(goto-char (point-max))
(insert "\n"
"</body>\n"
- "</html>\n"))
+ "</html>\n")))
(provide 'init-markdown)