2014-02-05 37 views
0

我已经在MELPA的emacs中安装了auto-complete包,我可以用M-x auto-complete-mode启用它。我在与配置一些问题,不过,我已经添加了以下行我.emacs在emacs中配置自动完成功能?

(add-to-list 'load-path "~/.emacs.d/elpa/auto-complete-20140201.2101") 
(require 'auto-complete-config) 
(add-to-list 'ac-dictionary-directories "~/.emacs.d/elpa/auto-complete-20140201.2101/dict") 
(ac-config-default) 

当我启动Emacs,我得到一个错误

Warning (initialization): An error occurred while loading `/home/user/.emacs': 

File error: Cannot open load file, popup 

To ensure normal operation, you should investigate and remove the 
cause of the error in your initialization file. Start Emacs with 
the `--debug-init' option to view a complete error backtrace. 

auto-complete需要popup无一不被列为如果我列出与M-x list-packages包裹安装。有关我应该如何做的任何建议?

回答

3

像这样的简单的配置应该工作:

(setq package-user-dir "~/.emacs.d/elpa/") 
(package-initialize) 

无需专门改变load-path

+1

无需设置'package-user-dir'。您上面的值是默认值。 – Dmitry