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

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

Re: C++-mode indentation and how to apply it to all the files under a di


From: ishikawa,chiaki
Subject: Re: C++-mode indentation and how to apply it to all the files under a directory.
Date: Fri, 07 Aug 2009 00:49:03 +0900
User-agent: Thunderbird 2.0.0.22 (Windows/20090605)

Dmirty Dzhus wrote:

>> Q-1: How to place "{" at the same indention level as "if" and "for" when
>>      "{" is placed on the next line using C++mode.
> 
> Set your C style to "bsd". You'll still need to adjust offset to 2
> (because it's 8 by default for bsd).

It did the trick. It seems that the mode setting in per-file variables
sets the offset to 2. So I am done!
(I have not done much editing yet, and so if something comes up again,
I may  post again , but now I know more about the various settings and can
probably handle the rest.)

>> Q-2: The second question is how to apply the setting to all c++ files
>> under a certain directory, but not elsewhere.
> 
> (info "(emacs) Directory Variables")

This is a new feature in 23.1, isn't it? I installed emacs 23.1 and
all is well now (!).

It has been years since I read Emacs manual from cover to cover.
Maybe I should again.  The per-directory variable section  in Info manual is
section 57 and so the whole manual has more sections these days. Maybe my
summer holidays are not long enough to read it through...

> -- 
> Happy Hacking.
> 

Thank you and happy hacking!







reply via email to

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