[英]How do I change the color settings in emacs23 running in a terminal emulator?
我使用xterm並在~/.Xdefaults
設置其外觀:
XTerm*background: paleTurquoise
XTerm*foreground: black
我也使用emacs,但在~/.emacs
設置了不同的外觀:
(set-background-color "black")
(set-foreground-color "yellow")
我通常在終端仿真器中使用emacs -nw
運行emacs,而不是創建單獨的X窗口。 出於某種原因,這對於emacs23無法正常工作; 相反,emacs保留了我的xterm窗口的淺綠色背景。 查看emacs23的新增功能時 ,我注意到:
**在足夠新的xterm(比242版本更新)中運行時,Emacs會詢問xterm背景顏色是什么,並在需要時針對深色背景設置面孔(當前默認設置是考慮背景光)。
這是功能,不是錯誤? 無論如何,有什么方法可以告訴emacs23在控制台模式下運行時忽略xterm后台設置,而使用~/.emacs
的設置嗎?
我還要注意:
-nw
選項)中運行的emacs23中運行良好。 emacs23 -nw
運行Mx set-background-color
無效。 $TERM=cygwin
存在相同的問題。 更新:最好的答案似乎是使用-fg
和-bg
命令行選項...
您需要設置TERM=xterm-256color
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.