all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: robert.thorpe@antenova.com
Subject: Re: cc-mode question
Date: 13 Sep 2006 09:47:48 -0700	[thread overview]
Message-ID: <1158166068.149954.54900@e3g2000cwe.googlegroups.com> (raw)
In-Reply-To: <ee96ka$5su$1@news.yaako.com>

jronald wrote:
> The command (c-toggle-auto-hungry-mode 1) doesn't take effect, as I wrote in
> the following context:
>
> (require 'cc-mode)
> (require 'cc-cmds)  ;;I still don't know if it is neccesary
> (c-toggle-auto-hungry-mode 1)

That should work, but what you're doing here is loading CC mode in
order to configure it. This isn't necessarily the best thing to do.
Normally Emacs by itself contains on a few modes at startup in order to
make startup time reasonable.  When you load a C file then Emacs loads
all of CC mode.

The best way to configure it is to tell CC mode to run a bit of code
when it loads.  This is a hook.  You can do this directly with Elisp,
alternatively customize knows how to do it.

Go to C customize group, pick "CC mode common hook", select "show",
select "INS" and type (c-toggle-auto-hungry-mode 1)

In elisp you can do (add-hook 'cc-mode-hook (lambda ()
(c-toggle-auto-hungry-mode 1))), which is equivalent.

  reply	other threads:[~2006-09-13 16:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-13 15:03 cc-mode question jronald
2006-09-13 16:47 ` robert.thorpe [this message]
     [not found] <mailman.481.1119202298.2857.help-gnu-emacs@gnu.org>
2005-06-20 18:08 ` Alan Mackenzie
2005-06-21 19:07   ` Evgeniy
     [not found]   ` <mailman.670.1119368608.2857.help-gnu-emacs@gnu.org>
2005-06-25  7:54     ` Alan Mackenzie
2005-06-20 23:31 ` drkm
     [not found]   ` <mailman.672.1119368619.2857.help-gnu-emacs@gnu.org>
2005-06-21 16:23     ` drkm
     [not found]       ` <mailman.814.1119458909.2857.help-gnu-emacs@gnu.org>
2005-06-22 17:47         ` drkm
2005-06-22 20:33       ` Evgeniy
2005-06-21 19:15   ` Evgeniy
  -- strict thread matches above, loose matches on Subject: below --
2005-06-19 21:33 Evgeniy

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1158166068.149954.54900@e3g2000cwe.googlegroups.com \
    --to=robert.thorpe@antenova.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.