Emacs 自动完成错误 : Symbol's value as variable is void: ac-modes

标签 emacs autocomplete latex elisp

这个问题在这里已经有了答案:





Emacs: Symbol's value as variable is void

(1 个回答)


4年前关闭。




我正在尝试安装 emacs latex 自动完成包(http://code.google.com/p/ac-math/)。我将 ac-math.el 放入 ~/elisp 加载路径目录,然后将以下内容放入我的 .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 时,我得到了这个错误:

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.



提前致谢

最佳答案

添加 (require 'auto-complete)在顶部。或者,更好的是,说服 ac-math 包维护者将其添加到那里。

关于Emacs 自动完成错误 : Symbol's value as variable is void: ac-modes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7131717/

相关文章:

javascript - Google 和 Bing 自动完成功能如何工作?

shell - 如何从我自己的脚本中为 fish shell 提供制表符补全?

latex - 使用 Latex 中的列表包进行行编号

javascript - 在网页上呈现 Microsoft Word 文档

emacs - 去掉换行末尾的反斜杠(用于复制粘贴)

java - 有什么方法可以在 Vim/Emacs 中提供 Eclipse 自动错误发现功能?

python - Emacs:Python 的完整基类方法

php - 有没有办法让 Visual Studio Code 识别 PHP 文件中的 HTML 语法

latex - pandoc 没有正确转换 latex 风格的引文

emacs - 以编程方式检测缓冲区中的任何行是否正在换行?