diff options
| author | Ted Zlatanov | 2021-01-09 13:57:40 +0000 |
|---|---|---|
| committer | Ted Zlatanov | 2021-01-10 14:20:37 +0000 |
| commit | 6b7ab46e57127fdb7dc848d29199e6fc45a2f74b (patch) | |
| tree | 8f796c556de732a7d5719c3c945a90b285f16246 | |
| parent | 3ffb662dccaed79df073f3a77639285f93b98d2b (diff) | |
| download | emacs-6b7ab46e57127fdb7dc848d29199e6fc45a2f74b.tar.gz emacs-6b7ab46e57127fdb7dc848d29199e6fc45a2f74b.zip | |
Remove use-package theme from global list of custom-enabled-themes
* eval-when-compile for cases where use-package is only required at
compile time
* remove the 'use-package theme from custom-enabled-themes so e.g.
(mapc #'disable-theme custom-enabled-themes)
won't kill user settings.
| -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 c44c36f77fd..9edcff0ea15 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el | |||
| @@ -43,10 +43,15 @@ | |||
| 43 | (require 'cl-lib) | 43 | (require 'cl-lib) |
| 44 | (require 'tabulated-list) | 44 | (require 'tabulated-list) |
| 45 | 45 | ||
| 46 | ;; Declare a synthetic theme for :custom variables. | 46 | (eval-and-compile |
| 47 | ;; Necessary in order to avoid having those variables saved by custom.el. | 47 | ;; Declare a synthetic theme for :custom variables. |
| 48 | (deftheme use-package) | 48 | ;; Necessary in order to avoid having those variables saved by custom.el. |
| 49 | (deftheme use-package)) | ||
| 50 | |||
| 49 | (enable-theme 'use-package) | 51 | (enable-theme 'use-package) |
| 52 | ;; Remove the synthetic use-package theme from the enabled themes, so | ||
| 53 | ;; iterating over them to "disable all themes" won't disable it. | ||
| 54 | (setq custom-enabled-themes (remq 'use-package custom-enabled-themes)) | ||
| 50 | 55 | ||
| 51 | (if (and (eq emacs-major-version 24) (eq emacs-minor-version 3)) | 56 | (if (and (eq emacs-major-version 24) (eq emacs-minor-version 3)) |
| 52 | (defsubst hash-table-keys (hash-table) | 57 | (defsubst hash-table-keys (hash-table) |