emacs下安装color-theme配色扩展

1: 把的下载到的压缩包(1)里的color-theme.el 和文件夹 “themes”放入load-path。(2)

1:下载地址见 http://gooss.org/getting-started-guide-emacs-iii-custom-color-matching-the-expansion-of-the-use-of-elisp/ 

2:见http://www.emacswiki.org/cgi-bin/wiki?ColorTheme 里content的install部分:Put the file color-theme.el and the folder “themes” (with the files color-theme-example.el and color-theme-library.el) in a directory on your LoadPath. )

load-path: 在.emacs配置文件中设置。可使用:(add-to-list 'load-path "~/.emacs.d/lisp/") 来添加~/.emacs.d/lisp文件夹为load-path。

2:在.emacs配置文件(3)中加入下列语句:

 

(require 'color-theme)
(color-theme-initialize)
(color-theme-robin-hood)

第1行,调用color-theme扩展,使之随emacs启动。

注意:网上的很多教程并没提到第2行,但是它必须有,否则会出错。
最起码在我这里如此。

第3行是我自己选择的一个主题,你可以换成你自己喜欢的,浏览里面
的主题可以用M-x color-theme-select,然后一个个地试,觉得哪个好
就把第三行替换成那个。(见http://wangcong.org/blog/archives/305

3:如果没有.emacs配置文件,可依下面方法建立:打开Emacs,按C-x 加 C-f,然后在minibar输入~ ,回车。可看到进入了一个目录,这就是.emacs文件需要放的目录。然后在emacs的菜单栏-file-open file,找到前面提到的”~“目录,打开.emacs,Emacs会自动创建出.emacs文件,然后点保存,就可以了。

 


posted @ 2012-01-07 19:54  闲暇捻码  阅读(353)  评论(0编辑  收藏  举报