开发者

Emacs auto-complete error: Symbol's value as variable is void: ac-modes [duplicate]

This question already has an answer here: Emacs: Symbol's value as variable is void (1 answer) Closed 5 years ago.

I'm trying to install the emacs latex auto-complete package (http://code.google.com/p/ac-math/). I put ac-math.el into my ~/elisp load-path directory then put the following into my .emacs file:

;; Adds elisp to load-path
(add-to-list 'load-path "~/elisp")

;; Loads latex auto-complete
(require 'ac-math)
(add-to-list 'ac-modes 'latex-mode)
(defun ac-latex-mode-setup ()
  (setq ac-sources
        (append '(ac-source-math-latex ac-source-latex-commands  ac-source-math-unicode)
  开发者_StackOverflow中文版              ac-sources))
  )
(add-hook 'LaTeX-mode-hook 'ac-latex-mode-setup)

But when I load emacs I get this error:

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

Symbol's value as variable is void: ac-modes

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.

Thanks in advance


Add (require 'auto-complete) at the top. Or, better yet, convince the ac-math package maintainer to add it there.


I had to install the auto-complete package first. I had mixed up the math auto-complete package with the actual auto-complete package.

So first you go here to install the auto-complete package: http://cx4a.org/software/auto-complete/

Then you go here for the math auto-complete add-on: http://code.google.com/p/ac-math/

The problem was that I was trying to install the math add-on without first installing the auto-complete package

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜