Replacing 'i' with 'I' using Emacs ispell

安稳与你 提交于 2019-12-13 09:48:06

问题


I use ispell to do spell-checking, but it does not replace the word 'i' with 'I'.


回答1:


With the following code flyspell at least shows such misspellings. The list is to be extended.

(defvar flyspell-wrong-one-letters '("i"))

(defadvice flyspell-word (before one-letter activate)
  "Check one-letter words"
  (when (and
     (if following (looking-at "\\<[[:alpha:]]\\>")
       (looking-back "\\<[[:alpha:]]\\>"))
     (member (match-string 0) flyspell-wrong-one-letters))
    (setq known-misspelling t)))

I just looked into flyspell not into ispell yet. I know that this is not really a solution for you... Sorry.



来源:https://stackoverflow.com/questions/20609172/replacing-i-with-i-using-emacs-ispell

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!