From ed618c10501aa2602477cef31c159cefe79e19fe Mon Sep 17 00:00:00 2001 From: Protesilaos Stavrou Date: Mon, 24 Nov 2025 13:54:41 +0200 Subject: [PATCH] Add two error checks for the type of modus-themes-generate-palette arguments --- modus-themes.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modus-themes.el b/modus-themes.el index 2ed0eb0..ec2eab9 100644 --- a/modus-themes.el +++ b/modus-themes.el @@ -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)