branch: externals/modus-themes
commit 4fca99d3ac1a50635cda89999b56385262b5d3bc
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Document that modus-themes-get-theme-palette may return nil
---
modus-themes.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/modus-themes.el b/modus-themes.el
index d20c651027..5e7e0e7637 100644
--- a/modus-themes.el
+++ b/modus-themes.el
@@ -3862,7 +3862,10 @@ whose value is another symbol, which ultimately resolves
to a string or
(defun modus-themes--get-theme-palette-subr (theme with-overrides
with-user-palette)
"Get THEME palette without `modus-themes-known-p'.
WITH-OVERRIDES and WITH-USER-PALETTE are described in
-`modus-themes-get-theme-palette'."
+`modus-themes-get-theme-palette'.
+
+If THEME does not have at least a `:modus-core-palette' among its
+`theme-properties', return nil."
(when-let* ((properties (get theme 'theme-properties))
(core-palette (symbol-value (plist-get properties
:modus-core-palette))))
(let* ((user-palette (when with-user-palette (symbol-value (plist-get
properties :modus-user-palette))))
@@ -3875,7 +3878,9 @@ WITH-OVERRIDES and WITH-USER-PALETTE are described in
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."
+extension.
+
+If THEME is unknown, return nil."
(modus-themes--get-theme-palette-subr
(or theme (modus-themes-get-current-theme))
with-overrides