0

I would like to use a color-palette in my theme-file...

there it is:

(deftheme TEST)

(let ((col1 "red"  )
      (col2 "blue" ))
  (custom-theme-set-faces
   'TEST '(cursor ((t (:foreground col1 :background col2))))))

(provide-theme 'TEST)

When I tried to load it:

set-face-attribute: Wrong type argument: stringp, col1

Tried different variations of this, but without success..

Suggested '(cursor ((t (:foreground ,col1 :background ,col2)))))) ...still not working. I think it's according to suggestion made here and also to this site : https://emacsfodder.github.io/blog/notes-on-deftheme/

...i cant find out where is the difference, so that its not working here...

How can I get out the variables?

OsunSeyi
  • 31
  • 4
  • I found the following solution by guessing, it seems to work here: ````(cursor ((t (:foreground ,col1 :background ,col2))))))``` The backtick at the beginning makes the difference! – OsunSeyi Nov 14 '21 at 07:39
  • PS Sorry I have problems writing here, my browser isn't showing it correctly so I'm editing from my mobile... – OsunSeyi Nov 14 '21 at 07:50
  • For formatting in comments, use `\`(foo)` which is backquote backslash backquote (foo) backquote. – phils Nov 14 '21 at 10:10

0 Answers0