I am not familiar with using the dash
library, but the problem likely has to do with using a single quote for the list of face properties instead of using a backtick/comma combination.
(mapc
(lambda (x) (insert (propertize "a" 'face `(:foreground ,x))))
'("red" "green" "orange"))
Here is an alternative to the backtick/comma list format, which uses the function list
:
(mapc
(lambda (x) (insert (propertize "a" 'face (list :foreground x))))
'("red" "green" "orange"))
I have not delved into the usages of the font-lock-face
property described in the manual, so I just used face
for this example since I am more familiar with it. https://www.gnu.org/software/emacs/manual/html_node/elisp/Special-Properties.html#Special-Properties
Here are links to the manual for the quote versus the backquote:
https://www.gnu.org/software/emacs/manual/html_node/elisp/Quoting.html#Quoting
https://www.gnu.org/software/emacs/manual/html_node/elisp/Backquote.html#Backquote