summaryrefslogtreecommitdiff
path: root/lisp/use-package/use-package-core.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2021-02-01 09:39:33 -0800
committerGitHub <noreply@github.com>2021-02-01 09:39:33 -0800
commite4daf0cd42ef71f85906c2b793d555fcb5c6660a (patch)
tree8f796c556de732a7d5719c3c945a90b285f16246 /lisp/use-package/use-package-core.el
parent3ffb662dccaed79df073f3a77639285f93b98d2b (diff)
parent6b7ab46e57127fdb7dc848d29199e6fc45a2f74b (diff)
downloademacs-e4daf0cd42ef71f85906c2b793d555fcb5c6660a.tar.gz
emacs-e4daf0cd42ef71f85906c2b793d555fcb5c6660a.tar.bz2
emacs-e4daf0cd42ef71f85906c2b793d555fcb5c6660a.zip
Merge pull request from tzz/tzz/remove-use-package-from-custom-enabled-themes
Remove use-package theme from global list of custom-enabled-themes GitHub-reference: https://github.com/jwiegley/use-package/issues/899
Diffstat (limited to 'lisp/use-package/use-package-core.el')
-rw-r--r--lisp/use-package/use-package-core.el11
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 c44c36f77fd..9edcff0ea15 100644
--- a/lisp/use-package/use-package-core.el
+++ b/lisp/use-package/use-package-core.el
@@ -43,10 +43,15 @@
(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)
+(eval-and-compile
+ ;; 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)
+;; Remove the synthetic use-package theme from the enabled themes, so
+;; iterating over them to "disable all themes" won't disable it.
+(setq custom-enabled-themes (remq 'use-package custom-enabled-themes))
(if (and (eq emacs-major-version 24) (eq emacs-minor-version 3))
(defsubst hash-table-keys (hash-table)