From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6724 invoked by alias); 9 Mar 2010 17:33:08 -0000 Received: (qmail 6710 invoked by uid 22791); 9 Mar 2010 17:33:07 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_SORBS_WEB,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout21.012.net.il (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Mar 2010 17:33:00 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0KZ000A00ZCGNW00@a-mtaout21.012.net.il> for gdb-patches@sourceware.org; Tue, 09 Mar 2010 19:32:58 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.34.234]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KZ000A1RZEX9A20@a-mtaout21.012.net.il>; Tue, 09 Mar 2010 19:32:58 +0200 (IST) Date: Tue, 09 Mar 2010 17:33:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] avoid GDB crash on inspection of pascal arrays In-reply-to: <20100309051651.GM3081@adacore.com> To: Joel Brobecker Cc: pierre.muller@ics-cnrs.unistra.fr, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83mxyh2yes.fsf@gnu.org> References: <001801cabee0$31499ca0$93dcd5e0$%muller@ics-cnrs.unistra.fr> <20100308185450.GK3081@adacore.com> <001201cabf17$43e1b960$cba52c20$%muller@ics-cnrs.unistra.fr> <20100309051651.GM3081@adacore.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-03/txt/msg00356.txt.bz2 > Date: Tue, 9 Mar 2010 09:16:51 +0400 > From: Joel Brobecker > Cc: gdb-patches@sourceware.org > > > Formatting with the tab/spaces conversion is still a nightmare > > for me... > > (you could get me started on a rambling about the rid^H^H^Huse of > tabs instead of spaces in our source code - I just can't get over > these tabs) > > > I really don't know vi enough to reformat correctly an almost 100 > > lines long block... Is there a neat way to do this just with vi > > or do I need something more powerful? > > I think that the canonical tool for formatting is emacs. Each time > I mentioned the idea of getting rid of tabs, some said that the > formatting rules need to match what emacs does. For a GNU project, > it's probably fair. > > Unfortunately, I don't remember emacs anymore. If it helps someone, here's the Emacs recipe for converting all tabs into the equivalent number of spaces: . Step 1: type "M-x set-variable RET tab-width RET 8 RET" . Step 2: mark the region of text where you want to get rid of tabs; if that's the whole buffer, type "C-x h" to mark all of it . Step 3: type "M-x untabify RET", then save the buffer The first step makes sure each tab stop is 8 columns, the default width of a TAB character. It is there because some people (and some files) override that default, and Emacs will honor such settings by expanding each tab into that number of spaces.