emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/leaf f425433 14/46: Revert "add :commands* keyword"


From: Stefan Monnier
Subject: [elpa] externals/leaf f425433 14/46: Revert "add :commands* keyword"
Date: Mon, 15 Mar 2021 22:20:43 -0400 (EDT)

branch: externals/leaf
commit f425433017d613b2fa01e9f66d5fc94a81004c32
Author: Naoya Yamashita <conao3@gmail.com>
Commit: Naoya Yamashita <conao3@gmail.com>

    Revert "add :commands* keyword"
    
    This reverts commit a82c47d694d270c8d0ed7e23455dbc9f8bb12e80.
---
 leaf-tests.el | 47 -----------------------------------------------
 leaf.el       |  7 +++----
 2 files changed, 3 insertions(+), 51 deletions(-)

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 00365d6..d7f1d7b 100644
--- a/leaf.el
+++ b/leaf.el
@@ -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'"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]