bug-gnulib
[Top][All Lists]
Advanced

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

Re: untabify?


From: Jim Meyering
Subject: Re: untabify?
Date: Mon, 07 Dec 2009 07:59:16 +0100

Bruno Haible wrote:
> I see that some of you are starting to untabify C source code (Jim in
> lib/userspec.c, Eric in lib/pipe-safer.c). Is this a signal that we can
> finally put those annoying TAB characters at rest? [1] I would love it.

I would be happy to do that to all of gnulib.
It is long overdue.

I've used this shell function to convert other projects:

no-tabs-for-indentation()
{
  local exclude=/dev/null
  local x2=.x-sc_TAB_in_indentation
  test -f $x2 && exclude=$x2
  git ls-files \
    | pcregrep -vf $exclude \
    | xargs pcregrep -l '^ *\t' \
    | xargs perl -MText::Tabs -ni -le \
      '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
}

If everyone agrees, I'd like to update copyrights, too,
before the new year.




reply via email to

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