fix(lib): doom-plist-merge causing side-effects
This one was sneaky. `doom-plist-merge` was mutating the second plist fed to it, causing issues upwind of its uses. In #7925, for example, calling `doom-package-recipe` to read a package's recipe would end up altering it, copying sub-properties of :recipe to other packages' recipes. If you've hit #7925, you'll also need to delete your build-cache to get around the error. I.e. rm -f $EMACSDIR/.local/straight/build-*-cache.el doom sync # or upgrade Fix: #7925
This commit is contained in:
parent
96de02c769
commit
944eef90ec
1 changed files with 4 additions and 3 deletions
|
@ -29,9 +29,10 @@
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom-plist-merge (from-plist to-plist)
|
(defun doom-plist-merge (from-plist to-plist)
|
||||||
"Non-destructively merge FROM-PLIST onto TO-PLIST"
|
"Non-destructively merge FROM-PLIST onto TO-PLIST"
|
||||||
(let ((plist (copy-sequence from-plist)))
|
(let ((from-plist (copy-sequence from-plist))
|
||||||
(while plist
|
(to-plist (copy-sequence to-plist)))
|
||||||
(cl-callf plist-put to-plist (pop plist) (pop plist)))
|
(while from-plist
|
||||||
|
(cl-callf plist-put to-plist (pop from-plist) (pop from-plist)))
|
||||||
to-plist))
|
to-plist))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue