use-package-core.el: use the Emacs set-default function to avoid saving :custom vars twice

This commit is contained in:
Ted Zlatanov 2020-06-22 14:17:21 -04:00
parent 4e72885f85
commit 8c31c57106

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)))