pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: Piotr Stefaniak <postgres@piotr-stefaniak.me>
Subject: Re: Preliminary results for proposed new pgindent implementation
Date: Fri, 16 Jun 2017 16:10:42 -0400
Message-ID: <20170616201042.GC5081@momjian.us> (raw)
In-Reply-To: <29590.1497643007@sss.pgh.pa.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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

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  <bruce@momjian.us>        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



view thread (50+ messages)  latest in thread

Message-ID: <20170616201042.GC5081@momjian.us>
Permalink:  ../20170616201042.GC5081@momjian.us/
Also on:    postgresql.org/message-id/20170616201042.GC5081@momjian.us

 · 

reply

Reply instructions:

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

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: bruce@momjian.us, tgl@sss.pgh.pa.us, andres@anarazel.de, peter.eisentraut@2ndquadrant.com, alvherre@2ndquadrant.com, robertmhaas@gmail.com, sfrost@snowman.net, postgres@piotr-stefaniak.me
  Subject: Re: Preliminary results for proposed new pgindent implementation
  In-Reply-To: <20170616201042.GC5081@momjian.us>

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

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox