help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Per-File Auto fill mode?


From: Oliver Scholz
Subject: Re: Per-File Auto fill mode?
Date: Mon, 28 Apr 2003 16:53:26 +0200
User-agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3.50 (windows-nt)

gebser@ameritech.net writes:

> Thanks much, Oliver,
>
> I was just wondering how to do this very thing, so you've helped twice.  
> However, I want to use outline mode and turn off auto-fill.  I've got 
> the first part, but not the second, i.e.,
>
> % -*- mode: outline; auto-fill nil; -*-

[The leading “%” is a comment-char, it is necessary only for
LaTeX-files.]

Well, the line I posted earlier actually _toggles_ auto-fill-mode, so
if your have it normally turned _off_, you can use the same line.

A better solution would be to use something like this:

-*-mode: outline; eval: (auto-fill-mode -1) -*-

But this has the disadvantage that you are queried each time you open
the file whether you want the local variables section to be evaluated.

Is there any reason why you don't have auto-fill-mode turned on by
default? For example with:

(add-hook 'text-mode-hook 'turn-on-auto-fill)

This would also work for outline-mode. Then if you don't want this
for some text-mode derivative, you can turn it off:

(add-hook 'some-special-mode-hook
          (lambda ()
            (auto-fill-mode -1)))


    Oliver
-- 
9 Floréal an 211 de la Révolution
Liberté, Egalité, Fraternité!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]