空白模式不能改变脸

she*_*per 4 emacs

我正在使用 emacs prelude,并希望在保存时进行空白清理,但更喜欢不显示尾随空白,因为我的颜色主题的颜色令人讨厌,但似乎我无法使用自定义面孔自定义空白的面孔,即使我禁用了面孔,它也不起作用。是否有任何其他设置/功能可以更改空白面?或者我怎样才能禁用空白突出显示,但仍然保持清理保存

law*_*ist 6

这是我自己的.emacs(又名用户自定义)设置。正上方whitespace-style是可以通过将它们添加到whitespace-style. 与使用 相比global-whitespace-mode,我更喜欢(whitespace-mode t)与某些主要模式挂钩一起使用。   whitespace-cleanup是一个依赖于尾随空白突出显示的函数。

;;  (global-whitespace-mode t)

(setq whitespace-display-mappings '(
  (space-mark   ?\     [?\u00B7]     [?.])
  (space-mark   ?\xA0  [?\u00A4]     [?_])
  (newline-mark ?\n    [?¶ ?\n])
  (tab-mark     ?\t    [?\u00BB ?\t] [?\\ ?\t])
            ))

;; lines lines-tail newline trailing space-before-tab space-afte-tab empty
;; indentation-space indentation indentation-tab tabs spaces
(setq whitespace-style '(face space-mark tab-mark newline-mark) )

(setq whitespace-line-column 85)

(custom-set-faces
  '(whitespace-space ((t (:bold t :foreground "gray75"))))
  '(whitespace-empty ((t (:foreground "firebrick" :background "SlateGray1"))))
  '(whitespace-hspace ((t (:foreground "lightgray" :background "LemonChiffon3"))))
  '(whitespace-indentation ((t (:foreground "firebrick" :background "beige"))))
  '(whitespace-line ((t (:foreground "black" :background "red"))))
  '(whitespace-newline ((t (:foreground "orange" :background "blue"))))
  '(whitespace-space-after-tab ((t (:foreground "black" :background "green"))))
  '(whitespace-space-before-tab ((t (:foreground "black" :background "DarkOrange"))))
  '(whitespace-tab ((t (:foreground "blue" :background "white"))))
  '(whitespace-trailing ((t (:foreground "red" :background "yellow"))))
  )
Run Code Online (Sandbox Code Playgroud)