Flyspell无法自动加载LaTeX文件

时间:2016-06-21 01:38:32

标签: emacs hunspell flyspell

尝试将Flyspell与LaTeX文件一起使用。安装程序如下所示:

(require 'ispell)
(setq ispell-program-name "/usr/local/bin/hunspell") ;; From Homebrew, version 1.4.1
(add-to-list 'ispell-local-dictionary-alist '("de_DE_OLDSPELL" "[[:alpha:]]" "[^[:alpha:]]" "[']" t ("-d" "de_DE_OLDSPELL") nil iso-8859-1))
(setq ispell-dictionary "de_DE_OLDSPELL")
(add-hook 'text-mode-hook 'turn-on-flyspell)

打开文本(或LaTeX)文件时无法自动加载,但手动加载时工作正常。如何让Flyspell自动加载?可能是一个简单的答案,但我已经在这里花了一段时间。

1 个答案:

答案 0 :(得分:0)

显然,这是Hunspell和Emacs 24.4+之间互动的a known problem。如果Hunspell没有与Emacs中LANG值相对应的字典,则autoconfigure将失败。因此,将DICTIONARY设置为 可用的字典的基本文件名。 Hunspell通常坚持使用英语词典,因此def hotel_cost(days): return 140 * days def plane_ride_cost(city): if city == "Charlotte": return 183 if city == "Tampa": return 220 if city == "Pittsburgh": return 222 if city == "Los Angeles": return 475 def rental_car_cost(days): rental_car_cost = 40 * days if days >= 7: return 40 * days - 50 elif days >= 3 and days < 7: return 40 * days - 20 else: return 40 * days def trip_cost(city,days): return rental_car_cost(days)+hotel_cost(days)+plane_ride_cost(days) 或其他类似的人应该这样做。那段特殊的代码对我有用。

相关问题