I need to install/run flyspell mode on emacs/w32.
I installed ispell for windows from this site, and then I followed the procedure written in here.
;;; 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) )
But, when I run emacs with flymode, I got the following error.
(error "Autoloading failed to define function turn-on-flyspell")
What might be wrong?
It was ispell for win32's problem, one should use the one that works with emacs/win32 as is explained in the book of emacs.
vedang gave a better answer with aspell at this post.
It has windows installer, dictionary install in here. And adding the following line in .emacs works fine with me.
(custom-set-variables '(ispell-dictionary "british") '(ispell-program-name "H:\\bin\\aspell\\bin\\aspell.exe"))
It makes little sense to both require
flyspell (which will load the library), and then also declare autoload
s for two of its functions (the purpose of which is to avoid loading the library in advance of those functions being called.
I don't know if this is causing the error (possibly the subsequent autoloads clobber the real definitions?), but there's definitely no need for both.
In fact, on Emacs 23.2.1 (if not much earlier), flyspell.el declares its own autoloads (as do all built-in libraries, I believe), so you really shouldn't have to do any of that at all if you are running a sufficiently up to date version. Which version of Emacs are we talking about?
edit: in fact flyspell-delay-command
is not autoloaded by default in 23.2.1, so you might want to retain that line if you decide to remove the require.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With