From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28970 invoked by alias); 12 Sep 2002 19:24:08 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28962 invoked from network); 12 Sep 2002 19:24:07 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 12 Sep 2002 19:24:07 -0000 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id MAA10315; Thu, 12 Sep 2002 12:13:00 -0700 (PDT) Message-ID: <3D80E9D5.5AACB552@redhat.com> Date: Thu, 12 Sep 2002 12:24:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Joel Brobecker , gdb-patches@sources.redhat.com Subject: Re: usage of tab in the indentation... References: <20020912190625.GB1105@gnat.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00207.txt.bz2 Joel Brobecker wrote: > > 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? For my part, I just use emacs' default formatting, which pretty much relieves me of worrying about formatting, since it almost always conforms to the coding standard. And emacs uses tabs. It would be a nuisance for me to have to change.