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

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

Re: Can't turn on auto-fill-mode in c-mode (is it only for text-mode??)


From: Christian Seberino
Subject: Re: Can't turn on auto-fill-mode in c-mode (is it only for text-mode??)
Date: 22 Jan 2003 10:25:36 -0800

Greg

I'm impressed and amazed that you found this info out.
I grep'ed thru the Emacs Lisp Ref Manual for ver. 21
and there was not one place where they mentioned
c-do-auto-fill.  How did you find this out?!?!

I cannot believe it is this difficult to set this mode
for c-mode.  Surely I cannot be the only one that
uses Emacs for programming and wants to keep his code
from being as wide as 2 pages!??!?

Please tell me if you don't mind
the proper to turn on c-do-auto-fill so that
it only activates in c-mode and doesn't mess up other
modes.

thanks,

Chris

P.S. BTW is there a difference between c-mode and cc-mode??
I turn on c-mode but I see messages about cc-mode appear
when Emacs turns on.  I dunno.


Greg Hill <ghill@synergymicro.com> wrote in message 
news:<mailman.741.1043189082.21513.help-gnu-emacs@gnu.org>...
> Chris,
> 
> I see that in Emacs-21 the default value of auto-fill-function for 
> c-mode is c-do-auto-fill, which is defined in 
> lisp/progmodes/cc-cmds.el.  (Emacs-20 uses plain old do-auto-fill.)
> 
> While visiting your .c file, try changing auto-fill-function (which 
> is a buffer-local variable) to 'do-auto-fill, and see if it behaves 
> more like you would expect.  If so, then you might want to 
> investigate what the difference is between c-do-auto-fill and plain 
> old do-auto-fill.
> 
> --Greg
> 
> 
> 
> At 12:38 PM -0800 1/21/03, Christian Seberino wrote:
> >"emacs aa" opens a new file and I can do M-x auto-fill-mode to put it
> >into auto-fill-mode.  (I nuked .emacs so that won't be a red herring.)
> >
> >"emacs aa.c" throws it into c-mode (cc-mode?) and M-x auto-fill-mode
> >has no noticeable effect. 
> >
> >HOW COME AUTO-FILL-MODE DOESN'T WORK IN C-MODE???
> >
> >Chris
> >_______________________________________________
> >Help-gnu-emacs mailing list
> >Help-gnu-emacs@gnu.org
> >http://mail.gnu.org/mailman/listinfo/help-gnu-emacs


reply via email to

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