From: Charles Jamieson <cjamieson@no.junk>
Subject: Re: problem with fill mode
Date: Tue, 18 May 2004 23:49:39 GMT [thread overview]
Message-ID: <nixqc.22034$gr.1785906@attbi_s52> (raw)
In-Reply-To: <40AA9508.5050502@yahoo.com>
Kevin Rodgers wrote:
> Charles Jamieson wrote:
> > I can't get emacs to automatically place c files into fill mode. I have
> > tried the following lines in .emacs:
> >
> > (auto-fill-mode 1)
>
> Auto Fill is a minor mode, so its local to every buffer. But your
> ~/.emacs file is loaded in the *scratch* buffer.
>
> > (auto-fill-mode t)
>
> And, auto-fill-mode's ARG must be positive (i.e. a number) to turn it on.
>
> > (add-hook 'C-mode-hook
> > '(lambda () (turn-on-auto-fill)))
>
> Good: Looking at its source, which is available from a hyperlink in its
> doc string via `C-h f', (turn-on-auto-fill) is equivalent to
> (auto-fill-mode 1).
>
> Bad: Lisp symbols are case-sensitive. `C-h v' easily confirms that
> c-mode-hook is what you want:
>
> (add-hook 'c-mode-hook 'turn-on-auto-fill)
>
> > (add-hook 'C-mode-hook
> > '(lambda () (auto-fill-mode t))
> >
> > (add-hook 'C-mode-common-hook
> > '(lambda () (auto-fill-mode t))
>
> See above.
>
This is exactly what I needed.
Thanks,
-charles
prev parent reply other threads:[~2004-05-18 23:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-18 21:02 problem with fill mode Charles Jamieson
2004-05-18 22:58 ` Kevin Rodgers
2004-05-18 23:49 ` Charles Jamieson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='nixqc.22034$gr.1785906@attbi_s52' \
--to=cjamieson@no.junk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).