Results 1 to 2 of 2

Thread: Emacs: Disabling auto-fill-mode with local file variables?

  1. #1
    Join Date
    Jan 2006
    Location
    Örebro, Sweden
    Beans
    491

    Emacs: Disabling auto-fill-mode with local file variables?

    I normally have auto-fill-mode turned on for text files (from my .emacs). However, now I'm working on a text document together with another author, and the extra line breaks inserted by auto-fill-mode makes it ugly for him. So I want to use visual-line-mode and turn off auto-fill-mode for this file. I'm trying to do it with local variables like so:
    %% Local variables:
    %% mode: visual-line
    %% eval: auto-fill-mode
    %% mode: whitespace-newline
    %% End:
    I thought that eval-ing auto-fill-mode after loading the file would toggle it to turn it off, but that doesn't work.

    Is there another way to do it?

  2. #2
    Join Date
    Aug 2005
    Location
    Fargo, ND, USA
    Beans
    1,499
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: Emacs: Disabling auto-fill-mode with local file variables?

    Code:
    eval: (auto-fill-mode -1)
    In general, almost all minor modes are disabled this way, and enabled with
    Code:
    (auto-fill-mode 1)
    and toggled with
    Code:
    (auto-fill-mode)
    Help yourself: Search the community docs or try other resources.
    Quote Originally Posted by Henry Spencer
    Those who do not understand Unix are condemned to reinvent it, poorly.
    Let science use your computer when you aren't: Folding@Home.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •