Emacs 未指定 ispell-hunspell-dict-paths-alist 报错

今天在使用过程中,出现错误:

    Error running timer ‘auto-save-buffers’: (error "Can’t find Hunspell dictionary with a .aff affi\
    x file")

我的 Arch Linux 已安装 Hunspell,我又安装了 hunspell-en_us。

安装后错误变为:

    Error running timer ‘auto-save-buffers’: (error "ispell-phaf: No matching entry for hunspelldict\
     in ‘ispell-hunspell-dict-paths-alist’.
    ")

在这里1学会配置 Hunspell 环境,然后进行了修改2,问题解决。

~/.emacs.d/lisp/init-spelling.el 进行的修改:

    +    (setq ispell-hunspell-dict-paths-alist
    +          '(("en_US" "/usr/share/hunspell/en_US.aff")))
    +    (setq ispell-local-dictionary "en_US")
         (setq ispell-local-dictionary-alist
    -          (list (list "hunspelldict" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil (list "-d" my-default-spell-check-language) nil 'utf-8)))
    +          (list (list "en_US" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil (list "-d" my-default-spell-check-language) nil 'utf-8)))
欢迎通过「邮件」或者点击「这里」告诉我你的想法
Welcome to tell me your thoughts via "email" or click "here"