Ignore package! if package is disabled

This allows you to disable packages with (def-package-hook! X :disable)
without an accompanying (package! X :ignore t). This reduces redundancy.
This commit is contained in:
Henrik Lissner 2018-03-12 13:12:40 -04:00
parent a8906cc077
commit 5c36519dab
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -527,6 +527,7 @@ Accepts the following properties:
:ignore FORM Do not install this package if FORM is non-nil. :ignore FORM Do not install this package if FORM is non-nil.
:freeze FORM Do not update this package if FORM is non-nil." :freeze FORM Do not update this package if FORM is non-nil."
(declare (indent defun)) (declare (indent defun))
(unless (memq name doom-disabled-packages)
(let* ((old-plist (assq name doom-packages)) (let* ((old-plist (assq name doom-packages))
(pkg-recipe (or (plist-get plist :recipe) (pkg-recipe (or (plist-get plist :recipe)
(and old-plist (plist-get old-plist :recipe)))) (and old-plist (plist-get old-plist :recipe))))
@ -542,7 +543,7 @@ Accepts the following properties:
(plist-put plist prop (eval val)))) (plist-put plist prop (eval val))))
`(progn `(progn
,(if (and pkg-pin t) `(map-put package-pinned-packages ',name ,pkg-pin)) ,(if (and pkg-pin t) `(map-put package-pinned-packages ',name ,pkg-pin))
(map-put doom-packages ',name ',plist)))) (map-put doom-packages ',name ',plist)))))
(defmacro depends-on! (module submodule &optional flags) (defmacro depends-on! (module submodule &optional flags)
"Declares that this module depends on another. "Declares that this module depends on another.