2014-02-05 59 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