简体   繁体   English

自动加载无法定义功能乳胶模式

[英]Autoloading failed to define function latex-mode

When I open some .tex files with emacs, I get the following message: 当我使用emacs打开一些.tex文件时,收到以下消息:

File mode specification error: (error "Autoloading failed to define function latex-mode") 文件模式规范错误:(错误“自动加载未能定义函数乳胶模式”)

and emacs is not is latex mode. 而且emacs不是胶乳模式。 The latex part of my init.el file is the following: 我的init.el文件的乳胶部分如下:

(require 'tex)
(setq TeX-PDF-mode 1)
(custom-set-variables
 '(TeX-view-program-list (quote (("Evince" "evince --page-index=%(outpage) %o")))))
(custom-set-faces)

I checked the installation of the auctex package already. 我已经检查了auctex软件包的安装。

What is wrong? 怎么了?

Auctex does not provide tex, it provides auctex. Auctex不提供tex,它提供auctex。 Delete the (require 'tex) line, as it's already loaded inside auctex. 删除(require'tex)行,因为它已经在auctex中加载了。

My auctex configuration for comparison: 我的auctex配置供比较:

;; AUCTeX
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)

(add-hook 'LaTeX-mode-hook 'visual-line-mode)
(add-hook 'LaTeX-mode-hook 'flyspell-mode)
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)

(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)

(setq TeX-PDF-mode t)

;; Automatically activate folding mode in auctex, use C-c C-o C-b to fold.
(add-hook 'TeX-mode-hook
      (lambda () (TeX-fold-mode 1))); Automatically activate TeX-fold-mode.

;; Load german inspell if babel is german
;(add-hook 'TeX-language-de-hook
;      (lambda () (ispell-change-dictionary "german")))

(provide 'my_auctex)

which I load from my master config file with (require 'my_auctex) . 我使用(require 'my_auctex)从我的主配置文件加载该文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM