From: Ted Zlatanov Date: Mon, 22 Jun 2020 18:17:21 +0000 (-0400) Subject: use-package-core.el: use the Emacs set-default function to avoid saving :custom vars... X-Git-Tag: emacs-29.0.90~1306^2~15^2~51^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8c31c57106;p=emacs.git use-package-core.el: use the Emacs set-default function to avoid saving :custom vars twice --- diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index e81e229a2f0..169dbc455bc 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -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)))