当我在文本模式下使用 flyspell-mode 时尝试加载“german8”拼写字典时收到此错误消息:
Error in post-command-hook (flyspell-post-command-hook): (error "Error: The file "/usr/lib/aspell/deutsch\" can not be opened for reading.")
我检查过,没有 /usr/lib/aspell/deutsch。Ubuntu synaptic 软件包管理器为我提供了“aspell-de”,但并没有清除它。
这是我的 .emacs 中引发问题的代码:
;;switch dictionaries between German and English with F8 key
(defun fd-switch-dictionary()
(interactive)
(let* ((dic ispell-current-dictionary)
(change (if (string= dic "deutsch8") "english" "deutsch8")))
(ispell-change-dictionary change)
(message "Dictionary switched from %s to %s" dic change)
))
(global-set-key (kbd "<f8>") 'fd-switch-dictionary)
我可以通过简单地启动 flyspell-mode 然后尝试执行 ispell-change-dictionary 来重复同样的错误。提供了 German8,但消息再次出现:
Error enabling Flyspell mode:
(Error: The file "/usr/lib/aspell/german" can not be opened for reading.)