help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: turn on flyspell mode permanently in .emacs


From: kevmitch
Subject: Re: turn on flyspell mode permanently in .emacs
Date: 22 Aug 2006 15:46:44 -0700
User-agent: G2/0.2

> In what buffer?  The *scratch* buffer should have flyspell mode turned
> on after your ~/.emacs file is loaded.
It appears that even with (flyspell-mode 1) in the top level of the
.emacs file
flyspell mode is not on in any buffer; not even the scratch buffer.

> How do you manually turn on flyspell-mode?  (M-x flyspell-mode in a
> buffer where it's already turned on will actually toggle it i.e. turn
> it off.  You need to specify a prefix arg: C-u M-x flyspell-mode.)
yeah, I just use M-x flyspell-mode to turn it on which suggests that it
really isn't on  prior to this.

> I'm surprised it doesn't say "Flyspell mode enabled" somewhere after
> "Loading flyspell...done".
This is a good point.

> Your best bet is to get rid of (flyspell-mode 1) at the top level of
> your ~/.emacs file, because we know it won't do what you asked for, and
> to follow Sebastien's advice:
>
> (add-hook 'text-mode-hook
>         (lambda () (flyspell-mode 1)))
Ok, I hadn't tried exactly that. You'll have to bear with me. This lisp
stuff is rather obtuse to the beginner. Unfortunately, this doesn't
have the desired behavior either. It does however turn on flyspell in
the scratch buffer if I enter the command "M-x text-mode". I can also
get it to turn on automatically if I open a .m file (which puts emacs
in matlab-mode) if I have the following lines in my .emacs file:

(add-hook 'matlab-mode-hook
          (lambda () (flyspell-mode 1)))

So that's something.

To keep things simple, I have otherwise been opening the .emacs file,
which puts me in a buffer titled .emacs, but the exact name of the mode
seems to be trickier. I get a pulldown menu titled  Emacs-Lisp, which
might suggest that I'm in Emacs-Lisp-mode. However M-x Emacs-Lisp-mode
returns no match. I guess this is really beside the issue, because I
don't want to have to worry about what mode I'm in. I just want
flyspell to be on all the time. Is it just wishful thinking that there
might be an any-mode-hook?

Thanks for taking the time to think about this.
Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]