I want to fine-tune my syntax highlighting, and have created a separate colors.el
file that gets loaded around the beginning of init.el
. I often use the same color for multiple entries, and it gets difficult to keep track of them all, so I want to define a bunch of common colors as variables at the top of the file, something like this:
(setq myblue "DodgerBlue1")
(custom-set-faces
'(link ((:t (:foreground myblue)))))
This keeps giving me a "Wrong type argument: stringp, blue" error on load.
I only have a surface-level understanding of how Lisp works. What would be the proper way to expand blue
into a literal string before custom-set-faces
is evaluated? Do I need a macro for this? Please help me understand how to make this work.