[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/leaf 1695574 11/46: update document, tagged v4.3.4
From: |
Stefan Monnier |
Subject: |
[elpa] externals/leaf 1695574 11/46: update document, tagged v4.3.4 |
Date: |
Mon, 15 Mar 2021 22:20:43 -0400 (EDT) |
branch: externals/leaf
commit 1695574310b44231269ca4c3e25deb15118ed1fd
Author: Naoya Yamashita <conao3@gmail.com>
Commit: Naoya Yamashita <conao3@gmail.com>
update document, tagged v4.3.4
---
README.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
README.org | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
leaf.el | 2 +-
3 files changed, 106 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index e12375a..2299150 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@
- [:package, :ensure keywords](#package-ensure-keywords)
- [:preface, :init, :config keywords](#preface-init-config-keywords)
- [:defer-config keyword](#defer-config-keyword)
- - [:commands keyword](#commands-keyword)
+ - [:commands, :commands keywords](#commands-commands-keyword)
- [:after keyword](#after-keyword)
- [:bind, :bind* keywords](#bind-bind-keywords)
- [Configure variables keywords](#configure-variables-keywords)
@@ -515,7 +515,7 @@ You don't need to put `progn` because `leaf` can receive
multiple S-expressions,
-## :commands keyword
+## :commands, :commands* keyword
`commands` keyword configures `autoload` for its leaf-block name.
@@ -558,6 +558,56 @@ You don't need to put `progn` because `leaf` can receive
multiple S-expressions,
(autoload #'leaf-insert-list-after "leaf" nil t)))))
```
+`:commands` keyword genrates `autoload` statement but no-interactive one.
+
+```emacs-lisp
+(cort-deftest-with-macroexpand leaf/commands*
+ '(
+ ;; specify a symbol to set to autoload function
+ ((leaf leaf
+ :commands* leaf
+ :config (leaf-init))
+ (prog1 'leaf
+ (unless (fboundp 'leaf) (autoload #'leaf "leaf"))
+ (eval-after-load 'leaf
+ '(progn
+ (leaf-init)))))
+
+ ;; multi symbols will be accepted
+ ((leaf leaf
+ :commands* leaf leaf-pairp leaf-plist-get)
+ (prog1 'leaf
+ (unless (fboundp 'leaf) (autoload #'leaf "leaf"))
+ (unless (fboundp 'leaf-pairp) (autoload #'leaf-pairp "leaf"))
+ (unless (fboundp 'leaf-plist-get) (autoload #'leaf-plist-get "leaf"))))
+
+ ;; multi symbols in list will be accepted
+ ((leaf leaf
+ :commands* (leaf leaf-pairp leaf-plist-get))
+ (prog1 'leaf
+ (unless (fboundp 'leaf) (autoload #'leaf "leaf"))
+ (unless (fboundp 'leaf-pairp) (autoload #'leaf-pairp "leaf"))
+ (unless (fboundp 'leaf-plist-get) (autoload #'leaf-plist-get "leaf"))))
+
+ ;; It is accepted even if you specify symbol and list at the same time
+ ((leaf leaf
+ :commands* leaf (leaf-pairp leaf-plist-get (leaf-insert-list-after)))
+ (prog1 'leaf
+ (unless (fboundp 'leaf) (autoload #'leaf "leaf"))
+ (unless (fboundp 'leaf-pairp) (autoload #'leaf-pairp "leaf"))
+ (unless (fboundp 'leaf-plist-get) (autoload #'leaf-plist-get "leaf"))
+ (unless (fboundp 'leaf-insert-list-after) (autoload
#'leaf-insert-list-after "leaf"))))
+
+ ;; specify cdr value to define other package function
+ ((leaf leaf
+ :commands* (org-crypt-use-before-save-magic . org-crypt)
+ :config (leaf-init))
+ (prog1 'leaf
+ (unless (fboundp 'org-crypt-use-before-save-magic) (autoload
#'org-crypt-use-before-save-magic "org-crypt"))
+ (eval-after-load 'leaf
+ '(progn
+ (leaf-init)))))))
+```
## :after keyword
diff --git a/README.org b/README.org
index e984449..5ff2c67 100644
--- a/README.org
+++ b/README.org
@@ -29,7 +29,7 @@
- [[#ensure][:ensure, :package keywords]]
- [[:preface, :init, :config keywords]]
- [[:defer-config keyword]]
- - [[:commands keyword]]
+ - [[:commands, :commands* keyword]]
- [[:after keyword]]
- [[:bind, :bind* keywords]]
- [[Configure variables keywords]]
@@ -529,7 +529,7 @@ S-expressions, but you can do so if you prefer it.
(leaf-pre-init-after)))))))
#+end_src
-** :commands keyword
+** :commands, :commands* keyword
~commands~ keyword configures ~autoload~ for its leaf-block name.
@@ -572,6 +572,57 @@ S-expressions, but you can do so if you prefer it.
(autoload #'leaf-insert-list-after "leaf" nil t)))))
#+end_src
+~:commands~ keyword genrates ~autoload~ statement but no-interactive one.
+
+#+begin_src emacs-lisp
+ (cort-deftest-with-macroexpand leaf/commands*
+ '(
+ ;; specify a symbol to set to autoload function
+ ((leaf leaf
+ :commands* leaf
+ :config (leaf-init))
+ (prog1 'leaf
+ (unless (fboundp 'leaf) (autoload #'leaf "leaf"))
+ (eval-after-load 'leaf
+ '(progn
+ (leaf-init)))))
+
+ ;; multi symbols will be accepted
+ ((leaf leaf
+ :commands* leaf leaf-pairp leaf-plist-get)
+ (prog1 'leaf
+ (unless (fboundp 'leaf) (autoload #'leaf "leaf"))
+ (unless (fboundp 'leaf-pairp) (autoload #'leaf-pairp "leaf"))
+ (unless (fboundp 'leaf-plist-get) (autoload #'leaf-plist-get
"leaf"))))
+
+ ;; multi symbols in list will be accepted
+ ((leaf leaf
+ :commands* (leaf leaf-pairp leaf-plist-get))
+ (prog1 'leaf
+ (unless (fboundp 'leaf) (autoload #'leaf "leaf"))
+ (unless (fboundp 'leaf-pairp) (autoload #'leaf-pairp "leaf"))
+ (unless (fboundp 'leaf-plist-get) (autoload #'leaf-plist-get
"leaf"))))
+
+ ;; It is accepted even if you specify symbol and list at the same time
+ ((leaf leaf
+ :commands* leaf (leaf-pairp leaf-plist-get (leaf-insert-list-after)))
+ (prog1 'leaf
+ (unless (fboundp 'leaf) (autoload #'leaf "leaf"))
+ (unless (fboundp 'leaf-pairp) (autoload #'leaf-pairp "leaf"))
+ (unless (fboundp 'leaf-plist-get) (autoload #'leaf-plist-get "leaf"))
+ (unless (fboundp 'leaf-insert-list-after) (autoload
#'leaf-insert-list-after "leaf"))))
+
+ ;; specify cdr value to define other package function
+ ((leaf leaf
+ :commands* (org-crypt-use-before-save-magic . org-crypt)
+ :config (leaf-init))
+ (prog1 'leaf
+ (unless (fboundp 'org-crypt-use-before-save-magic) (autoload
#'org-crypt-use-before-save-magic "org-crypt"))
+ (eval-after-load 'leaf
+ '(progn
+ (leaf-init)))))))
+#+end_src
+
** :after keyword
~:after~ keyword configure loading order.
diff --git a/leaf.el b/leaf.el
index 00365d6..0291399 100644
--- a/leaf.el
+++ b/leaf.el
@@ -5,7 +5,7 @@
;; Author: Naoya Yamashita <conao3@gmail.com>
;; Maintainer: Naoya Yamashita <conao3@gmail.com>
;; Keywords: lisp settings
-;; Version: 4.3.3
+;; Version: 4.3.4
;; URL: https://github.com/conao3/leaf.el
;; Package-Requires: ((emacs "24.1"))
- [elpa] externals/leaf d6c12f1 33/46: tagged v4.3.7, (continued)
- [elpa] externals/leaf d6c12f1 33/46: tagged v4.3.7, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf 1db35d4 19/46: format sexp, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf 39e0359 37/46: Merge pull request #480 from conao3/feature#479, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf 1ee956d 42/46: tagged v4.3.9, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf 31e1fac 07/46: Added support to find the leaf block., Stefan Monnier, 2021/03/15
- [elpa] externals/leaf bafd5c5a 18/46: move leaf-find-regexp definition, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf cb35aac 34/46: Merge pull request #478 from conao3/feature#477, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf 2d210be 24/46: expand :leaf-path keyword anytime but set suppress-keywords, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf fbe9bfb 43/46: Merge pull request #468 from Z572/leaf-key-list-mode, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf 38ef506 45/46: tagged v4.4.0, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf 1695574 11/46: update document, tagged v4.3.4,
Stefan Monnier <=
- [elpa] externals/leaf 005481d 28/46: tagged v4.3.6, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf fc8924d 27/46: add just eval-buffer, byte-compile situation, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf fe1003f 39/46: align load-file-name, Stefan Monnier, 2021/03/15