From d3f847eaee1da6a87482b016bb916e0781082fd6 Mon Sep 17 00:00:00 2001 From: Jimmy Yuen Ho Wong Date: Wed, 8 Jul 2020 04:57:39 +0100 Subject: [PATCH 1/2] Fix broken test due to GitHub-reference: https://github.com/jwiegley/use-package/issues/850 --- lisp/use-package/use-package-core.el | 2 +- test/lisp/use-package/use-package-tests.el | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index 169dbc455bc..94b8e451903 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -1563,7 +1563,7 @@ this file. Usage: :load-path Add to the `load-path' before attempting to load the package. :diminish Support for diminish.el (if installed). :delight Support for delight.el (if installed). -:custom Call `customize-set-variable' with each variable definition. +:custom Call `custom-set' or `set-default' with each variable definition. :custom-face Call `customize-set-faces' with each face definition. :ensure Loads the package using package.el if necessary. :pin Pin the package to an archive." diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el index 61438185373..1e89a5679ff 100644 --- a/test/lisp/use-package/use-package-tests.el +++ b/test/lisp/use-package/use-package-tests.el @@ -1133,7 +1133,11 @@ (match-expansion (use-package foo :custom (foo bar)) `(progn - (customize-set-variable 'foo bar "Customized with use-package foo") + (funcall + (or + (get 'foo 'custom-set) + (function set-default)) + 'foo bar) (require 'foo nil nil)))) (ert-deftest use-package-test/:custom-face-1 () From 13b1e202bf48893116aa359e4681682d59e55a9e Mon Sep 17 00:00:00 2001 From: Ted Zlatanov Date: Sun, 12 Jul 2020 16:09:10 -0400 Subject: [PATCH 2/2] Update the documentation for :custom as per GitHub-reference: https://github.com/jwiegley/use-package/issues/850 --- lisp/use-package/use-package-core.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index 94b8e451903..a36f73f0267 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -1563,7 +1563,9 @@ this file. Usage: :load-path Add to the `load-path' before attempting to load the package. :diminish Support for diminish.el (if installed). :delight Support for delight.el (if installed). -:custom Call `custom-set' or `set-default' with each variable definition. +:custom Call `custom-set' or `set-default' with each variable + definition without modifying the Emacs `custom-file'. + (compare with `custom-set-variables'). :custom-face Call `customize-set-faces' with each face definition. :ensure Loads the package using package.el if necessary. :pin Pin the package to an archive."