--- Begin Message ---
Subject: |
say how to turn OFF auto-fill with local variables |
Date: |
Thu, 09 Oct 2008 03:19:56 +0800 |
In (info "(emacs)Specifying File Variables")
For example, you may be tempted to try to turn on Auto Fill mode with
a local variable list. That is a mistake. The choice of Auto Fill mode
or not is a matter of individual taste, not a matter of the contents of
particular files. If you want to use Auto Fill, set up major mode hooks
with your `.emacs' file to turn it on (when appropriate) for you alone
(*note Init File::). Don't use a local variable list to impose your
taste on everyone.
OK, but say how to (turn it on and OFF, supposing we have it on by
default) anyway with local variables, just in case.
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#1122: say how to turn OFF auto-fill with local variables |
Date: |
Tue, 21 Feb 2012 19:59:59 -0500 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
The manual says:
Next, suppose you don't want Auto Fill mode turned on in LaTeX mode,
which is one of the modes based on Text mode. You can do this with the
following additional line:
(add-hook 'latex-mode-hook (lambda () (auto-fill-mode -1)))
and
You can also use file-local variables to specify buffer-local minor
modes, by using `eval' specifications. For example, this first
nonblank line puts the buffer in Lisp mode and enables Auto-Fill mode:
; -*- mode: Lisp; eval: (auto-fill-mode 1); -*-
That covers everything that needs to be covered.
--- End Message ---