如何取消设置Emacs的空白模式的前景色

RNA*_*RNA 5 emacs whitespace long-lines

在编程文件中,我使用空白模式来突出显示选项卡和长行.默认突出显示对我来说太装饰了.我只想用灰色背景突出显示它们并保留它应该是字体的正常颜色.我该怎么设置?

以下设置不起作用.我希望超过80列的代码看起来偏黄,作为快照中80列内的字符.

;; face for long lines' tails
(set-face-attribute 'whitespace-line nil
                    :background "#555"
                    :weight 'bold)

;; face for Tabs
(set-face-attribute 'whitespace-tab nil
                    :background "#555"
                    :weight 'bold)
Run Code Online (Sandbox Code Playgroud)

空白模式

Dmi*_*try 4

set-face-attribute仅更改您指定的属性。

设置::foregroundnil

(set-face-attribute 'whitespace-line nil
                    :foreground nil
                    :background "#555"
                    :weight 'bold)
Run Code Online (Sandbox Code Playgroud)