Re: Turning emacs auto-fill off.

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Vaughn Treude
Date:  
To: Main PLUG discussion list
Subject: Re: Turning emacs auto-fill off.
On Tue, 2006-03-21 at 09:24, June Tate wrote:
> On Mar 21, 2006, at 9:14 AM, Vaughn Treude wrote:
>
> > Hello everyone:
> >
> > I want to set my .emacs file so that emacs always comes up with
> > auto-fill (that is, word wrap) OFF. First of all, there was this
> > paragraph, from which I deleted the line that said turn-on-auto-fill.
> >
> > ;; By default we starting in text mode.
> > (setq initial-major-mode
> >       (lambda ()
> >         (text-mode)
> >         (turn-on-auto-fill)
> >     (font-lock-mode)
> >     ))

>
> Did you try this instead?
>
>    (setq initial-major-mode
>          (lambda ()
>            (text-mode)
>            (auto-fill-mode 0)
>            (font-lock-mode)))

>


I just tried that (I tried setting it to 'nil' before) and it still
didn't work.

> If that doesn't work, try pressing C-h v text-mode-hook to see if
> there's a mode-hook setup to turn on auto-fill after text-mode is
> turned on. If there is, running the following elisp code...
>
>    (add-hook 'text-mode-hook (lambda () (auto-fill-mode 0)))

>


Running the command produced the following:
text-mode-hook's value is
(turn-on-auto-fill text-mode-hook-identify)

So I inserted the "add-hook" statement, also without effect


> ...should add another hook to the end of the list that turns off auto-
> fill-mode. Granted, the ideal solution would be to figure out what's
> turning on auto-fill mode in the first place and remove that instead,
> but this should be a viable workaround in the meantime. You might
> also examine your .emacs file for any customize settings relating to
> auto-fill-mode and either remove them entirely, or change them to nil
> or 0.
>
> > That didn't work. Apparently auto-fill is on by default for my
> > version
> > of emacs, 23.3.2.
>
> I'm running a hand-built-from-CVS GNU Emacs, and it's only up to
> revision 22.0.5 -- are you running a heavily patched version, a
> branch, or perhaps XEmacs instead of GNU Emacs?
>
> >> From my limited knowledge it seems that the following statement
> >> should
> > do it:
> >
> > (setq auto-fill-mode nil)
>
> In my CVS build and the standard version that comes with MacOS X
> (21.2.1) auto-fill-mode isn't a defvar for auto-fill, so setting that
> variable will have no effect. Instead, try calling the function like
> this:
>
>    (auto-fill-mode 0)

>


Added that - it didn't turn off the mode, but it did change the result
of the Ctrl-h v command:

text-mode-hook's value is
((lambda nil
(auto-fill-mode 0))
turn-on-auto-fill text-mode-hook-identify)

So I tried this one instead, with no luck:
(setq text-mode-hook-identify 0)


> That should effectively turn off auto-fill for the current buffer.
>


Thanks very much for the suggestions, but I suppose I should read a
"howto" about Lisp, so I have a clue of what I'm doing.

Vaughn

> --
> June Tate
>
> http://www.theonelab.com
>
>
>
>
> ______________________________________________________________________
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss


---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss