Emacs,如何为 LaTeX 文件自动打开 flyspell

标签 emacs emacs24 aspell flyspell

我仅将 Emacs 用于\LaTeX 和 python 编程。有没有办法自动开启flyspell-mode当我处理 .tex 文件并打开 flyspell-prog-mode当我处理 .py 文件时?如何在我的 .emacs 文件中执行此操作?

最佳答案

将这些函数添加到 python-mode 和 latex-mode 的钩子(Hook)中

(require 'python)

;; If you use tex-mode
(require 'tex-mode)`
(add-hook 'latex-mode-hook 'flyspell-mode)

;; If you use AUCTeX
(load "auctex.el" nil t t)`
(add-hook 'LaTeX-mode-hook 'flyspell-mode)


(add-hook 'python-mode-hook 'flyspell-prog-mode)

关于Emacs,如何为 LaTeX 文件自动打开 flyspell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15173004/

相关文章:

使用 matplotlib 时 Emacs 中的 Python shell 卡住

emacs - 如何在 emacs 和 leiningen 中使用 repl

emacs - 评估 emacs 缓冲区中的 mit-scheme 代码?

Git Hook Spellchecker 忽略缩进行

python - 在 AWS Lambda 上使用 Pyenchant,可以加载包但不能加载提供者字典,从 EC2 上的源代码编译并提取 .so 文件

emacs - 返回 emacs 中的上一个缓冲区

python - Emacs 终端列宽(julia/python shell)

elisp - 符号的函数定义为 void : incf (common lisp function in emacs24)

emacs - 在Emacs 24中使用Emacs入门套件安装ECB

bash - 对每一行进行拼写检查