branch: externals/ef-themes commit 9c66a79c3d1f91819d6bc9a14419185be4f1345a Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
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>. --- README.org | 4 ++-- ef-themes.el | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.org b/README.org index 69dad83b06..39e5f5d0eb 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 f2e5e0be60..d66ef9302c 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)))