[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: any Emacs features to help keep code/comments under 80 columns width
From: |
ken |
Subject: |
Re: any Emacs features to help keep code/comments under 80 columns width? |
Date: |
Tue, 3 Dec 2002 16:09:13 -0500 (EST) |
seberino@spawar.navy.mil at 17:30 (UTC-0800) on Mon, 2 Dec 2002 said:
= Ken
=
= Thanks for the help.
=
= Do you know why I would be able to turn on auto-fill-mode
= interactively with "M-x auto-fill-mode" but *not*
= by putting
=
= (setq-default fill-column 80)
= (setq text-mode-hook 'turn-on-auto-fill)
=
= in .emacs?
First, follow Kai's advice and use:
(add-hook 'text-mode-hook 'turn-on-auto-fill)
I haven't tested it yet, but I'm taking his word for it.
The .emacs file is read when emacs is started. You would need to
restart emacs-- i.e., close it and then open it up again-- for it to
take effect.
Note that you can set the fill-column number a couple other ways:
- e.g., if you want wrapping at column 45, do C-4 C-5 C-x f
- Put the cursor where you want wrapping to happen and do C-u C-x f
=
= BTW, will this turn on auto-fill-mode for *all* modes
= like c-mode? (programming)
No, it would be just for text mode.
hth,
ken
=
= Chris
=
= On Fri, Nov 29, 2002 at 08:40:18PM -0500, ken wrote:
= >
= > Chris,
= >
= > To get this when emacs loads, put the following in your .emacs:
= >
= > (setq text-mode-hook 'turn-on-auto-fill)
= >
= > As can be seen, that just sets it for text mode. Do another for, say,
= > html-helper-mode:
= >
= > (setq html-helper-mode-hook 'turn-on-auto-fill)
= >
= > Personally, I turnaround at 78:
= >
= > (setq-default fill-column 78)
= >
= > Since versions seem to be more than normally critical, mine's 20.7.1.
= >
= >
= > hth,
= > ken
= >
= > --
= > AMD crashes? See http://cleveland.lug.net/~ken/amd-problem/.
= >
= > seberino@spawar.navy.mil at 15:22 (UTC-0800) on Thu, 28 Nov 2002 said:
= >
= > = I often write comments and code and look at modeline's Column# display
= > = to verify I did not go beyond the 80th column when I type.
= > =
= > = Are there any goodies in Emacs to help me accomplish this???
= > =
= > =
= > = Maybe....
= > =
= > = 1. Emacs flashes the screen when I reach column 80
= > =
= > = 2. Emacs automatically adds a hard return and moves me to next line
= > = when I reach column 80.
= > =
= > = 3. Emacs just doesn't let me type beyond column 80.
= > =
= > = Chris
= > =
= >
= >
= >
= > _______________________________________________
= > Help-gnu-emacs mailing list
= > Help-gnu-emacs@gnu.org
= > http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
=
=
--
AMD crashes? See http://cleveland.lug.net/~ken/amd-problem/.