branch: externals/modus-themes
commit 2bc9c72fbd6acb109b2252347b4303fe2c57d7fc
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>

    Make modus-themes-get-theme-palette more efficient
    
    Otherwise modus-themes-get-current-theme calls modus-themes-get-themes
    which is also what modus-themes-known-p needs to do.
---
 modus-themes.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modus-themes.el b/modus-themes.el
index 52dce407fe..775ba4842a 100644
--- a/modus-themes.el
+++ b/modus-themes.el
@@ -3877,9 +3877,10 @@ If THEME is nil, use the return value of 
`modus-themes-get-current-theme'.
 With WITH-OVERRIDES, include all overrides in the combined palette.
 With WITH-USER-PALETTE do the same for the user-defined palette
 extension."
-  (let ((theme (or theme (modus-themes-get-current-theme))))
-    (when (modus-themes-known-p theme)
-      (modus-themes--get-theme-palette-subr theme with-overrides 
with-user-palette))))
+  (modus-themes--get-theme-palette-subr
+   (or theme (modus-themes-get-current-theme))
+   with-overrides
+   with-user-palette))
 
 (defun modus-themes--disable-themes ()
   "Disable themes per `modus-themes-disable-other-themes'."

Reply via email to