Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 19 additions & 14 deletions leaf-keywords-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,10 @@ Example
:config (leaf-init))
(prog1 'leaf
(leaf-handler-package leaf leaf nil)
(feather-add-after-installed-hook-sexp leaf
(leaf-pre-init)
(leaf-init))))
(eval
(feather-add-after-installed-hook-sexp leaf
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use spaces instead of hard tabs?

(leaf-pre-init)
(leaf-init)))))

;; multi symbols will be accepted
((leaf leaf
Expand All @@ -315,9 +316,10 @@ Example
(prog1 'leaf
(leaf-handler-package leaf leaf nil)
(leaf-handler-package leaf leaf-polyfill nil)
(feather-add-after-installed-hook-sexp leaf-polyfill
(leaf-pre-init)
(leaf-init))))
(eval
(feather-add-after-installed-hook-sexp leaf-polyfill
(leaf-pre-init)
(leaf-init)))))

;; multi symbols in list will be accepted
((leaf leaf
Expand All @@ -327,8 +329,9 @@ Example
(leaf-handler-package leaf feather nil)
(leaf-handler-package leaf leaf-key nil)
(leaf-handler-package leaf leaf-browser nil)
(feather-add-after-installed-hook-sexp leaf-browser
(leaf-init))))
(eval
(feather-add-after-installed-hook-sexp leaf-browser
(leaf-init)))))

;; multi keyword will be accepted
((leaf leaf
Expand All @@ -339,9 +342,10 @@ Example
(prog1 'leaf
(leaf-handler-package leaf leaf nil)
(leaf-handler-package leaf leaf-polyfill nil)
(feather-add-after-installed-hook-sexp leaf-polyfill
(leaf-pre-init)
(leaf-init))))
(eval
(feather-add-after-installed-hook-sexp leaf-polyfill
(leaf-pre-init)
(leaf-init)))))

;; keywords such as :preface that expand before :feather
;; are not registered in the hook of feather
Expand All @@ -353,9 +357,10 @@ Example
(prog1 'leaf
(leaf-preface)
(leaf-handler-package leaf leaf nil)
(feather-add-after-installed-hook-sexp leaf
(leaf-pre-init)
(leaf-init))))))
(eval
(feather-add-after-installed-hook-sexp leaf
(leaf-pre-init)
(leaf-init)))))))

(cort-deftest-with-macroexpand leaf/el-get
'(((leaf leaf
Expand Down
2 changes: 1 addition & 1 deletion leaf-keywords.el
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
(defcustom leaf-keywords-after-conditions
(leaf-list
:feather `(,@(mapcar (lambda (elm) `(leaf-handler-package ,leaf--name ,(car elm) ,(cdr elm))) leaf--value)
(feather-add-after-installed-hook-sexp ,(caar (last leaf--value)) ,@leaf--body))
(eval (feather-add-after-installed-hook-sexp ,(caar (last leaf--value)) ,@leaf--body)))
:straight `(,@(mapcar (lambda (elm) `(straight-use-package ',elm)) leaf--value) ,@leaf--body)
:el-get `(,@(mapcar (lambda (elm) `(el-get-bundle ,@elm)) leaf--value) ,@leaf--body)
:ensure-system-package
Expand Down