summaryrefslogtreecommitdiff
path: root/lisp/use-package/use-package-core.el
diff options
context:
space:
mode:
authorTed Zlatanov <tzz@lifelogs.com>2020-11-29 12:23:02 +0000
committerTed Zlatanov <tzz@lifelogs.com>2020-11-29 14:56:10 +0000
commita3c310c11a9ec311a4028d7ce8da4c2fd204a46b (patch)
tree5435aa0746f5c8595c66291bcfbd642d821d31c0 /lisp/use-package/use-package-core.el
parent5ceb51ae198cca77cdf911feee81924d800bdd75 (diff)
downloademacs-a3c310c11a9ec311a4028d7ce8da4c2fd204a46b.tar.gz
emacs-a3c310c11a9ec311a4028d7ce8da4c2fd204a46b.tar.bz2
emacs-a3c310c11a9ec311a4028d7ce8da4c2fd204a46b.zip
Create new "use-package" themse and use it for :custom with custom-theme-set-variables
Diffstat (limited to 'lisp/use-package/use-package-core.el')
-rw-r--r--lisp/use-package/use-package-core.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el
index 933e94aa2bd..c44c36f77fd 100644
--- a/lisp/use-package/use-package-core.el
+++ b/lisp/use-package/use-package-core.el
@@ -43,6 +43,11 @@
(require 'cl-lib)
(require 'tabulated-list)
+;; Declare a synthetic theme for :custom variables.
+;; Necessary in order to avoid having those variables saved by custom.el.
+(deftheme use-package)
+(enable-theme 'use-package)
+
(if (and (eq emacs-major-version 24) (eq emacs-minor-version 3))
(defsubst hash-table-keys (hash-table)
"Return a list of keys in HASH-TABLE."
@@ -1394,8 +1399,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)
- `(put ',variable 'theme-value '((use-package-synthetic-theme ignore-just-for-saving)))))
+ `(let ((custom--inhibit-theme-enable nil))
+ (custom-theme-set-variables 'use-package
+ '(,variable ,value nil () ,comment)))))
args)
(use-package-process-keywords name rest state)))