Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLxa1-0000g3-Nt for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Jun 2017 20:10:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dLxa1-0002Ze-1X for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Jun 2017 20:10:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dLxZz-0002YS-LF for pgsql-hackers@postgresql.org; Fri, 16 Jun 2017 20:10:51 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dLxZw-0001lQ-Iv for pgsql-hackers@postgresql.org; Fri, 16 Jun 2017 20:10:50 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1dLxZq-00082J-BG; Fri, 16 Jun 2017 16:10:42 -0400 Date: Fri, 16 Jun 2017 16:10:42 -0400 From: Bruce Momjian To: Tom Lane Cc: Andres Freund , Peter Eisentraut , Alvaro Herrera , Robert Haas , Stephen Frost , "pgsql-hackers@postgresql.org" , Piotr Stefaniak Subject: Re: Preliminary results for proposed new pgindent implementation Message-ID: <20170616201042.GC5081@momjian.us> References: <29275.1497624664@sss.pgh.pa.us> <8827.1497633050@sss.pgh.pa.us> <20170616171946.qqy5tapovsamkxyg@alap3.anarazel.de> <9900.1497634441@sss.pgh.pa.us> <20170616180534.cdpduuq5a4twxuru@alap3.anarazel.de> <12302.1497637380@sss.pgh.pa.us> <20170616184238.GA5081@momjian.us> <20170616185406.jpwq6o6ghpvprxmi@alap3.anarazel.de> <20170616190441.GB5081@momjian.us> <29590.1497643007@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <29590.1497643007@sss.pgh.pa.us> User-Agent: Mutt/1.5.23 (2014-03-12) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Fri, Jun 16, 2017 at 03:56:47PM -0400, Tom Lane wrote: > can be. I managed to tweak bsdindent so that its output matches > what entab would do, by dint of the attached patch, which implements > the rule "use a space instead of a tab if the tab would only move > one column and we don't need another tab after it". (I think entab > is being weird with the second half of that rule, but if I remove it, > I get circa a thousand lines of invisible whitespace changes; probably > better not to deal with those. With no patch at all, just letting > bsdindent do what it does now, there's circa ten thousand changed lines.) Yeah, entab was designed to do that, via this C comment: /* * Is the next character going to be a tab? We do tab * replacement in the current spot if the next char is * going to be a tab and ignore min_spaces. */ -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription + -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers