(eval-when-compile
(defmacro highlight-blocks--define-faces ()
(let ((faces '()))
(dotimes (i 9)
(push `(defface ,(intern (format "highlight-blocks-depth-%d-face" (1+ i)))
'((((class color) (background dark)) :background ,(format "gray%d" (+ 10 (* i 3))))
(((class color) (background light)) :background ,(format "gray%d" (- 90 (* i 3)))))
,(format "Current nested block face, depth %d." (1+ i))
:group 'highlight-blocks-faces)
faces))
`(progn ,@faces))))
highlight-blocks 的这一段宏应该是设置高亮代码块的face的。但是我发现从浅色主题切换到深色的主题的时候,不会自动应用深色主题的face。
结果就会出现深色主题下,想高亮的代码块的颜色很刺眼。 正常情况下应该是这样的才对但是奇怪的是,从深色主题切换到深色主题的时候,就是正常的。