summaryrefslogtreecommitdiff
path: root/lisp/use-package
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2020-06-29 11:56:42 -0700
committerGitHub <noreply@github.com>2020-06-29 11:56:42 -0700
commit3e96664ffe8f870118d730cc42b9c99f43134cbf (patch)
tree577837edab0f25a30d7f80d1e4af438cf15b9527 /lisp/use-package
parent4e72885f852604dc17c5bd543dc6cb88c44cf2f1 (diff)
parent8c31c57106e2938d627bf4107627c003620d2dd5 (diff)
downloademacs-3e96664ffe8f870118d730cc42b9c99f43134cbf.tar.gz
emacs-3e96664ffe8f870118d730cc42b9c99f43134cbf.tar.bz2
emacs-3e96664ffe8f870118d730cc42b9c99f43134cbf.zip
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
Diffstat (limited to 'lisp/use-package')
-rw-r--r--lisp/use-package/use-package-core.el4
1 files changed, 3 insertions, 1 deletions
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)))