Works as :custom
keyword, but instead of a value takes update function or the second (the first is the original one) argument to the default updater
(use-package use-package-custom-update
:quelpa
(use-package-custom-update :repo "a13/use-package-custom-update" :fetcher github :version original))
If you want to add elements to a list testlist (similar to add-to-list
)
(use-package emacs
:custom-update
(testlist '(1 2)))
By default a variable is modified by use-package-custom-update-union
function, which takes a variable value (or its symbol, if use-package-custom-update-updater-use-symbol
is set to true) as the first argument, and the supplied updater second, you can customize it by setting use-package-custom-update-default-updater
function.
(use-package emacs
:custom-update
(testlist (lambda (old-value)
(append old-value '(1 2 3)))))