From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: turn on flyspell mode permanently in .emacs Date: Wed, 23 Aug 2006 08:36:55 -0600 Organization: IHS Message-ID: References: <1156206235.108245.155630@i3g2000cwc.googlegroups.com> <1156277573.754995.300830@75g2000cwc.googlegroups.com> <1156286804.596290.245250@74g2000cwt.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1156343918 4102 80.91.229.2 (23 Aug 2006 14:38:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 23 Aug 2006 14:38:38 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 23 16:38:37 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GFtsJ-0001Zw-7c for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Aug 2006 16:38:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GFtsI-0002Kh-Mm for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Aug 2006 10:38:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GFts2-0002IA-9v for help-gnu-emacs@gnu.org; Wed, 23 Aug 2006 10:38:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GFts1-0002HE-EX for help-gnu-emacs@gnu.org; Wed, 23 Aug 2006 10:38:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GFts0-0002Gx-KV for help-gnu-emacs@gnu.org; Wed, 23 Aug 2006 10:38:16 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GFtzr-0002PD-4n for help-gnu-emacs@gnu.org; Wed, 23 Aug 2006 10:46:23 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GFtrf-0001OR-J2 for help-gnu-emacs@gnu.org; Wed, 23 Aug 2006 16:37:55 +0200 Original-Received: from 207.167.42.206 ([207.167.42.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Aug 2006 16:37:55 +0200 Original-Received: from ihs_4664 by 207.167.42.206 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Aug 2006 16:37:55 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 81 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.206 User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) In-Reply-To: <1156286804.596290.245250@74g2000cwt.googlegroups.com> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36873 Archived-At: kevmitch@gmail.com wrote: >> 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. That is a puzzle. >> 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. Yes. >> 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". Naturally: the *scratch* buffer is Lisp Interaction mode by default, not Text mode. As Sebastien explained, text-mode-hook is also run by *many* other text-oriented modes (Mail mode, SGML mode, etc.) > 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. You might want to try (flyspell-prog-mode) there instead. > 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. ,----[ C-h v major-mode RET ] | major-mode is a variable defined in `C source code'. | Its value is emacs-lisp-mode | Local in buffer .emacs; global value is fundamental-mode | Automatically becomes buffer-local when set in any fashion. | | Documentation: | Symbol for current buffer's major mode. | | [back] `---- > 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? Yes, that is wishful thinking. The closest thing is change-major-mode-hook, but you reported that my hack that used it didn't actually work. > Thanks for taking the time to think about this. You're welcome! -- Kevin