我不太打倒語法動態符號等,我想我大概可以做一些與dolist
和這裏的顏色列表,但不知道是什麼:如何重構這個Emacs lisp?
(custom-set-faces
`(term-color-black ((t (:inherit term-color-black :background ,(face-attribute 'term-color-black :foreground)))))
`(term-color-red ((t (:inherit term-color-red :background ,(face-attribute 'term-color-red :foreground)))))
`(term-color-green ((t (:inherit term-color-green :background ,(face-attribute 'term-color-green :foreground)))))
`(term-color-yellow ((t (:inherit term-color-yellow :background ,(face-attribute 'term-color-yellow :foreground)))))
`(term-color-blue ((t (:inherit term-color-blue :background ,(face-attribute 'term-color-blue :foreground)))))
`(term-color-magenta ((t (:inherit term-color-magenta :background ,(face-attribute 'term-color-magenta :foreground)))))
`(term-color-cyan ((t (:inherit term-color-cyan :background ,(face-attribute 'term-color-cyan :foreground)))))
`(term-color-white ((t (:inherit term-color-white :background ,(face-attribute 'term-color-white :foreground))))))
該代碼不是由'customize'寫的 - 我自己寫的。我只是用'custom-set-faces'來覆蓋一些東西。 –
在這種情況下,您可以直接使用'set-face-attribute'。 – Thomas
......或者「defface」。 – Thomas