branch: externals/ef-themes
commit b256ecffc4d45793cc29502a15a6a4bce803a9ab
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Add ef-themes--palette helper function
---
ef-themes.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/ef-themes.el b/ef-themes.el
index f4f9336764..d348eaa15b 100644
--- a/ef-themes.el
+++ b/ef-themes.el
@@ -63,12 +63,15 @@
(string-prefix-p "ef-" (symbol-name theme)))
custom-known-themes))
+(defun ef-themes--palette (theme)
+ "Return THEME palette as a symbol."
+ (intern (format "%s-palette" theme)))
+
(defun ef-themes--current-theme-palette ()
"Return palette of active Ef theme, else produce `user-error'."
(if-let* ((themes (ef-themes--list-enabled-themes))
- (palette (intern
- (format "%s-palette"
- (car themes)))))
+ (theme (car themes))
+ (palette (ef-themes--palette theme)))
palette
(user-error "No enabled Ef theme could be found")))