From: Joe Wreschnig Date: Fri, 18 Aug 2017 20:52:36 +0000 (+0200) Subject: Provide an example `use-package’ declaration. X-Git-Url: https://git.korewanetadesu.com/?a=commitdiff_plain;h=9bc77986bbc61389013030294e2036b8d8bb1ed3;p=pelican-mode.git Provide an example `use-package’ declaration. --- diff --git a/README.md b/README.md index e29499d..8bbca6a 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,19 @@ AsciiDoc, and Org. It also assumes you've set up Pelican with To enable by default on all text files in a Pelican site: - (require 'pelican-mode) - (pelican-global-mode) +``` emacs-lisp +(require 'pelican-mode) +(pelican-global-mode) +``` + +Or with `use-package` and deferred loading: + +``` emacs-lisp +(use-package pelican-mode + :after (:any org rst markdown-mode adoc-mode) + :config + (pelican-global-mode)) +``` Or, register `pelican-mode` or `pelican-mode-enable-if-site` as hook functions for more direct control. diff --git a/pelican-mode.el b/pelican-mode.el index 881da69..1b608be 100644 --- a/pelican-mode.el +++ b/pelican-mode.el @@ -48,6 +48,13 @@ ;; (require 'pelican-mode) ;; (pelican-global-mode) ;; +;; Or with ``use-package'' and deferred loading: +;; +;; (use-package pelican-mode +;; :after (:any org rst markdown-mode adoc-mode) +;; :config +;; (pelican-global-mode)) +;; ;; Or, register `pelican-mode' or `pelican-mode-enable-if-site' ;; as hook functions for more direct control.