代码之家  ›  专栏  ›  技术社区  ›  prosseek

在emacs/w32上启用flyspell模式?

  •  6
  • prosseek  · 技术社区  · 14 年前

    我需要在emacs/w32上安装/运行flyspell模式。

    我从安装了iSpell for Windows this site 然后我按照写的程序 here .

    1. 我下载了flyspell-1.7a.el将其重命名为flyspell.el,并将其复制到加载路径目录。
    2. 我修改了.emacs
    ;;; 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")
    

    可能有什么问题?

    带ispell的解决方案

    它是针对win32问题的ispell,应该使用与emacs/win32一起使用的问题,如中所述。 the book of emacs .

    1. 从其中一个下载ispell.zip site .
    2. 将ispell.exe复制到路径目录,并将英文字典复制到主目录。

    Aspell解决方案

    vedang 用阿斯贝尔给出了一个更好的答案 at this post .

    它有Windows安装程序,字典安装在 here . 在.emacs中添加以下行对我来说很好。

    (custom-set-variables
        '(ispell-dictionary "british")
        '(ispell-program-name "H:\\bin\\aspell\\bin\\aspell.exe"))
    
    1 回复  |  直到 13 年前
        1
  •  1
  •   phils    14 年前

    两个都没什么意义 require flyspell(将加载库),然后声明 autoload S的两个功能(其目的是 避免 在调用这些函数之前加载库。

    我不知道这是不是 造成 错误(可能是后续的自动加载会破坏实际定义?)但这两者都不需要。

    事实上,在Emacs23.2.1上(如果不是更早的话),flyspell.el声明了它自己的自动加载(我相信所有内置库也是如此),所以如果您运行的是一个足够新的版本,那么您真的不应该这样做。我们讨论的是哪个版本的Emacs?

    编辑:事实上 flyspell-delay-command 在23.2.1中,默认情况下不是自动加载的,因此如果您决定删除该需求,可能需要保留该行。

    推荐文章