[Ns-developers] Fwd: emacs indentation innamespace
Gustavo Carneiro
gjcarneiro at gmail.com
Tue Mar 31 05:01:12 PDT 2009
Forgot the list.
---------- Forwarded message ----------
From: Gustavo Carneiro <gjcarneiro at gmail.com>
Date: 2009/3/31
Subject: Re: [Ns-developers] emacs indentation innamespace
To: Mathieu Lacage <mathieu.lacage at sophia.inria.fr>
2009/3/31 Mathieu Lacage <mathieu.lacage at sophia.inria.fr>
> 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; -*- */
+1 if it worked, but I get a "Malformed -*- line" emacs (22) error.
>
>
> mainly because it would save all our emacs users from having to change
> their emacs configuration
Yes, but at least it would save us from ever having to change the mode line
again. We could adjust the style settings globally in the future without
touching the source files.
But your option is good too, if only we could get it to work reliably.
>
>
> Mathieu
>
>
--
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert
--
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert
More information about the Ns-developers
mailing list