Reduce def-package magic; explicitly use :when property
This commit is contained in:
parent
e4b5cf5a56
commit
3e63d2d23b
19 changed files with 55 additions and 37 deletions
|
@ -283,14 +283,8 @@ byte-compilation."
|
|||
;; Benchmark
|
||||
(add-hook 'after-init-hook 'doom--display-benchmark t))))
|
||||
|
||||
(defmacro def-package! (name &rest plist)
|
||||
"Defines and configures a package using `use-package'. Packages are deferred
|
||||
by default. If the package isn't installed or loaded, `def-package!' is
|
||||
ignored."
|
||||
(when (or (featurep name)
|
||||
(progn (doom-initialize)
|
||||
(package-installed-p name)))
|
||||
`(use-package ,name ,@plist)))
|
||||
(defalias 'def-package! 'use-package
|
||||
"An alias for `use-package'. Note that packages are deferred by default.")
|
||||
|
||||
(defmacro load! (filesym &optional path noerror)
|
||||
"Loads a file relative to the current module (or PATH). FILESYM is a file path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue