我仅将 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/