我最近在我的新系统中安装了 fedora 21,然后安装了 emacs 24 文本编辑器。当我尝试进行拼写检查时,我在底部收到以下消息:
ispell-phaf:没有与 nil 匹配的条目。
我知道这与与 ispell 拼写检查工具链接的词典有关,但无法准确找出问题所在。请 friend 们帮帮我......
最佳答案
就像 @lawlist 提到的那样,错误来自函数 ispell-parse-hunspell-affix-file
。 ispell 试图做的是从 ispell-dictionary
或 ispell-local-dictionary
中提取您设置的字典,然后将该值传递给上述函数。然后,该函数提取在 ispell-local-dictionary-alist 中定义的 alist,然后将其传递给 hunspell。
因此,您特别需要做的是向 ispell-local-dictionary-alist
添加一个条目,如下所示(示例取自 here :
(setq ispell-local-dictionary-alist '(
("american"
"[[:alpha:]]"
"[^[:alpha:]]"
"[']"
t
("-d" "en_US" "-p" "D:\\hunspell\\share\\hunspell\\personal.en")
nil
iso-8859-1))
您需要确保在显示“american”的地方,您的字典名称与您输入到 ispell-dictionary
或 ispell-local- 的值完全匹配字典
,并确保通过此行将所需的参数传递给 hunspell: ("-d""en_US""-p""D:\hunspell\share\hunspell\personal.en") 。您可以看到 hunspell 将执行哪些命令 here 。希望这至少能为您提供更有意义的错误消息,以便您知道还出了什么问题。
关于emacs - 拼写检查在 emacs 文本编辑器中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29406309/