Re: Emacs vs pg_indent's weird indentation for function declarations

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Piotr Stefaniak <postgres@piotr-stefaniak.me>
Cc: Thomas Munro <thomas.munro@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>, Michael Paquier <michael@paquier.xyz>
Date: 2019-05-19T17:27:21Z
Lists: pgsql-hackers
Piotr Stefaniak <postgres@piotr-stefaniak.me> writes:
> On 17/05/2019 16.48, Tom Lane wrote:
>> It doesn't really seem practical to me to make the lookahead function
>> smart enough to tell the difference between attributes and K&R-style
>> parameter declarations.  What I'm thinking of doing to have an
>> upstreamable patch is to invent a new switch, perhaps '-kr'/'-nkr',
>> to indicate whether the user is more worried about K&R function
>> declarations than she is about function attributes. 

> I think it's safe to assume that upstream can drop support for K&R-style 
> parameters altogether.

Cool.  I already created the switch, but maybe we could have it
default to -nkr?

			regards, tom lane



Commits

  1. Phase 2 pgindent run for v12.

  2. ANSI-ify a few straggler K&R-style function definitions.