On Mon, 14 Jan 2008, Tim Connors wrote: > On Mon, 14 Jan 2008, Tim Connors wrote: > > > Bugger. I was premature. When I do the following: > > (autoload 'flyspell-mode-on "flyspell" "On-the-fly ispell." t) > > (add-hook 'TeX-mode-hook 'flyspell-mode-on) ; encompases LaTeX-mode as > > well > > (add-hook 'text-mode-hook 'flyspell-mode-on) > > (add-hook 'html-mode-hook 'flyspell-mode-on) > > (add-hook 'mail-hook 'flyspell-mode-on) > > (add-hook 'message-hook 'flyspell-mode-on) > > (add-hook 'flyspell-mode-hook 'flyspell-buffer) > > > > (I don't simply use 'flyspell-mode because it is a toggle, and some modes > > encompass other modes and you end up with flyspell being turned on then > > off immediately. It's easier for my brain if I add the hook to the modes > > I want explicitly rather than trying to work out which mode is a parent of > > which other mode) > > And for future reference when testing, some modes like message-mode if > defined as such: > > ;(add-hook 'TeX-mode-hook 'flyspell-mode) ; encompases LaTeX-mode as well > (add-hook 'text-mode-hook 'flyspell-mode) > (add-hook 'html-mode-hook 'flyspell-mode) > ;(add-hook 'mail-hook 'flyspell-mode) > ;(add-hook 'message-hook 'flyspell-mode) > > will happily go into flyspell-mode, but will not execute the > flyspell-mode-hook, or executes it at the wrong time, so it doesn't > pre-check the buffer - it only checks and highlights bad spelling once you > move over the questionable text. Forcing it on with flyspell-mode-on, for > all wanted modes, seems to be the guaranteed way of making the hook > execute, and making sure the mode truly is turned on.
Never mind me - I'm getting thouroughly confused. With the version I thought worked, it doesn't highlight mail-mode or message-mode buffers upon loading either - you need to move the cursor over them, even though the modeline clearly shows the spell check is being run over the buffer when you first load it. A manual call to flyspell-buffer when in message-mode or mail-mode does nothing. So that's a different bug that affects all versions of flyspell, and could be a font locking bug in mail-mode. But the flyspell-mode-on vs flyspell-mode bug has still got me. -- TimC A new verb was accidently created during a discussion about KDE 3 and Debian. It was said that KDE 3 will sid soon. -- Debian Weekly News Jan 14,2003 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]