2009-07-15 10 views
0

私は2つのバージョンが設定しました:Emacsの色を正しく設定するにはどうしたらいいですか?

My computer  apt-get emacs 23.0.91 
Remote server yum  emacs 21.4 

を私は/ -version-/lispの/を/ usr/share/emacsの中にファイルを置く、カラーテーマ-6.6.0をダウンロードした、と私は持っていますこれは私の.emacsに:ターミナルで

(require 'color-theme) 
(color-theme-initialize) 
(color-theme-midnight) 

実行emacsの、すべての色が自分のコンピュータ上で正しく表示が、サーバー上で、私は2つのだけの色を取得します?背景は1つの色で、テキストは私が選んだテーマに関係なく、別のものです。 emacsを起動すると、エラーは表示されません。

提案がありますか?

答えて

6

Unix and Color Highlightingから言い換え:

をあなたは色をサポートする端末のいずれかが必要のUnix/Linuxボックスのシンタックスハイライトを使用できるようにします。いくつかのシステム(私のためのAIX)は、xterm-color.ticファイルでticによって生成されたTERMINFOファイルを必要とします。ここでスニップです:再び

setenv TERMINFO /home/cfl/lib/terminfo 
tic xterm-color 
setenv TERM xterm-color 

、すべての詳細についてUnix and Color Highlighting記事を読んで。別のノートで


、これは私のの.emacsファイルが(暗い背景上の)色を設定するための含まれているものです。

あなたはとても(bashシェルを想定)のような環境変数TERMを設定する必要が
;; Maximum colors 
(setq font-lock-maximum-decoration t) 

(setq frame-background-mode 'dark) 

(setq auto-mode-alist '(("\\.ad[bs]\\'" . ada-mode) 
         ("\\.awk\\'"  . awk-mode) 
         ("\\.lex\\'"  . c-mode) 
         ("\\.[cy]\\'"  . c++-mode) 
         ("\\.h\\'"  . c++-mode) 
         ("\\.hxx\\'"  . c++-mode) 
         ("\\.[CH]\\'"  . c++-mode) 
         ("\\.java\\'"  . java-mode) 
         ("\\.cc\\'"  . c++-mode) 
         ("\\.hh\\'"  . c++-mode) 
         ("\\.cxx\\'"  . c++-mode) 
         ("\\.cpp\\'"  . c++-mode) 
         ("\\.rc\\'"  . c++-mode) ;; resource files 
         ("\\.rcv\\'"  . c++-mode) 
         ("\\.m\\'"  . matlab-mode) 
         ("\\.p[lm]\\'" . perl-mode) 
         ("\\.cgi\\'"  . perl-mode) 
         ("\\.f\\'"  . fortran-mode) 
         ("\\.F\\'"  . fortran-mode) 
         ("\\.f90\\'"  . f90-mode) 
         ("\\.F90\\'"  . f90-mode) 
         ("\\.el\\'"  . emacs-lisp-mode) 
         ("\\.emacs\\'" . emacs-lisp-mode) 
         ("\\.tex\\'"  . LaTeX-mode) 
         ("\\.bib\\'"  . bibtex-mode) 
         ("[Mm]akefile\\'" . makefile-mode) 
         ("\\.mak\\'"  . makefile-mode) 
         ("\\[Mm]akefile.\\'" . makefile-mode) 
         ("\\.bat\\'"  . shell-script-mode) 
         ("\\.tar\\'"  . tar-mode) 
         ("\\.php\\'"  . php-mode) 
         ("\\.html\\'"  . html-mode) 
         ("\\.jnlp\\'"  . html-mode) 
         ("\\.xml\\'"  . html-mode) 
         ("\\.pddl\\'"  . lisp-mode) 
         ("\\.css\\'"  . css-mode) 
         ("\\.py\\'"  . python-mode) 
         ("\\.yml\\'"  . yaml-mode) 
         ("\\.lisp\\'"  . lisp-mode))) 
2

輸出TERM = "のxterm-256色"

あなたは内からのemacsを実行している場合.screenrcに次のように同様に追加する必要があります。

用語画面-256色

これが動作しない場合は、システムが適切なのtermcapがインストールされていないので、それであってもよいです。 DEB/Ubuntuのシステムでは、例えば、あなたがしなければならない:私はRPMベースのシステム上の特定のないです

apt-getのインストールのncursesを長期

が、確認してncursesベースとtermcapのことインストールされます。

関連する問題