[Ns-developers] emacs indentation innamespace

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Tue Mar 31 04:46:07 PDT 2009


On Tue, 2009-03-31 at 12:37 +0100, Gustavo Carneiro wrote:

> > Any hints? It's annoying to do procedure 1) for every file you open...
> 
> 
> One option would be to define a new 'ns3' indentation style, adding this to
> .emacs:
> 
> (c-add-style "ns3"
>              '("gnu" (c-offsets-alist . ((innamespace . 0)))))
> 
> 
> But then we would have to agree to change all ns-3 source files modelines,
> from "gnu" to "ns3"...

There would also be the option of doing the following in every file and
I would support this:

/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; c-set-offset
'innamespace 0; -*- */

mainly because it would save all our emacs users from having to change
their emacs configuration

Mathieu



More information about the Ns-developers mailing list