Add two error checks for the type of modus-themes-generate-palette arguments

This commit is contained in:
Protesilaos Stavrou 2025-11-24 13:54:41 +02:00
parent 51dd0362b9
commit ed618c1050
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA

View file

@ -7597,6 +7597,16 @@ COOL-OR-WARM-PREFERENCE.
With optional MAPPINGS use them instead of trying to derive new ones."
(require 'color)
(when (seq-some
(lambda (entry)
(not (stringp (cdr entry))))
base-colors)
(error "Base colors can only be references to string color values, not symbols"))
(when (seq-some
(lambda (entry)
(stringp (cdr entry)))
mappings)
(error "Mappings can only be references to named colors, not color values"))
(let ((bg-main (alist-get 'bg-main base-colors))
(fg-main (alist-get 'fg-main base-colors)))
(unless (and bg-main fg-main)