32

在 flyspell 模式下的 Aquamacs 中,当 flyspell 将单词标记为拼写错误时,如果实际上拼写正确,我可以右键单击将单词添加到我的字典中。

在 OSX 上的 GNU Emacs 中,当 flyspell-mode 突出显示它认为拼写错误的单词时,如何将单词添加到字典中?查看文档,我没有看到类似flyspell-learn-wordor的函数ispell-add-word-to-personal-dictionary

4

2 回答 2

46

您正在寻找的功能是flyspell-correct-word-before-point. 默认情况下,它绑定到 keys C-c$。将您的点移至错误的单词并执行命令。您将获得一个弹出菜单,其中包含可能的更正以及将单词保存到字典中的选项。

如果您想要一个命令来保存当前单词,这就是我能够从 flyspell.el 中提取的内容

(defun my-save-word ()
  (interactive)
  (let ((current-location (point))
         (word (flyspell-get-word)))
    (when (consp word)    
      (flyspell-do-correct 'save nil (car word) current-location (cadr word) (caddr word) current-location))))
于 2014-03-01T15:45:17.987 回答
16

您可能可以使用M-$打开建议,然后i保存到字典。系统会提示您确认。

资源

于 2018-05-15T07:13:42.583 回答