all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hongxu Chen <leftcopy.chx@gmail.com>
To: Alan Mackenzie <acm@muc.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: questions about the value of local variables
Date: Tue, 14 May 2013 00:36:57 +0800	[thread overview]
Message-ID: <8738tqdefq.fsf@gmail.com> (raw)
In-Reply-To: <kmoil8$2jp9$1@colin.muc.de> (Alan Mackenzie's message of "Sun, 12 May 2013 17:14:16 +0000 (UTC)")

Alan Mackenzie <acm@muc.de> writes:

> Hongxu Chen <leftcopy.chx@gmail.com> wrote:
>
>> Hi,
>
>>  I am using Emacs for some C/C++ coding.
>
> [ .... ]
>
>>  Still another question, is there any good practice to set the
>>  variables with proper hooks in c family programming language modes?
>>  There seems quite a lot of hooks there
>>  (`c-initialization-hook',`cc-mode-hook', `c-mode-hook',
>>  `c-mode-common-hook', etc) and I just get lost.
>>  
>
> Well, I don't think there's a `cc-mode-hook', but the others exist,
> yes.  :-)
Sorry that I made a mistake.
>
> Basic rule: put (the bulk of) your CC Mode customisations on
> `c-mode-common-hook'.  If this doesn't work, you'll need one of the other
> hooks.  It's all documented on page "CC Hooks" in the CC Mode manual.
Thanks for your advice. It seems that using the right hook really needs
quite a lot of tricks. A few days ago I was adding a keymap for one of
the command, but it didn't work until I use the
`c-initialization-hook'. Well, seems that I have to read the docs
first. 
>
>> -- 
>> Regards,
>> Hongxu Chen

-- 
Regards,
Hongxu Chen



  reply	other threads:[~2013-05-13 16:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.25589.1368335429.855.help-gnu-emacs@gnu.org>
2013-05-12 17:14 ` questions about the value of local variables Alan Mackenzie
2013-05-13 16:36   ` Hongxu Chen [this message]
2013-05-12  5:10 Hongxu Chen

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=8738tqdefq.fsf@gmail.com \
    --to=leftcopy.chx@gmail.com \
    --cc=acm@muc.de \
    --cc=help-gnu-emacs@gnu.org \
    /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.