diff options
author | John Wiegley <johnw@newartisans.com> | 2021-01-06 13:45:39 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-06 13:45:39 -0800 |
commit | 3ffb662dccaed79df073f3a77639285f93b98d2b (patch) | |
tree | 5435aa0746f5c8595c66291bcfbd642d821d31c0 /lisp/use-package/use-package-core.el | |
parent | 99643f8873e4181df7c1f61fa2bfb7d3b432b9db (diff) | |
parent | a3c310c11a9ec311a4028d7ce8da4c2fd204a46b (diff) | |
download | emacs-3ffb662dccaed79df073f3a77639285f93b98d2b.tar.gz emacs-3ffb662dccaed79df073f3a77639285f93b98d2b.tar.bz2 emacs-3ffb662dccaed79df073f3a77639285f93b98d2b.zip |
Merge pull request from tzz/tzz/set-comment-and-synthetic-theme
GitHub-reference: https://github.com/jwiegley/use-package/issues/881
Diffstat (limited to 'lisp/use-package/use-package-core.el')
-rw-r--r-- | lisp/use-package/use-package-core.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index cd5b907a0b0..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,9 +1399,9 @@ no keyword implies `:all'." (comment (nth 2 def))) (unless (and comment (stringp comment)) (setq comment (format "Customized with use-package %s" name))) - `(funcall (or (get (quote ,variable) 'custom-set) #'set-default) - (quote ,variable) - ,value))) + `(let ((custom--inhibit-theme-enable nil)) + (custom-theme-set-variables 'use-package + '(,variable ,value nil () ,comment))))) args) (use-package-process-keywords name rest state))) |