在這兒下載:color-theme
:
http://download.savannah.gnu.org/releases-noredirect/color-theme/
wget http://download.savannah.gnu.org/releases-noredirect/color-theme/color-theme-6.6.0.tar.gz
tar zxf color-theme-6.6.0.tar.gz -C ~/.emacs.d
在.emacs中加入下列語句:
;; corlor-theme<br />(add-to-list 'load-path "~/.emacs.d/color-theme-6.6.0")<br />(load-file "~/.emacs.d/color-theme-6.6.0/color-theme.el")<br />(require 'color-theme)<br />(eval-after-load "color-theme"<br /> '(progn<br /> (color-theme-initialize)<br /> (color-theme-galen)<br /> ))
把下面代碼追加到下面這個檔案的最後面,然後重啟emacs
~/.emacs.d/color-theme-6.6.0/themes/color-theme-library.el
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />;; color-theme-galen<br />(defun color-theme-galen ()<br /> "Color theme by Galen, created 2010-04-13."<br /> (interactive)<br /> (color-theme-install<br /> '(color-theme-galen<br /> ((background-color . "Grey4") ; Grey4 let line number's color is chocolate<br /> (background-mode . light)<br /> (border-color . "black")<br /> (cursor-color . "#000000")<br /> (foreground-color . "#000000")<br /> (mouse-color . "#000000"))<br /> ((display-time-mail-face . mode-line)<br /> (help-highlight-face . underline)<br /> (list-matching-lines-face . bold)<br /> (view-highlight-face . highlight)<br /> )<br /> (default ((t (:stipple nil :background "#ffffff" :foreground "#000000" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 87 :width semi-condensed :family "misc-fixed"))))<br /> (font-lock-builtin-face ((t (:foreground "chocolate1")))); to use for builtins<br /> (font-lock-comment-face ((t (:foreground "red")))); *** to use for comments<br /> (font-lock-constant-face ((t (:foreground "OrangeRed")))); *** to use for constant and label names (class::)<br /> (font-lock-doc-face ((t (:foreground "red"))));to use for documentation. such as /* this is ducumentation */<br /> (font-lock-doc-string-face ((t (:foreground "red"))));<br /> (font-lock-function-name-face ((t (:foreground "blue" :underline t)))) ; *** to use for function names<br /> (font-lock-preprocessor-face ((t (:foreground "chocolate1")))); *** to use for preprocessor directives<br /> (font-lock-keyword-face ((t (:foreground "blue4")))); *** to use for keywords<br /> (font-lock-reference-face ((t (:foreground "pale green"))));<br /> (font-lock-string-face ((t (:foreground "red")))); *** to use for strings "Hello, World"<br /> (font-lock-type-face ((t (:foreground "blue4" )))); *** to use for type and class names<br /> (font-lock-variable-name-face ((t (:foreground "red")))); *** to use for variable names<br /> (font-lock-warning-face ((t (:foreground "Red"))));to use for things that should stand out.<br /> (font-lock-negation-char-face ((t (:foreground "OrangeRed"))));to use for easy to overlook negation<br /> (font-lock-exit-face ((t (:foreground "green"))));<br /> (font-lock-emphasized-face ((t (:background "lightyellow2"))))<br /> (font-lock-other-emphasized-face ((t (:background "lightyellow2"))))<br /> (font-lock-other-type-face ((t (:foreground "orange3"))))<br /> (font-lock-special-comment-face ((t (:foreground "blue"))))<br /> (font-lock-special-keyword-face ((t (:foreground "blue"))))<br /> (region ((t (:background "steel blue" :foreground "black")))) ; region<br /> (highlight ((t (:background "sky blue")))) ; highlight current line</p><p> (modeline-buffer-id ((t (:foreground "black" :background "wheat"))));the filename on modeline(yellow)<br /> (minibuffer-prompt ((t (:foreground "blue"))))<br /> (dired-face-directory ((t (:foreground "blue"))))<br /> (dired-face-executable ((t (:foreground "green yellow"))))<br /> (dired-face-flagged ((t (:foreground "tomato"))))<br /> (dired-face-marked ((t (:foreground "light salmon"))))<br /> (dired-face-permissions ((t (:foreground "aquamarine"))))</p><p> (show-paren-match-face ((t (:background "light slate blue" :foreground "white"))))<br /> (show-paren-mismatch-face ((t (:background "red" :foreground "white"))))<br /> )<br /> )<br /> )<br />;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />