[ESS] Re: how to disable auto-fill-mode for editing R / S

Stephen Eglen S.J.Eglen at damtp.cam.ac.uk
Tue Mar 29 19:59:29 CEST 2005


 > 
 > However, as I just found, adding
 >   (auto-fill-mode 0)
 > in your ~/.emacs initialization file is not enough.
 > We currently turn on auto-fill mode for *.R buffers anyway.

I'm slightly surprised auto-fill is on by default in .R buffers.
Emacs does not even turn on auto-fill in text buffers, so I'm suprised
why a programming language mode would turn it on by default.  Either
we should offer an easy way for it to turn off in programming modes,
or remove the code [Ess-core where is auto-fill turned on, and is it
intentional?] and then do what the Emacs FAQ suggests for text modes:

----------------------------------------------------------------------
How do I turn on `auto-fill-mode' by default?
=============================================

   To turn on `auto-fill-mode' just once for one buffer, use `M-x
auto-fill-mode'.

   To turn it on for every buffer in a certain mode, you must use the
hook for that mode.  For example, to turn on `auto-fill' mode for all
text buffers, including the following in your `.emacs' file:

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

   If you want `auto-fill' mode on in all major modes, do this:

     (setq-default auto-fill-function 'do-auto-fill)

----------------------------------------------------------------------

Stephen




More information about the ESS-help mailing list