branch: externals/modus-themes commit de57a78821959ae5b18fc4a5a541a460fd1b9461 Author: Basil L. Contovounesios <ba...@contovou.net> Commit: Basil L. Contovounesios <ba...@contovou.net>
Simplify modus-themes--retrieve-palette-value If the value is not contained in the palette, the recursive call to modus-themes--retrieve-palette-value will return unspecified anyway, thanks to the alist-get at the start of the function. This saves a list allocation per recursive call, at the expense of an additional funcall. An alternative that avoids both the list allocation and the extra funcall is to use (assq value palette) instead, at the expense of more (and repetitive) typing. --- modus-themes.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modus-themes.el b/modus-themes.el index e675f9e19d..ea3299cd67 100644 --- a/modus-themes.el +++ b/modus-themes.el @@ -1154,7 +1154,7 @@ This function is used in the macros `modus-themes-theme', (eq value 'unspecified)) value) ((and (symbolp value) - (memq value (mapcar #'car palette))) + value) (modus-themes--retrieve-palette-value value palette)) (t 'unspecified))))