[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/leaf b07b728 16/46: Merge pull request #476 from conao3
From: |
Stefan Monnier |
Subject: |
[elpa] externals/leaf b07b728 16/46: Merge pull request #476 from conao3/feature#475 |
Date: |
Mon, 15 Mar 2021 22:20:43 -0400 (EDT) |
branch: externals/leaf
commit b07b7280c13debc261681553ca98ddea91e8d5b0
Merge: ad2d3ee 7cce6cc
Author: Naoya Yamashita <conao3@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #476 from conao3/feature#475
feature#475
---
README.md | 54 ++----------------------------------------------------
README.org | 55 ++-----------------------------------------------------
leaf-tests.el | 47 -----------------------------------------------
leaf.el | 9 ++++-----
4 files changed, 8 insertions(+), 157 deletions(-)
diff --git a/README.md b/README.md
index 2299150..e12375a 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, :commands keywords](#commands-commands-keyword)
+ - [:commands keyword](#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, :commands* keyword
+## :commands keyword
`commands` keyword configures `autoload` for its leaf-block name.
@@ -558,56 +558,6 @@ 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 5ff2c67..e984449 100644
--- a/README.org
+++ b/README.org
@@ -29,7 +29,7 @@
- [[#ensure][:ensure, :package keywords]]
- [[:preface, :init, :config keywords]]
- [[:defer-config keyword]]
- - [[:commands, :commands* keyword]]
+ - [[: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, :commands* keyword
+** :commands keyword
~commands~ keyword configures ~autoload~ for its leaf-block name.
@@ -572,57 +572,6 @@ 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-tests.el b/leaf-tests.el
index 4a59c22..1a78e53 100644
--- a/leaf-tests.el
+++ b/leaf-tests.el
@@ -1683,53 +1683,6 @@ Example:
(unless (fboundp 'leaf-plist-get) (autoload #'leaf-plist-get "leaf" nil
t))
(unless (fboundp 'leaf-insert-list-after) (autoload
#'leaf-insert-list-after "leaf" nil t))))))
-(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)))))))
-
(cort-deftest-with-macroexpand leaf/pre-setq
'(
;; :pre-setq setq before `require'
diff --git a/leaf.el b/leaf.el
index 0291399..f56235e 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.4
+;; Version: 4.3.5
;; URL: https://github.com/conao3/leaf.el
;; Package-Requires: ((emacs "24.1"))
@@ -70,7 +70,6 @@ Same as `list' but this macro does not evaluate any
arguments."
:load-path `(,@(mapcar (lambda (elm) `(add-to-list 'load-path
,elm)) leaf--value) ,@leaf--body)
:load-path* `(,@(mapcar (lambda (elm) `(add-to-list 'load-path
(locate-user-emacs-file ,elm))) leaf--value) ,@leaf--body)
:leaf-autoload `(,@(when (car leaf--value) (mapcar (lambda (elm)
`(unless (fboundp ',(car elm)) (autoload #',(car elm) ,(cdr elm) nil t)))
(reverse leaf--autoload))) ,@leaf--body)
- :commands* `(,@(when (car leaf--value) (mapcar (lambda (elm)
`(unless (fboundp ',(car elm)) (autoload #',(car elm) ,(symbol-name (cdr
elm))))) leaf--value)) ,@leaf--body)
:defun `(,@(mapcar (lambda (elm) `(declare-function ,(car elm)
,(symbol-name (cdr elm)))) leaf--value) ,@leaf--body)
:defvar `(,@(mapcar (lambda (elm) `(defvar ,elm)) leaf--value)
,@leaf--body)
@@ -189,7 +188,7 @@ Sort by `leaf-sort-leaf--values-plist' in this order.")
(delete-dups (delq nil (leaf-flatten leaf--value)))))
((memq leaf--key (list
- :package :commands*
+ :package
:global-minor-mode
:hook :mode :interpreter :magic :magic-fallback
:defun
@@ -210,7 +209,7 @@ Sort by `leaf-sort-leaf--values-plist' in this order.")
`(,(leaf-mode-sym (if (equal '(t) elm) leaf--name (car elm)))
. ,leaf--name))
((memq leaf--key '(:hook :mode :interpreter :magic
:magic-fallback))
`(,@elm . ,(leaf-mode-sym leaf--name)))
- ((memq leaf--key '(:defun :commands*))
+ ((memq leaf--key '(:defun))
`(,@elm . ,leaf--name))
((memq leaf--key (list :pl-custom :pl-pre-setq :pl-setq
:pl-setq-default
:auth-custom :auth-pre-setq :auth-setq
:auth-setq-default))
@@ -363,7 +362,7 @@ Sort by `leaf-sort-leaf--values-plist' in this order.")
(defcustom leaf-defer-keywords (list
:bind :bind*
:mode :interpreter :magic :magic-fallback
- :hook :commands :commands*)
+ :hook :commands)
"The specified keyword is interpreted as a defer keyword.
`leaf' blocks containing the keywords are interpreted as lazy loadable.
To stop this function, specify ':leaf-defer nil'"
- [elpa] externals/leaf 7936c2f 13/46: Revert "update document, tagged v4.3.4", (continued)
- [elpa] externals/leaf 7936c2f 13/46: Revert "update document, tagged v4.3.4", Stefan Monnier, 2021/03/15
- [elpa] externals/leaf 7cce6cc 15/46: tagged v4.3.5, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf e5c185e 21/46: handle no candidates situation, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf f1746b8 41/46: use leaf-this-file instead of just ref load-file-name, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf 721319c 01/46: Add load-file-name in Warning, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf 562885f 08/46: README: add documentation about the leaf-find, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf c5ddde8 09/46: leaf-path: add test, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf a82c47d 10/46: add :commands* keyword, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf ad2d3ee 12/46: Merge pull request #472 from conao3/feature#471, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf 2edf0fc 20/46: use eq to compare symbols, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf b07b728 16/46: Merge pull request #476 from conao3/feature#475,
Stefan Monnier <=
- [elpa] externals/leaf edb220a 23/46: use eval-after-load for old Emacs<=24.3, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf 8d68ff9 30/46: Merge pull request #469 from Z572/find-func, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf cfa1047 32/46: add leaf-find-function-support to configure find-func integration, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf f0a1cf9 17/46: use backquote instead of cons, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf a1442a8 29/46: Merge branch 'master' into find-func, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf d0f9ceb 25/46: fix testcases, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf b04f3ba 36/46: tagged v4.3.8, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf bc78da0 38/46: Let the leaf-key-describe-bindings with a path, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf 539758b 26/46: add testcases, Stefan Monnier, 2021/03/15
- [elpa] externals/leaf ce10d84 22/46: use mapcan for old Emacs<=27.1, Stefan Monnier, 2021/03/15