Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* usage of tab in the indentation...
@ 2002-09-12 12:06 Joel Brobecker
  2002-09-12 12:24 ` Michael Snyder
  0 siblings, 1 reply; 8+ messages in thread
From: Joel Brobecker @ 2002-09-12 12:06 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-09-19 11:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-12 12:06 usage of tab in the indentation Joel Brobecker
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox