bug-gnulib
[Top][All Lists]
Advanced

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

Re: [Bug-gnulib] no new tabs please (was: normalize leading and remove t


From: Bruno Haible
Subject: Re: [Bug-gnulib] no new tabs please (was: normalize leading and remove trailing white space from imported files)
Date: Wed, 13 Aug 2003 13:38:17 +0200
User-agent: KMail/1.5

Paul Eggert wrote:
> To help make merging from coreutils a bit easier I installed the
> following patch, which changes srclist-update to remove trailing white
> space, and to normalize leading white space, in files automatically
> imported from other sources.

Nothing against removing trailing white space.

But please don't introduce tabs in files that didn't have them!
Tabs
  - are not worth the space saving (given today's hard disk prices)
    and are not worth the network bandwith saving (given that everyone
    uses "cvs -z3" anyway)
  - distort the aesthetics anytime someone uses an editor which is
    configured with tab size = 4 or = 2,
  - make for unpleasant viewing in many editors (cursor shape/location)
  - cause surprising "backspace" and "delete" key behaviour in most
    editors
  - cause "diff -c3" and "diff -u" diffs to look like badly indented code,
  - cause weird indentation when cited in a mail (with "> " prefix).

For these reasons, I recommend to everyone this .emacs snippet:

    ;; Tabs are anachronistic.
    (setq-default indent-tabs-mode nil)

and I don't use any tabs in any files except in C/C++ files for GNU where
it tabs are commonplace (like "#    define"). Not in shell scripts and
not in autoconf macros.

> lib/config.charset, 
> m4/gettext.m4, m4/iconv.m4, m4/intdiv0.m4, m4/inttypes-pri.m4,
>       m4/lib-link.m4, m4/lib-prefix.m4, m4/longdouble.m4, m4/po.m4,
>       m4/progtest.m4, m4/signed.m4

These files are maintained by me, see the last line of modules/gettext.
Can you please undo the change of these files? These macros are
complicated enough by themselves; I really don't need the additional
editing trouble that the tabs bring in.

> lib/ref-add.sin, lib/ref-del.sin

Here too, there's no point in adding tabs to files that had none.

> Index: config/config.guess

How useful is it to make config.guess and config.sub differ from the
one maintained on ftp://ftp.gnu.org/pub/gnu/config/ ?

>                   eval $set_cc_for_build
>                   sed 's/^              //' << EOF >$dummy.c
>
> -              #define _HPUX_SOURCE
> -              #include <stdlib.h>
> -              #include <unistd.h>
> +           #define _HPUX_SOURCE
> +           #include <stdlib.h>
> +           #include <unistd.h>

This change is plain wrong. The sed expression removes leading spaces,
but you've put tabs in there. So the sed expression has no effect on
these three lines, and the resulting C code is therefore not valid
K&R C.

I also believe that tabs are not portable in .tex files; Karl, can you
confirm?

Bruno





reply via email to

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