From aaa86c4187942abc0869a133e917dbf32b95bb6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Fri, 26 Oct 2018 23:27:56 -0500 Subject: =?UTF-8?q?single=20syntax=20with=20=C2=ABuse-package=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lisp/init-markdown.el | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'lisp/init-markdown.el') 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 "\n" @@ -30,6 +28,6 @@ (goto-char (point-max)) (insert "\n" "\n" - "\n")) + "\n"))) (provide 'init-markdown) -- cgit v1.2.3