我需要在emacs/w32上安装/运行flyspell模式.
我从这个站点安装了ispell for windows ,然后我按照这里写的步骤进行操作.
;;; http://www-sop.inria.fr/members/Manuel.Serrano/flyspell/flyspell.html ;;; flyspell mode (require 'flyspell) (autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t) (autoload 'flyspell-delay-command "flyspell" "Delay on command." t) (autoload 'tex-mode-flyspell-verify "flyspell" "" t) )
但是,当我使用flymode运行emacs时,我收到以下错误.
(error "Autoloading failed to define function turn-on-flyspell")
Run Code Online (Sandbox Code Playgroud)
可能有什么问题?
这是win32的问题,应该使用与emacs/win32一起使用的问题,正如emacs一书中所解释的那样.
它有Windows安装程序,字典安装在这里.在.emacs中添加以下行可以和我一起使用.
(custom-set-variables
'(ispell-dictionary "british")
'(ispell-program-name "H:\\bin\\aspell\\bin\\aspell.exe"))
require这对于Flyspell(将加载库)和为其两个函数声明s没有什么意义autoload(其目的是避免在调用这些函数之前加载库)。
我不知道这是否会导致错误(可能后续的自动加载会破坏真正的定义?),但绝对不需要两者。
事实上,在 Emacs 23.2.1 上(如果不是更早的话),flyspell.el 声明了自己的自动加载(我相信所有内置库也是如此),所以如果您正在运行足够最新的版本。我们正在谈论哪个版本的 Emacs?
编辑:事实上,flyspell-delay-command在 23.2.1 中默认情况下不会自动加载,因此如果您决定删除该需求,您可能需要保留该行。