General refactor (use map.el more)
+ map-delete is shorter and faster than assq-delete-all + map-put is simpler than the delete-then-set workflow + map-merge is great for merging default and user settings
This commit is contained in:
parent
2eeb6ce0d9
commit
392f04446f
7 changed files with 27 additions and 42 deletions
|
@ -463,12 +463,8 @@ Accepts the following properties:
|
|||
(when-let* ((val (plist-get plist prop)))
|
||||
(plist-put plist prop (eval val))))
|
||||
`(progn
|
||||
(when ,(and pkg-pin t)
|
||||
(cl-pushnew (cons ',name ,pkg-pin) package-pinned-packages
|
||||
:test #'eq :key #'car))
|
||||
(when ,(and old-plist t)
|
||||
(assq-delete-all ',name doom-packages))
|
||||
(push ',(cons name plist) doom-packages))))
|
||||
,(if (and pkg-pin t) `(map-put package-pinned-packages ',name ,pkg-pin))
|
||||
(map-put doom-packages ',name ',plist))))
|
||||
|
||||
(defmacro depends-on! (module submodule)
|
||||
"Declares that this module depends on another.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue