我发现当你执行flyspell -auto-correct word命令时,flyspell似乎停留在单词的中间,这很令人恼火。是否可以将其更改为在运行命令后强制转到单词的末尾?它可能像设置一个键绑定到auto-complete-word,然后是move-forward-word一样简单,我知道怎么做。但这并不是在所有情况下都有效,因为有时如果自动补全的单词比键入的单词小,它会将光标放在单词后面。这方面的任何帮助都是很好的。
发布于 2011-09-08 23:20:35
尝试以下代码:
(eval-after-load "flyspell"
'(defun flyspell-ajust-cursor-point (save cursor-location old-max)
(when (not (looking-at "\\b"))
(forward-word))))使用flyspell 1.7k版本和Emacs 23.2附带的版本进行了测试。
发布于 2011-09-08 18:02:02
我查看了一下(defun flyspell-auto-correct-word ...),没有看到任何好的钩子或其他定制点,所以我认为最好的选择是使用C-h f defadvice
(defadvice flyspell-auto-correct-word (after flyspell-forward-word activate) (flyspell-goto-next-error))https://stackoverflow.com/questions/7343094
复制相似问题