add standard vi formatting directives to all source files?

Robert P. J. Day rpjday at mindspring.com
Mon May 22 10:18:08 UTC 2006


On Sun, 21 May 2006, Giuseppe Ciotta wrote:

> On Thu, May 18, 2006 at 09:48:57AM -0400, Robert P. J. Day wrote:
> >
> >   i notice that some, but not all, BB source files end with the
> > editing directives:
> >
> >
> > /*
> > Local Variables:
> > c-file-style: "linux"
> > c-basic-offset: 4
> > tab-width: 4
> > End:
> > */
> >
> >
> >   if this is the consensus, i can toss together a patch that adds
> > that to all files that currently don't have it and send it offline
> > to rob. are there any objections?  is that content agreeable to
> > everyone?
>
> These pages worth a read:
>
> http://www.emacswiki.org/cgi-bin/wiki/ProjectSettings
> http://www.emacswiki.org/cgi-bin/wiki/DirVarsPackage
>
> I think putting local variables for every file in the tree it's a
> non-scalable solution, as we can put them in a single place. With
> dirvars.el it's a matter of adding .emacs-dirvars containing local
> variable to the root of the project.

i like that idea above rather than adding 5-6 lines of emacs editing
directives to every single source file.  i've already submitted a
patch that makes the files consistent by:

  - making sure each file opens with bernhard's suggested one-line
    "vi" directive
  - removes *all* of that emacs stuff from the end of each file

if that patch is applied and, down the road, enough people want the
emacs stuff back, it can always be put back in with a single patch.
but at the moment, it seems fairly unnecessary since emacs users are
generally clever enough to deal with something like that themselves.

rday



More information about the busybox mailing list