Merge pull request from tzz/custom-set-default

use-package-core.el: use the Emacs set-default function to avoid saving :custom vars twice
GitHub-reference: https://github.com/jwiegley/use-package/issues/850
This commit is contained in:
John Wiegley 2020-06-29 11:56:42 -07:00 committed by GitHub
commit 3e96664ffe

View file

@ -1394,7 +1394,9 @@ no keyword implies `:all'."
(comment (nth 2 def)))
(unless (and comment (stringp comment))
(setq comment (format "Customized with use-package %s" name)))
`(customize-set-variable (quote ,variable) ,value ,comment)))
`(funcall (or (get (quote ,variable) 'custom-set) #'set-default)
(quote ,variable)
,value)))
args)
(use-package-process-keywords name rest state)))