From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: problem with fill mode
Date: Tue, 18 May 2004 16:58:16 -0600 [thread overview]
Message-ID: <40AA9508.5050502@yahoo.com> (raw)
In-Reply-To: rRuqc.31496$6f5.2980136@attbi_s54
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.
--
Kevin Rodgers
next prev parent reply other threads:[~2004-05-18 22:58 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 [this message]
2004-05-18 23:49 ` Charles Jamieson
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=40AA9508.5050502@yahoo.com \
--to=ihs_4664@yahoo.com \
/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).