emacs - 拼写检查在 emacs 文本编辑器中不起作用

标签 emacs

我最近在我的新系统中安装了 fedora 21,然后安装了 emacs 24 文本编辑器。当我尝试进行拼写检查时,我在底部收到以下消息:

ispell-phaf:没有与 nil 匹配的条目。

我知道这与与 ispell 拼写检查工具链接的词典有关,但无法准确找出问题所在。请 friend 们帮帮我......

最佳答案

就像 @lawlist 提到的那样,错误来自函数 ispell-parse-hunspell-affix-file。 ispell 试图做的是从 ispell-dictionaryispell-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-dictionaryispell-local- 的值完全匹配字典,并确保通过此行将所需的参数传递给 hunspell: ("-d""en_US""-p""D:\hunspell\share\hunspell\personal.en") 。您可以看到 hunspell 将执行哪些命令 here 。希望这至少能为您提供更有意义的错误消息,以便您知道还出了什么问题。

关于emacs - 拼写检查在 emacs 文本编辑器中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29406309/

相关文章:

emacs - Emacs禁用* Messages *缓冲区

emacs - Common Lisp : How to get (in-package . ..) 在 Emacs Slime 中工作

ruby - Emacs 在运行编译命令时忽略了我的路径

emacs 中的 Javascript 环境

emacs - 组织模式自定义议程 View : Show Status Of All Current Habits

python - 如何从 emacs org-mode 仅导出 python 输出而不是源代码到 ODT?

emacs - Emacs 的高级编辑功能

Emacs:如何将杀伤环与系统剪贴板分开?

c - C代码多层嵌套的Emacs缩进

emacs: C-c % 在 auctex 中做什么以及如何让它表现得更好?