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)
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With