Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@gnat.com>
To: gdb-patches@sources.redhat.com
Subject: usage of tab in the indentation...
Date: Thu, 12 Sep 2002 12:06:00 -0000	[thread overview]
Message-ID: <20020912190625.GB1105@gnat.com> (raw)

I don't really know where to ask this question, but since this is
bugging me in the GDB sources, I'll ask here.

I looked at the GNU Coding Standards manual, and they give a list of
recommendations on how GNU code should be formatted, but they don't
mention tabulations.

In the list of options to GNU indent that they give, they leave the
choice of tabs or not to indent (ie they use the default, which is to
use tabs): (http://www.gnu.org/prep/standards_23.html#SEC23).

I personally find that tabs are a nuisance, what are the advantages of
using tabs? So far, they make my editor insert cursor go sometimes "like
crazy" but more importantly, they sometimes screw the diff output.
Consider the following hunk:

<<
--- 2071,2082 ----
    if (target_is_remote ())
      {
        if (args == 0 || *args == 0)
!       {
!         if (tracepoint_number == -1)
!           error ("No current tracepoint -- please supply an argument.");
!         else
!           tdp = tracepoint_number;    /* default is current TDP */
!       }
        else
        tdp = parse_and_eval_long (args);
  
>>

See how the left curly brace is misplaced because of the tab?

Could we consider banning tabs in favor of spaces and add -nut to
the list of indent options in gdb_indent.sh?

(I am not trying to start a troll, ok? :-).
-- 
Joel


             reply	other threads:[~2002-09-12 19:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-12 12:06 Joel Brobecker [this message]
2002-09-12 12:24 ` Michael Snyder
2002-09-12 12:45   ` Joel Brobecker
2002-09-12 14:13     ` Kevin Buettner
2002-09-12 17:58     ` Michael Snyder
2002-09-12 18:26   ` Tom Tromey
2002-09-12 18:40     ` Andrew Cagney
2002-09-19  4:34       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020912190625.GB1105@gnat.com \
    --to=brobecker@gnat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox