branch: externals/ef-themes
commit bc2200dde6b4a6f895387239d062e23f252fe6e4
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Make 'ef-themes--current-theme' more robust
    
    The idea is to try to enable the Ef themes if they are "known".  That
    way we do not encounter errors when we have loaded one of them but,
    say, try to fetch a value from another (such as with
    'ef-themes-list-colors' and 'ef-themes-get-color-value').
---
 ef-themes.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ef-themes.el b/ef-themes.el
index 836f8fe7ba..91acdeecba 100644
--- a/ef-themes.el
+++ b/ef-themes.el
@@ -491,7 +491,8 @@ symbol, which is safe when used as a face attribute's 
value."
 
 (defun ef-themes--current-theme ()
   "Return first enabled Ef theme."
-  (car (ef-themes--list-enabled-themes)))
+  (car (or (ef-themes--list-enabled-themes)
+           (ef-themes--list-known-themes))))
 
 (defun ef-themes--palette-symbol (theme &optional overrides)
   "Return THEME palette as a symbol.

Reply via email to