[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [OT] Deactivate flyspell on a file by file basis
From: |
Pieter Praet |
Subject: |
Re: [O] [OT] Deactivate flyspell on a file by file basis |
Date: |
Fri, 03 Jun 2011 17:44:26 +0200 |
User-agent: |
Notmuch/0.5-244-g0065f54 (http://notmuchmail.org) Emacs/23.1.50.1 (x86_64-pc-linux-gnu) |
On Fri, 03 Jun 2011 11:18:54 -0400, Nick Dokos <address@hidden> wrote:
> Marcelo de Moraes Serpa <address@hidden> wrote:
>
>
> > I use flyspell-mode for writing articles, but I don't need it for my
> > gtd.org file. Is there a way to
> > exclude it (flyspell) from acting based on the filename of the buffer?
> >
>
> You can use file local variables for things like this. There is an
> ``eval'' pseudo-variable to allow you to execute code. See the emacs
> manual for details, but it would look something like this (untested and
> you have to put it at the end of the file):
>
> ...
> # Local Variables:
> # eval: (flyspell-mode 0)
> # End:
Although this can get rather annoying due to
enable-local-variables related popups.
I use something similar to this:
(add-hook 'find-file-hook
(lambda ()
(or (member (buffer-file-name)
'("/path/to/some/file"
"/path/to/other/file"))
(flyspell-mode 1))))
> Nick
>
Peace
--
Pieter