aboutsummaryrefslogtreecommitdiff
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
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>.
-rw-r--r--README.org4
-rw-r--r--ef-themes.el8
2 files changed, 5 insertions, 7 deletions
diff --git a/README.org b/README.org
index 69dad83..39e5f5d 100644
--- a/README.org
+++ b/README.org
@@ -529,8 +529,8 @@ matters.
+ Contributions to code or the manual :: Philip Kaludercic.
-+ Ideas and/or user feedback :: Iris Garcia, Spike-Leung, Summer Emacs,
- Zoltán Király.
++ Ideas and/or user feedback :: Iris Garcia, Jean-Philippe Gagné Guay,
+ Spike-Leung, Summer Emacs, Zoltán Király.
* GNU Free Documentation License
:PROPERTIES:
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)))