Remove :shadow keyword from package!

Is redundant with the :includes keyword in straight.el recipes.
This commit is contained in:
Henrik Lissner 2021-05-04 16:05:09 -04:00
parent f4382b45fd
commit 29059bacbe
2 changed files with 10 additions and 24 deletions

View file

@ -209,21 +209,11 @@ processed."
(let (packages) (let (packages)
(dolist (package doom-packages) (dolist (package doom-packages)
(cl-destructuring-bind (cl-destructuring-bind
(name &key recipe disable ignore shadow &allow-other-keys) package (name &key recipe disable ignore &allow-other-keys) package
(if ignore (if ignore
(straight-override-recipe (cons name '(:type built-in))) (straight-override-recipe (cons name '(:type built-in)))
(if disable (if disable
(cl-pushnew name doom-disabled-packages) (cl-pushnew name doom-disabled-packages)
(when shadow
(straight-override-recipe (cons shadow `(:local-repo nil :package included :build nil :included-by ,name)))
(let ((site-load-path (copy-sequence doom--initial-load-path))
lib)
(while (setq
lib (locate-library (concat (symbol-name shadow) ".el")
nil site-load-path))
(let ((lib (directory-file-name (file-name-directory lib))))
(setq site-load-path (delete lib site-load-path)
load-path (delete lib load-path))))))
(when recipe (when recipe
(straight-override-recipe (cons name recipe))) (straight-override-recipe (cons name recipe)))
(appendq! packages (cons name (straight--get-dependencies name))))))) (appendq! packages (cons name (straight--get-dependencies name)))))))
@ -440,7 +430,7 @@ ones."
;;; Module package macros ;;; Module package macros
(cl-defmacro package! (cl-defmacro package!
(name &rest plist &key built-in recipe ignore _type _pin _disable _shadow) (name &rest plist &key built-in recipe ignore _type _pin _disable)
"Declares a package and how to install it (if applicable). "Declares a package and how to install it (if applicable).
This macro is declarative and does not load nor install packages. It is used to This macro is declarative and does not load nor install packages. It is used to
@ -477,10 +467,6 @@ Accepts the following properties:
inform help commands like `doom/help-packages' that this is a built-in inform help commands like `doom/help-packages' that this is a built-in
package. If set to 'prefer, the package will not be installed if it is package. If set to 'prefer, the package will not be installed if it is
already provided by Emacs. already provided by Emacs.
:shadow PACKAGE
Informs Doom that this package is shadowing a built-in PACKAGE; the original
package will be removed from `load-path' to mitigate conflicts, and this new
package will satisfy any dependencies on PACKAGE in the future.
Returns t if package is successfully registered, and nil if it was disabled Returns t if package is successfully registered, and nil if it was disabled
elsewhere." elsewhere."

View file

@ -1,10 +1,10 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; lang/org/packages.el ;;; lang/org/packages.el
;; Install cutting-edge version of org-mode, and from a mirror, because
;; code.orgmode.org runs on a potato.
(package! org-mode (package! org-mode
:recipe (:host github :recipe (:host github
;; Install cutting-edge version of org-mode, and from a mirror,
;; because code.orgmode.org runs on a potato.
:repo "emacs-straight/org-mode" :repo "emacs-straight/org-mode"
:files ("*.el" "lisp/*.el" "contrib/lisp/*.el" "contrib/scripts") :files ("*.el" "lisp/*.el" "contrib/lisp/*.el" "contrib/scripts")
;; HACK A necessary hack because org requires a compilation step ;; HACK A necessary hack because org requires a compilation step
@ -18,12 +18,12 @@
(with-temp-file (doom-path (straight--repos-dir "org-mode") "org-version.el") (with-temp-file (doom-path (straight--repos-dir "org-mode") "org-version.el")
(insert "(fset 'org-release (lambda () \"9.5\"))\n" (insert "(fset 'org-release (lambda () \"9.5\"))\n"
"(fset 'org-git-version #'ignore)\n" "(fset 'org-git-version #'ignore)\n"
"(provide 'org-version)\n"))) "(provide 'org-version)\n"))
:pin "7a62a4d3251a512069aa06b0082529d61d22de26" ;; Prevents built-in Org from sneaking into the byte-compilation of
;; Prevents built-in Org from sneaking into the byte-compilation of ;; `org-plus-contrib', and inform other packages that `org-mode'
;; `org-plus-contrib', and inform other packages that `org-mode' satisfies the ;; satisfies the `org' dependency: raxod502/straight.el#352
;; `org' dependency: https://github.com/raxod502/straight.el/issues/352 :includes (org org-plus-contrib))
:shadow 'org) :pin "7a62a4d3251a512069aa06b0082529d61d22de26")
(package! avy) (package! avy)
(package! htmlize :pin "49205105898ba8993b5253beec55d8bddd820a70") (package! htmlize :pin "49205105898ba8993b5253beec55d8bddd820a70")