help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hooks and c/c++-mode


From: daniele.g
Subject: Re: Hooks and c/c++-mode
Date: Wed, 11 May 2011 09:41:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

"Edward O'Connor" <hober0@gmail.com> writes:

>> Is there a smart way to set a hook for several modes at once? Maybe
>> using a regex or similar.
>>
>> For example:
>>
>> --8<---------------cut here---------------start------------->8---
>> (add-hook '{c|c++}-mode-hook
>>          '(lambda ()
>>             'do-something )))
>> --8<---------------cut here---------------end--------------->8---
>
> `C-mode-common-hook' is your friend. :)

Thanks to both.
-- 
   Oh, noi siamo noi, signore.  Anche loro sono noi.  Cosi', sia noi
   che loro siamo noi.
                -- Data a Picard e Riker, "Ricordare Parigi" (TNG)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]