簡體   English   中英

更改自定義設置的面孔以在certian emacs模式(文本模式,LaTeX模式等)下顯示這些設置。

[英]Changing a custom set face to display with those settings in certian emacs mode (text-mode, LaTeX-mode, etc..)

我在emacs啟動文件中使用了一個自定義界面,尤其是在啟動乳膠文件時,但是我正在合並和更新我的.emacs文件,因此我不會單獨啟動乳膠文件的升級過程。 我要進行設置,以便僅在啟用乳膠模式時才設置此自定義面。 由於這是一張自定義面孔,我認為設置LaTeX模式掛鈎並不明智,但我知道應該有一種方法。 我基本上只在鍵入時更改字體和文本大小。 我還希望在可能的情況下為文本模式啟用此功能。 在下面附加自定義面。

(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")))))

可以使用set-face-attribute設置它,而不是custom-set-faces ,但是它仍然會在“所有緩沖區”中更改該face。

(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 要確定哪張臉是正確的,請使用

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM