0

我有一个自定义设置面,我在 emacs 启动文件中使用过,特别是当我启动乳胶文件时,但我正在合并和更新我的 .emacs 文件,所以我不启动单独的启动乳胶文件的 -up 过程。我想设置它,以便仅在乳胶模式打开时设置此自定义面。由于它是自定义面孔,我认为设置 LaTeX-mode-hook 是不明智的,但我知道应该有办法做到这一点。我基本上只在输入时更改字体和文本大小。如果可能的话,我也希望为文本模式启用此功能。附上下面的自定义面。

(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(default ((t (:inherit nil :stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 98 :width normal :foundry "unknown" :family "DejaVu Sans")))))
4

1 回答 1

9

您可以使用set-face-attribute设置它而不是custom-set-faces,但它仍会“在所有缓冲区中”更改面。

(set-face-attribute 'default nil
 :inherit nil
 :stipple nil
 :background "white"
 :foreground "black"
 :inverse-video nil
 :box nil
 :strike-through nil
 :overline nil
 :underline nil
 :slant 'normal
 :weight 'normal
 :height 98
 :width 'normal
 :foundry "unknown"
 :family "DejaVu Sans")

您应该识别正确的面孔并仅设置它们,不要设置default。要确定哪张脸在点上,请使用

于 2011-11-07T14:13:12.767 回答