aboutsummaryrefslogtreecommitdiff
path: root/ef-themes.el
diff options
context:
space:
mode:
authorProtesilaos Stavrou <info@protesilaos.com>2022-08-21 05:08:34 +0300
committerProtesilaos Stavrou <info@protesilaos.com>2022-08-21 05:10:43 +0300
commit9c66a79c3d1f91819d6bc9a14419185be4f1345a (patch)
tree8b1bf7e6ac594e335e33baaa428217e5baec174f /ef-themes.el
parent057ab6f29e18d65545cb72067f44c6b78955c7ae (diff)
Fix how themes become "known" at startup
Before, this would not show all the themes in 'ef-themes-select': (require 'ef-themes) (load-theme 'ef-summer t) Thanks to Jean-Philippe Gagné Guay for the feedback in issue 6 over at the GitHub mirror: <https://github.com/protesilaos/denote/issues/6>.
Diffstat (limited to 'ef-themes.el')
-rw-r--r--ef-themes.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/ef-themes.el b/ef-themes.el
index f2e5e0b..d66ef93 100644
--- a/ef-themes.el
+++ b/ef-themes.el
@@ -265,15 +265,13 @@ sequence given SEQ-PRED, using SEQ-DEFAULT as a fallback."
(defun ef-themes--enable-themes ()
"Enable all Ef themes."
(mapc (lambda (theme)
- (load-theme theme :no-confirm :no-enable))
+ (unless (memq theme custom-known-themes)
+ (load-theme theme :no-confirm :no-enable)))
ef-themes-collection))
(defun ef-themes--list-known-themes ()
"Return list of `custom-known-themes' with ef- prefix."
- (unless (seq-find (lambda (theme)
- (string-prefix-p "ef-" (symbol-name theme)))
- custom-known-themes)
- (ef-themes--enable-themes))
+ (ef-themes--enable-themes)
(seq-filter
(lambda (theme)
(string-prefix-p "ef-" (symbol-name theme)))