unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Setting flyspell-mode when entering a file
@ 2009-08-20 20:55 Sarir Khamsi
  2009-08-21  2:05 ` Maurizio Vitale
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sarir Khamsi @ 2009-08-20 20:55 UTC (permalink / raw)
  To: help-gnu-emacs

I would like to automatically enter flyspell-mode when I open a file
and have placed

-*- flyspell-mode: t -*-

at the top of the file I'm opening. The mode-line says "Fly" in it but
flyspell doesn't seem to be working. If I then run the flyspell-mode
command interactively (twice since it seems to already be enabled), it
works fine. Any ideas what I'm doing wrong? Thanks.

Sarir

-- 
Sarir Khamsi
software guy
sarir.khamsi@raytheon.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Setting flyspell-mode when entering a file
  2009-08-20 20:55 Setting flyspell-mode when entering a file Sarir Khamsi
@ 2009-08-21  2:05 ` Maurizio Vitale
  2009-08-21  9:04 ` Eli Zaretskii
  2009-08-21  9:56 ` Teemu Likonen
  2 siblings, 0 replies; 4+ messages in thread
From: Maurizio Vitale @ 2009-08-21  2:05 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> "Sarir" == Sarir Khamsi <sarir.khamsi@raytheon.com> 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



-- 





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Setting flyspell-mode when entering a file
  2009-08-20 20:55 Setting flyspell-mode when entering a file Sarir Khamsi
  2009-08-21  2:05 ` Maurizio Vitale
@ 2009-08-21  9:04 ` Eli Zaretskii
  2009-08-21  9:56 ` Teemu Likonen
  2 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2009-08-21  9:04 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Sarir Khamsi <sarir.khamsi@raytheon.com>
> Date: Thu, 20 Aug 2009 13:55:30 -0700
> 
> I would like to automatically enter flyspell-mode when I open a file
> and have placed
> 
> -*- flyspell-mode: t -*-
> 
> at the top of the file I'm opening. The mode-line says "Fly" in it but
> flyspell doesn't seem to be working. If I then run the flyspell-mode
> command interactively (twice since it seems to already be enabled), it
> works fine. Any ideas what I'm doing wrong? Thanks.

Do you see any interesting messages in the *Messages* buffer, after
you visit such a file?




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Setting flyspell-mode when entering a file
  2009-08-20 20:55 Setting flyspell-mode when entering a file Sarir Khamsi
  2009-08-21  2:05 ` Maurizio Vitale
  2009-08-21  9:04 ` Eli Zaretskii
@ 2009-08-21  9:56 ` Teemu Likonen
  2 siblings, 0 replies; 4+ messages in thread
From: Teemu Likonen @ 2009-08-21  9:56 UTC (permalink / raw)
  To: help-gnu-emacs

On 2009-08-20 13:55 (-0700), Sarir Khamsi wrote:

> I would like to automatically enter flyspell-mode when I open a file
> and have placed
>
> -*- flyspell-mode: t -*-
>
> at the top of the file I'm opening. The mode-line says "Fly" in it but
> flyspell doesn't seem to be working. If I then run the flyspell-mode
> command interactively (twice since it seems to already be enabled), it
> works fine. Any ideas what I'm doing wrong? Thanks.

How does "-*- mode:flyspell -*-" work?


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-21  9:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-20 20:55 Setting flyspell-mode when entering a file Sarir Khamsi
2009-08-21  2:05 ` Maurizio Vitale
2009-08-21  9:04 ` Eli Zaretskii
2009-08-21  9:56 ` Teemu Likonen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).