mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
package!: accept 'prefer in :built-in property
This tells Doom's package manager to prefer the built-in package, if it is present, rather than installing the new version from elpa.
This commit is contained in:
@ -178,7 +178,8 @@ Accepts the following properties:
|
||||
:freeze FORM
|
||||
Do not update this package if FORM is non-nil.
|
||||
:built-in BOOL
|
||||
Same as :ignore if the package is a built-in Emacs package.
|
||||
Same as :ignore if the package is a built-in Emacs package. If set to
|
||||
'prefer, will use built-in package if it is present.
|
||||
|
||||
Returns t if package is successfully registered, and nil if it was disabled
|
||||
elsewhere."
|
||||
@ -203,6 +204,8 @@ elsewhere."
|
||||
plist (plist-put plist :modules module-list))))
|
||||
(when built-in
|
||||
(doom-log "Ignoring built-in package '%s'" name)
|
||||
(when (eq built-in 'prefer)
|
||||
(setq built-in '(locate-library ,(symbol-name name) nil doom-site-load-path)))
|
||||
(setq plist (plist-put plist :ignore built-in)))
|
||||
(while plist
|
||||
(unless (null (cadr plist))
|
||||
|
Reference in New Issue
Block a user