From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Maurizio Vitale Newsgroups: gmane.emacs.help Subject: Re: Setting flyspell-mode when entering a file Date: Thu, 20 Aug 2009 22:05:47 -0400 Organization: Polymath Solutions, Inc. Message-ID: <87ab1tj4zo.fsf@cuma.i-did-not-set--mail-host-address--so-tickle-me> References: Reply-To: maurizio.vitale@polymath-solutions.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250820407 19579 80.91.229.12 (21 Aug 2009 02:06:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Aug 2009 02:06:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 21 04:06:40 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MeJWZ-0002Qb-Jp for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Aug 2009 04:06:40 +0200 Original-Received: from localhost ([127.0.0.1]:40097 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeJWZ-0003Ag-3f for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Aug 2009 22:06:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MeJTD-0001jT-1I for help-gnu-emacs@gnu.org; Thu, 20 Aug 2009 22:03:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MeJT7-0001id-O6 for help-gnu-emacs@gnu.org; Thu, 20 Aug 2009 22:03:09 -0400 Original-Received: from [199.232.76.173] (port=59574 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeJT7-0001iV-JV for help-gnu-emacs@gnu.org; Thu, 20 Aug 2009 22:03:05 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:48461) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MeJT7-0006OX-22 for help-gnu-emacs@gnu.org; Thu, 20 Aug 2009 22:03:05 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1MeJT3-0001eA-CG for help-gnu-emacs@gnu.org; Fri, 21 Aug 2009 04:03:01 +0200 Original-Received: from pool-71-182-166-56.pitbpa.east.verizon.net ([71.182.166.56]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Aug 2009 04:03:01 +0200 Original-Received: from maurizio.vitale by pool-71-182-166-56.pitbpa.east.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Aug 2009 04:03:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pool-71-182-166-56.pitbpa.east.verizon.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:1sGyN081bYZVePuzWqI4eYK1seo= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:67316 Archived-At: >>>>> "Sarir" == Sarir Khamsi writes: Sarir> I would like to automatically enter flyspell-mode when I open Sarir> a file and have placed Sarir> -*- flyspell-mode: t -*- Sarir> at the top of the file I'm opening. The mode-line says "Fly" Sarir> in it but flyspell doesn't seem to be working. If I then run Sarir> the flyspell-mode command interactively (twice since it seems Sarir> to already be enabled), it works fine. Any ideas what I'm Sarir> doing wrong? Thanks. You can set flyspell mode for specific modes. This is what I have: (add-hook 'message-mode-hook 'turn-on-flyspell) (add-hook 'text-mode-hook 'turn-on-flyspell) (add-hook 'c-mode-common-hook 'flyspell-prog-mode) (add-hook 'emacs-lisp-mode-hook '(lambda () (setq flyspell-use-meta-tab nil) (flyspell-prog-mode))) (defun turn-on-flyspell () (interactive) (flyspell-mode 1)) OTH, Maurizio --