Eval unpin! logic at runtime
This commit is contained in:
parent
4b2a9c8c38
commit
835f3f2c53
1 changed files with 14 additions and 14 deletions
|
@ -317,20 +317,20 @@ can be used one of five ways:
|
||||||
(unpin! (:lang python) (:tools docker))
|
(unpin! (:lang python) (:tools docker))
|
||||||
|
|
||||||
Or any combination of the above."
|
Or any combination of the above."
|
||||||
(dolist (target targets)
|
`(dolist (target ',targets)
|
||||||
(cond
|
(cond
|
||||||
((eq target t)
|
((eq target t)
|
||||||
(setq doom-pinned-packages nil))
|
(setq doom-pinned-packages nil))
|
||||||
((or (keywordp target)
|
((or (keywordp target)
|
||||||
(listp target))
|
(listp target))
|
||||||
(cl-destructuring-bind (category &optional module) (doom-enlist target)
|
(cl-destructuring-bind (category &optional module) (doom-enlist target)
|
||||||
(dolist (pkg doom-packages)
|
(dolist (pkg doom-packages)
|
||||||
(when-let (mod (assq category (plist-get (cdr pkg) :modules)))
|
(when-let (mod (assq category (plist-get (cdr pkg) :modules)))
|
||||||
(and (or (null module)
|
(and (or (null module)
|
||||||
(eq (cdr mod) module))
|
(eq (cdr mod) module))
|
||||||
(assq-delete-all (car pkg) doom-pinned-packages))))))
|
(assq-delete-all (car pkg) doom-pinned-packages))))))
|
||||||
((symbolp target)
|
((symbolp target)
|
||||||
(assq-delete-all target doom-pinned-packages)))))
|
(assq-delete-all target doom-pinned-packages)))))
|
||||||
|
|
||||||
(provide 'core-packages)
|
(provide 'core-packages)
|
||||||
;;; core-packages.el ends here
|
;;; core-packages.el ends here
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue