Emacs 自动完成错误:作为变量的符号值无效:ac-modes
我正在尝试安装 emacs Latex 自动完成包(http://code.google.com/p/ac-math/)。我将 ac-math.el 放入 ~/elisp load-path 目录中,然后将以下内容放入我的 .emacs 文件中:
;; 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)
但是当我加载 emacs 时,出现此错误:
警告(初始化):加载时发生错误 `/home/eddy/.emacs':
符号作为变量的值为空:ac-modes
为了确保正常运行,您应该调查并删除 初始化文件中的错误原因。启动 Emacs `--debug-init' 选项可查看完整的错误回溯。
提前致谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在顶部添加
(需要“自动完成”)
。或者,更好的是,说服 ac-math 包维护者将其添加到那里。Add
(require 'auto-complete)
at the top. Or, better yet, convince the ac-math package maintainer to add it there.我必须先安装自动完成包。我将数学自动完成包与实际的自动完成包混淆了。
所以首先你去这里安装自动完成包: http://cx4a.org/software/auto -complete/
然后您可以前往此处获取数学自动完成附加组件:http://code.google.com/p/ac-math/
问题是我试图在没有先安装自动完成包的情况下安装数学插件
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